Package com.sun.xml.ws.api.addressing

Examples of com.sun.xml.ws.api.addressing.AddressingVersion


            setProperties(message,true);

            String action = null;
            String msgId = null;
            if (LOGGER.isLoggable(Level.FINE)) {
              AddressingVersion av = DispatchImpl.this.getBinding().getAddressingVersion();
              SOAPVersion sv = DispatchImpl.this.getBinding().getSOAPVersion();
              action =
                av != null && message.getMessage() != null ?
                  AddressingUtils.getAction(message.getMessage().getHeaders(), av, sv) : null;
              msgId =
View Full Code Here


            } catch (XMLStreamException ex) {
                throw new WebServiceException(ex);
            }
        }
        AddressingVersion av = AddressingVersion.W3C;
        this.endpointReference = new WSEndpointReference(
                av, eprAddress, getServiceName(), getPortName(), portTypeName, null, wsdlAddress, null, wsdlEPRExtensions, null);

        return this.endpointReference;
    }
View Full Code Here

        return subjects;
    }


    private void addWsawUsingAddressingForCompatibility(Collection<PolicySubject> subjects, PolicyMap policyMap, SEIModel model, AddressingFeature addressingFeature) throws PolicyException {
        final AddressingVersion addressingVersion = AddressingVersion.fromFeature(addressingFeature);
        final QName usingAddressing = new QName(addressingVersion.policyNsUri, "UsingAddressing");
        final PolicyMapKey endpointKey = PolicyMap.createWsdlEndpointScopeKey(model.getServiceQName(), model.getPortName());
        final Policy existingPolicy = policyMap.getEndpointEffectivePolicy(endpointKey);
        if ((existingPolicy == null) || !existingPolicy.contains(usingAddressing)) {
            final QName bindingName = model.getBoundPortTypeName();
View Full Code Here

     */
    CoordinatorIF<T> getCoordinatorPortTypeForReplyTo() {
            MessageHeaders headerList =
                    (MessageHeaders) m_context.getMessageContext().get(
                            com.sun.xml.ws.developer.JAXWSProperties.INBOUND_HEADER_LIST_PROPERTY);
          AddressingVersion av = m_version.getAddressingVersion();
          WSEndpointReference wsReplyTo = AddressingUtils.getReplyTo(headerList, av, m_version.getSOPAVersion());
            if(wsReplyTo != null && !wsReplyTo.isNone() &&wsReplyTo.isAnonymous()){
              Header header = headerList.get(av.fromTag, true);
              if(header!=null)
                try {
View Full Code Here

     * @param missingHeader The missing WS-Addressing Header
     * @return
     *      A message representing SOAPFault that contains the WS-Addressing code/subcode/subsubcode.
     */
    public static Message createAddressingFaultMessage(WSBinding binding, Packet p, QName missingHeader) {
        AddressingVersion av = binding.getAddressingVersion();
        if(av == null) {
            // Addressing is not enabled.
            throw new WebServiceException(AddressingMessages.ADDRESSING_SHOULD_BE_ENABLED());
        }
        WsaTubeHelper helper = av.getWsaHelper(null,null,binding);
        return create(helper.newMapRequiredFault(new MissingAddressingHeaderException(missingHeader,p)));
    }
View Full Code Here


    public Packet relateServerResponse(@Nullable Packet r, @Nullable WSDLPort wsdlPort, @Nullable SEIModel seiModel, @NotNull WSBinding binding) {
      relatePackets(r, false);
        r.setState(State.ServerResponse);
        AddressingVersion av = binding.getAddressingVersion();
        // populate WS-A headers only if WS-A is enabled
        if (av == null) {
            return r;
        }
       
View Full Code Here

            refpEPR.addReferenceParametersToList(hl);
        }
    }

    private void populateAddressingHeaders(WSBinding binding, Packet responsePacket, WSDLPort wsdlPort, SEIModel seiModel) {
        AddressingVersion addressingVersion = binding.getAddressingVersion();

        if (addressingVersion == null) {
            return;
        }

        WsaTubeHelper wsaHelper = addressingVersion.getWsaHelper(wsdlPort, seiModel, binding);
        String action = responsePacket.getMessage().isFault() ?
                wsaHelper.getFaultAction(this, responsePacket) :
                wsaHelper.getOutputAction(this);
        if (action == null) {
            LOGGER.info("WSA headers are not added as value for wsa:Action cannot be resolved for this message");
View Full Code Here

    public final SOAPVersion getSOAPVersion() {
        return bindingId.getSOAPVersion();
    }

    public AddressingVersion getAddressingVersion() {
        AddressingVersion addressingVersion;
        if (features.isEnabled(AddressingFeature.class))
            addressingVersion = AddressingVersion.W3C;
        else if (features.isEnabled(MemberSubmissionAddressingFeature.class))
            addressingVersion = AddressingVersion.MEMBER;
        else
View Full Code Here

        String action = AddressingUtils.getAction(hl, binding.getAddressingVersion(), binding.getSOAPVersion());
        if (action != null) {
            //assume that all the WSA headers are set by the user
            return;
        }
        AddressingVersion addressingVersion = binding.getAddressingVersion();
        //seiModel is passed as null as it is not needed.
        WsaTubeHelper wsaHelper = addressingVersion.getWsaHelper(wsdlPort, null, binding);

        // wsa:Action
        String effectiveInputAction = wsaHelper.getEffectiveInputAction(packet);
        if (effectiveInputAction == null || effectiveInputAction.equals("") && binding.getSOAPVersion() == SOAPVersion.SOAP_11) {
            throw new WebServiceException(ClientMessages.INVALID_SOAP_ACTION());
View Full Code Here

        // try w3c version of ws-a first, then member submission version
        final MessageHeaders headers = requestMsg.getHeaders();

        String action = AddressingUtils.getAction(headers, AddressingVersion.W3C, soapVersion);
        AddressingVersion wsaVersion = AddressingVersion.W3C;
        if (action == null) {
            action = AddressingUtils.getAction(headers, AddressingVersion.MEMBER, soapVersion);
            wsaVersion = AddressingVersion.MEMBER;
        }

        if (action == null) {
            // TODO: Better error message
            throw new WebServiceException("No wsa:Action specified");
        }
        else if (action.equals(GET_REQUEST)) {
            final String toAddress = AddressingUtils.getTo(headers, wsaVersion, soapVersion);
            return processGetRequest(requestMsg, toAddress, wsaVersion, soapVersion);
        }
        else if (action.equals(GET_MDATA_REQUEST)) {
            String faultText = MessagesMessages.MEX_0017_GET_METADATA_NOT_IMPLEMENTED(GET_MDATA_REQUEST, GET_REQUEST);
            logger.warning(faultText);
            final Message faultMessage = createFaultMessage(faultText, GET_MDATA_REQUEST,
                wsaVersion, soapVersion);
            wsContext.getMessageContext().put(BindingProvider.SOAPACTION_URI_PROPERTY, wsaVersion.getDefaultFaultAction());
            return faultMessage;
        }
        // If here, either action is unsupported
        // TODO: Better error message
        throw new UnsupportedOperationException(action);
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.api.addressing.AddressingVersion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.