Search in sources :

Example 1 with AddressingFeature

use of jakarta.xml.ws.soap.AddressingFeature in project metro-jax-ws by eclipse-ee4j.

the class W3CAddressingWSDLParserExtension method addressibleElement.

private boolean addressibleElement(XMLStreamReader reader, WSDLFeaturedObject binding) {
    QName ua = reader.getName();
    if (ua.equals(AddressingVersion.W3C.wsdlExtensionTag)) {
        String required = reader.getAttributeValue(WSDLConstants.NS_WSDL, "required");
        binding.addFeature(new AddressingFeature(true, Boolean.parseBoolean(required)));
        XMLStreamReaderUtil.skipElement(reader);
        // UsingAddressing is consumed
        return true;
    }
    return false;
}
Also used : AddressingFeature(jakarta.xml.ws.soap.AddressingFeature) QName(javax.xml.namespace.QName)

Example 2 with AddressingFeature

use of jakarta.xml.ws.soap.AddressingFeature in project metro-jax-ws by eclipse-ee4j.

the class W3CAddressingWSDLGeneratorExtension method start.

@Override
public void start(WSDLGenExtnContext ctxt) {
    WSBinding binding = ctxt.getBinding();
    TypedXmlWriter root = ctxt.getRoot();
    enabled = binding.isFeatureEnabled(AddressingFeature.class);
    if (!enabled)
        return;
    AddressingFeature ftr = binding.getFeature(AddressingFeature.class);
    required = ftr.isRequired();
    root._namespace(AddressingVersion.W3C.wsdlNsUri, AddressingVersion.W3C.getWsdlPrefix());
}
Also used : WSBinding(com.sun.xml.ws.api.WSBinding) AddressingFeature(jakarta.xml.ws.soap.AddressingFeature) TypedXmlWriter(com.sun.xml.txw2.TypedXmlWriter)

Example 3 with AddressingFeature

use of jakarta.xml.ws.soap.AddressingFeature in project metro-jax-ws by eclipse-ee4j.

the class FeatureListValidatorTest method testAddsAddressing.

public void testAddsAddressing() {
    BindingImpl binding = BindingImpl.create(BindingID.SOAP11_HTTP, new WebServiceFeature[] { new AddsAddressingFeature() });
    assertTrue("AddressingFeature must be enabled because AddsAddressingFeature was passed", binding.isFeatureEnabled(AddressingFeature.class));
}
Also used : BindingImpl(com.sun.xml.ws.binding.BindingImpl) AddressingFeature(jakarta.xml.ws.soap.AddressingFeature)

Example 4 with AddressingFeature

use of jakarta.xml.ws.soap.AddressingFeature in project metro-jax-ws by eclipse-ee4j.

the class FeatureListValidatorTest method testAddsAddressingAlreadyPresent.

public void testAddsAddressingAlreadyPresent() {
    BindingImpl binding = BindingImpl.create(BindingID.SOAP11_HTTP, new WebServiceFeature[] { new AddsAddressingFeature(), new AddressingFeature() });
    assertTrue("AddressingFeature must be enabled because AddsAddressingFeature was passed", binding.isFeatureEnabled(AddressingFeature.class));
}
Also used : BindingImpl(com.sun.xml.ws.binding.BindingImpl) AddressingFeature(jakarta.xml.ws.soap.AddressingFeature)

Example 5 with AddressingFeature

use of jakarta.xml.ws.soap.AddressingFeature in project metro-jax-ws by eclipse-ee4j.

the class WSServiceDelegate method createDispatch.

protected Dispatch<Object> createDispatch(QName portName, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeatureList features) {
    WSEndpointReference wsepr = null;
    boolean isAddressingEnabled = false;
    AddressingFeature af = features.get(AddressingFeature.class);
    if (af == null) {
        af = this.features.get(AddressingFeature.class);
    }
    if (af != null && af.isEnabled())
        isAddressingEnabled = true;
    MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class);
    if (msa == null) {
        msa = this.features.get(MemberSubmissionAddressingFeature.class);
    }
    if (msa != null && msa.isEnabled())
        isAddressingEnabled = true;
    if (isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) {
        wsepr = wsdlService.get(portName).getEPR();
    }
    return createDispatch(portName, wsepr, jaxbContext, mode, features);
}
Also used : MemberSubmissionAddressingFeature(com.sun.xml.ws.developer.MemberSubmissionAddressingFeature) AddressingFeature(jakarta.xml.ws.soap.AddressingFeature) WSEndpointReference(com.sun.xml.ws.api.addressing.WSEndpointReference) MemberSubmissionAddressingFeature(com.sun.xml.ws.developer.MemberSubmissionAddressingFeature)

Aggregations

AddressingFeature (jakarta.xml.ws.soap.AddressingFeature)41 MemberSubmissionAddressingFeature (com.sun.xml.ws.developer.MemberSubmissionAddressingFeature)21 MemberSubmissionEndpointReference (com.sun.xml.ws.developer.MemberSubmissionEndpointReference)17 W3CEndpointReference (jakarta.xml.ws.wsaddressing.W3CEndpointReference)16 SOAPFaultException (jakarta.xml.ws.soap.SOAPFaultException)11 WSEndpointReference (com.sun.xml.ws.api.addressing.WSEndpointReference)10 QName (javax.xml.namespace.QName)7 JAXBElement (jakarta.xml.bind.JAXBElement)5 Service (jakarta.xml.ws.Service)5 SOAPMessage (jakarta.xml.soap.SOAPMessage)4 IOException (java.io.IOException)4 BindingImpl (com.sun.xml.ws.binding.BindingImpl)3 JAXBContext (jakarta.xml.bind.JAXBContext)3 BindingProvider (jakarta.xml.ws.BindingProvider)3 Endpoint (jakarta.xml.ws.Endpoint)3 WebServiceFeature (jakarta.xml.ws.WebServiceFeature)3 URL (java.net.URL)3 ArrayList (java.util.ArrayList)3 WSBinding (com.sun.xml.ws.api.WSBinding)2 AssertionSet (com.sun.xml.ws.policy.AssertionSet)2