Search in sources :

Example 16 with BindingImpl

use of com.sun.xml.ws.binding.BindingImpl in project metro-jax-ws by eclipse-ee4j.

the class SEIPortInfoTest method testCreateBindingWSFArray.

public void testCreateBindingWSFArray() throws MalformedURLException {
    SEIPortInfo seiPortInfo = createSEIPortInfo();
    BindingImpl b = seiPortInfo.createBinding(new WebServiceFeature[] {}, PORT_INTERFACE);
    boolean understands = ((SOAPBindingImpl) b).understandsHeader(EXTRA_HEADER);
    assertTrue("header " + EXTRA_HEADER + " must be understood", understands);
}
Also used : BindingImpl(com.sun.xml.ws.binding.BindingImpl) SOAPBindingImpl(com.sun.xml.ws.binding.SOAPBindingImpl) SOAPBindingImpl(com.sun.xml.ws.binding.SOAPBindingImpl)

Example 17 with BindingImpl

use of com.sun.xml.ws.binding.BindingImpl in project metro-jax-ws by eclipse-ee4j.

the class ClientMessageHandlerTube method setUpProcessor.

void setUpProcessor() {
    if (handlers == null) {
        // Take a snapshot, User may change chain after invocation, Same chain
        // should be used for the entire MEP
        handlers = new ArrayList<>();
        HandlerConfiguration handlerConfig = ((BindingImpl) getBinding()).getHandlerConfig();
        List<MessageHandler> msgHandlersSnapShot = handlerConfig.getMessageHandlers();
        if (!msgHandlersSnapShot.isEmpty()) {
            handlers.addAll(msgHandlersSnapShot);
            roles = new HashSet<>();
            roles.addAll(handlerConfig.getRoles());
            processor = new SOAPHandlerProcessor(true, this, getBinding(), handlers);
        }
    }
}
Also used : BindingImpl(com.sun.xml.ws.binding.BindingImpl) HandlerConfiguration(com.sun.xml.ws.client.HandlerConfiguration) MessageHandler(com.sun.xml.ws.api.handler.MessageHandler)

Example 18 with BindingImpl

use of com.sun.xml.ws.binding.BindingImpl in project metro-jax-ws by eclipse-ee4j.

the class ClientSOAPHandlerTube method setUpProcessor.

void setUpProcessor() {
    if (handlers == null) {
        // Take a snapshot, User may change chain after invocation, Same chain
        // should be used for the entire MEP
        handlers = new ArrayList<>();
        HandlerConfiguration handlerConfig = ((BindingImpl) getBinding()).getHandlerConfig();
        List<SOAPHandler> soapSnapShot = handlerConfig.getSoapHandlers();
        if (!soapSnapShot.isEmpty()) {
            handlers.addAll(soapSnapShot);
            roles = new HashSet<>();
            roles.addAll(handlerConfig.getRoles());
            processor = new SOAPHandlerProcessor(true, this, getBinding(), handlers);
        }
    }
}
Also used : BindingImpl(com.sun.xml.ws.binding.BindingImpl) HandlerConfiguration(com.sun.xml.ws.client.HandlerConfiguration) SOAPHandler(jakarta.xml.ws.handler.soap.SOAPHandler)

Example 19 with BindingImpl

use of com.sun.xml.ws.binding.BindingImpl in project metro-jax-ws by eclipse-ee4j.

the class HandlerTube method setUpProcessorInternal.

private void setUpProcessorInternal() {
    HandlerConfiguration hc = ((BindingImpl) binding).getHandlerConfig();
    if (hc != this.hc)
        resetProcessor();
    this.hc = hc;
    setUpProcessor();
}
Also used : BindingImpl(com.sun.xml.ws.binding.BindingImpl) HandlerConfiguration(com.sun.xml.ws.client.HandlerConfiguration)

Example 20 with BindingImpl

use of com.sun.xml.ws.binding.BindingImpl in project metro-jax-ws by eclipse-ee4j.

the class AddNumbersClient method testBadActionWithWSDL.

public void testBadActionWithWSDL() throws Exception {
    try {
        RespectBindingFeature respectBindingFeature = new RespectBindingFeature(false);
        WebServiceFeature[] features = new WebServiceFeature[] { respectBindingFeature };
        Dispatch dispatch = createDispatchWithWSDL(features);
        BindingImpl binding = (BindingImpl) dispatch.getBinding();
        assertTrue(AddressingVersion.isEnabled(binding));
        WsaUtils.invoke(dispatch, WsaUtils.BAD_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.ACTION_NOT_SUPPORTED_QNAME);
    }
}
Also used : BindingImpl(com.sun.xml.ws.binding.BindingImpl) RespectBindingFeature(jakarta.xml.ws.RespectBindingFeature) WebServiceFeature(jakarta.xml.ws.WebServiceFeature) Dispatch(jakarta.xml.ws.Dispatch) SOAPFaultException(jakarta.xml.ws.soap.SOAPFaultException)

Aggregations

BindingImpl (com.sun.xml.ws.binding.BindingImpl)21 WebServiceFeature (jakarta.xml.ws.WebServiceFeature)6 HandlerConfiguration (com.sun.xml.ws.client.HandlerConfiguration)5 Dispatch (jakarta.xml.ws.Dispatch)4 SOAPBindingImpl (com.sun.xml.ws.binding.SOAPBindingImpl)3 MemberSubmissionAddressingFeature (com.sun.xml.ws.developer.MemberSubmissionAddressingFeature)3 AddressingFeature (jakarta.xml.ws.soap.AddressingFeature)3 SOAPFaultException (jakarta.xml.ws.soap.SOAPFaultException)3 BindingID (com.sun.xml.ws.api.BindingID)2 ComponentFeature (com.sun.xml.ws.api.ComponentFeature)2 ComponentsFeature (com.sun.xml.ws.api.ComponentsFeature)2 MessageHandler (com.sun.xml.ws.api.handler.MessageHandler)2 Packet (com.sun.xml.ws.api.message.Packet)2 ClientTubeAssemblerContext (com.sun.xml.ws.api.pipe.ClientTubeAssemblerContext)2 WebServiceFeatureList (com.sun.xml.ws.binding.WebServiceFeatureList)2 RespectBindingFeature (jakarta.xml.ws.RespectBindingFeature)2 WebServiceException (jakarta.xml.ws.WebServiceException)2 SOAPHandler (jakarta.xml.ws.handler.soap.SOAPHandler)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 WSBinding (com.sun.xml.ws.api.WSBinding)1