Search in sources :

Example 6 with AddressingVersion

use of com.sun.xml.ws.api.addressing.AddressingVersion in project metro-jax-ws by eclipse-ee4j.

the class DispatchImpl method dumpParam.

private void dumpParam(T param, String method) {
    if (param instanceof Packet) {
        Packet message = (Packet) param;
        String action;
        String msgId;
        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 = av != null && message.getMessage() != null ? AddressingUtils.getMessageID(message.getMessage().getHeaders(), av, sv) : null;
            LOGGER.fine("In DispatchImpl." + method + " for message with action: " + action + " and msg ID: " + msgId + " msg: " + message.getMessage());
            if (message.getMessage() == null) {
                LOGGER.fine("Dispatching null message for action: " + action + " and msg ID: " + msgId);
            }
        }
    }
}
Also used : Packet(com.sun.xml.ws.api.message.Packet) AddressingVersion(com.sun.xml.ws.api.addressing.AddressingVersion) SOAPVersion(com.sun.xml.ws.api.SOAPVersion)

Example 7 with AddressingVersion

use of com.sun.xml.ws.api.addressing.AddressingVersion in project metro-jax-ws by eclipse-ee4j.

the class BindingImpl method getAddressingVersion.

public AddressingVersion getAddressingVersion() {
    AddressingVersion addressingVersion;
    if (features.isEnabled(AddressingFeature.class))
        addressingVersion = AddressingVersion.W3C;
    else if (features.isEnabled(MemberSubmissionAddressingFeature.class))
        addressingVersion = AddressingVersion.MEMBER;
    else
        addressingVersion = null;
    return addressingVersion;
}
Also used : AddressingVersion(com.sun.xml.ws.api.addressing.AddressingVersion) MemberSubmissionAddressingFeature(com.sun.xml.ws.developer.MemberSubmissionAddressingFeature)

Example 8 with AddressingVersion

use of com.sun.xml.ws.api.addressing.AddressingVersion in project metro-jax-ws by eclipse-ee4j.

the class WsaTube method addKnownHeadersToBinding.

private void addKnownHeadersToBinding(WSBinding binding) {
    for (AddressingVersion addrVersion : AddressingVersion.values()) {
        binding.addKnownHeader(addrVersion.actionTag);
        binding.addKnownHeader(addrVersion.faultDetailTag);
        binding.addKnownHeader(addrVersion.faultToTag);
        binding.addKnownHeader(addrVersion.fromTag);
        binding.addKnownHeader(addrVersion.messageIDTag);
        binding.addKnownHeader(addrVersion.relatesToTag);
        binding.addKnownHeader(addrVersion.replyToTag);
        binding.addKnownHeader(addrVersion.toTag);
    }
}
Also used : AddressingVersion(com.sun.xml.ws.api.addressing.AddressingVersion)

Example 9 with AddressingVersion

use of com.sun.xml.ws.api.addressing.AddressingVersion in project metro-jax-ws by eclipse-ee4j.

the class AddNumbersClient method testMissingActionWithWSDL.

public void testMissingActionWithWSDL() throws Exception {
    try {
        WebServiceFeature[] features = new WebServiceFeature[] { new AddressingFeature(false) };
        Dispatch dispatch = createDispatchWithWSDL(features);
        BindingImpl binding = (BindingImpl) dispatch.getBinding();
        AddressingVersion addressingVersion = AddressingVersion.fromBinding(binding);
        System.out.println("Addressing version is " + addressingVersion);
        assertFalse(AddressingVersion.isEnabled(binding));
        WsaUtils.invoke(dispatch, WsaUtils.MISSING_ACTION_MESSAGE, WsaUtils.S11_NS, WsaUtils.W3C_WSA_NS, getAddress(), W3CAddressingConstants.WSA_ANONYMOUS_ADDRESS);
        fail("SOAPFaultException must be thrown");
    } catch (SOAPFaultException sfe) {
        assertFault(sfe, W3CAddressingConstants.MAP_REQUIRED_QNAME);
    }
}
Also used : BindingImpl(com.sun.xml.ws.binding.BindingImpl) AddressingFeature(jakarta.xml.ws.soap.AddressingFeature) MemberSubmissionAddressingFeature(com.sun.xml.ws.developer.MemberSubmissionAddressingFeature) AddressingVersion(com.sun.xml.ws.api.addressing.AddressingVersion) WebServiceFeature(jakarta.xml.ws.WebServiceFeature) Dispatch(jakarta.xml.ws.Dispatch) SOAPFaultException(jakarta.xml.ws.soap.SOAPFaultException)

Example 10 with AddressingVersion

use of com.sun.xml.ws.api.addressing.AddressingVersion in project metro-jax-ws by eclipse-ee4j.

the class WSEndpointImpl method getEndpointReference.

@Override
public <T extends EndpointReference> T getEndpointReference(Class<T> clazz, String address, String wsdlAddress, List<Element> metadata, List<Element> referenceParameters) {
    QName portType = null;
    if (port != null) {
        portType = port.getBinding().getPortTypeName();
    }
    AddressingVersion av = AddressingVersion.fromSpecClass(clazz);
    return new WSEndpointReference(av, address, serviceName, portName, portType, metadata, wsdlAddress, referenceParameters, endpointReferenceExtensions.values(), null).toSpec(clazz);
}
Also used : AddressingVersion(com.sun.xml.ws.api.addressing.AddressingVersion) QName(javax.xml.namespace.QName) WSEndpointReference(com.sun.xml.ws.api.addressing.WSEndpointReference)

Aggregations

AddressingVersion (com.sun.xml.ws.api.addressing.AddressingVersion)13 SOAPVersion (com.sun.xml.ws.api.SOAPVersion)4 WsaTubeHelper (com.sun.xml.ws.addressing.WsaTubeHelper)3 WSEndpointReference (com.sun.xml.ws.api.addressing.WSEndpointReference)3 WebServiceException (jakarta.xml.ws.WebServiceException)3 MemberSubmissionAddressingFeature (com.sun.xml.ws.developer.MemberSubmissionAddressingFeature)2 SAAJMessage (com.sun.xml.ws.message.saaj.SAAJMessage)2 QName (javax.xml.namespace.QName)2 WSEPRExtension (com.sun.xml.ws.addressing.WSEPRExtension)1 MissingAddressingHeaderException (com.sun.xml.ws.addressing.model.MissingAddressingHeaderException)1 AddressingPropertySet (com.sun.xml.ws.api.addressing.AddressingPropertySet)1 OneWayFeature (com.sun.xml.ws.api.addressing.OneWayFeature)1 Packet (com.sun.xml.ws.api.message.Packet)1 WSDLBoundOperation (com.sun.xml.ws.api.model.wsdl.WSDLBoundOperation)1 BindingImpl (com.sun.xml.ws.binding.BindingImpl)1 Dispatch (jakarta.xml.ws.Dispatch)1 WebServiceFeature (jakarta.xml.ws.WebServiceFeature)1 AddressingFeature (jakarta.xml.ws.soap.AddressingFeature)1 SOAPFaultException (jakarta.xml.ws.soap.SOAPFaultException)1 ArrayList (java.util.ArrayList)1