Package org.apache.cxf.binding.soap.model

Examples of org.apache.cxf.binding.soap.model.SoapBindingInfo


    private void addRequiredRoles() {
        if (this.roles == null) {
            this.roles = new HashSet<String>();
        }
        if (this.soapBinding instanceof SoapBindingInfo) {
            SoapBindingInfo bindingInfo = (SoapBindingInfo) this.soapBinding;
            if (bindingInfo.getSoapVersion() instanceof Soap11) {
                this.roles.add(bindingInfo.getSoapVersion().getNextRole());
            } else if (bindingInfo.getSoapVersion() instanceof Soap12) {
                this.roles.add(bindingInfo.getSoapVersion().getNextRole());
                this.roles.add(bindingInfo.getSoapVersion().getUltimateReceiverRole());
            }
        }
    }
View Full Code Here


        soapBinding.setProperty(Message.MTOM_ENABLED, flag);
    }

    public MessageFactory getMessageFactory() {
        if (this.soapBinding instanceof SoapBindingInfo) {
            SoapBindingInfo bindingInfo = (SoapBindingInfo) this.soapBinding;
            try {
                if (bindingInfo.getSoapVersion() instanceof Soap11) {
                    return MessageFactory.newInstance();
                } else if (bindingInfo.getSoapVersion() instanceof Soap12) {
                    return MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
                }
            } catch (SOAPException e) {
                throw new WebServiceException(BUNDLE.getString("SAAJ_FACTORY_ERR"), e);
            }
View Full Code Here

        return null;
    }

    public SOAPFactory getSOAPFactory() {
        if (this.soapBinding instanceof SoapBindingInfo) {
            SoapBindingInfo bindingInfo = (SoapBindingInfo) this.soapBinding;
            try {
                if (bindingInfo.getSoapVersion() instanceof Soap11) {
                    return SOAPFactory.newInstance();
                } else if (bindingInfo.getSoapVersion() instanceof Soap12) {
                    return SOAPFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
                }
            } catch (SOAPException e) {
                throw new WebServiceException(BUNDLE.getString("SAAJ_FACTORY_ERR"), e);
            }
View Full Code Here

            || bindingID.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING);
    }

    public String getBindingID() {
        if (this.soapBinding instanceof SoapBindingInfo) {
            SoapBindingInfo bindingInfo = (SoapBindingInfo) this.soapBinding;
            if (bindingInfo.getSoapVersion() instanceof Soap12) {
                return SOAP12HTTP_BINDING;            
            }
        }
        return SOAP11HTTP_BINDING;
    }
View Full Code Here

                    new Exception("Operation not bound on this message"));
        }
        BindingMessageInfo msg = isRequestor(message) ? bop.getInput() : bop
                .getOutput();

        SoapBindingInfo binding = (SoapBindingInfo) message.getExchange().get(
                Endpoint.class).getEndpointInfo().getBinding();
        String style = binding.getStyle(bop.getOperationInfo());
        if (style == null) {
            style = binding.getStyle();
        }

        Element partWrapper = DomUtil.getFirstChildElement(element);
        while (partWrapper != null) {
            extractHeaderParts((SoapMessage) message, element, partWrapper, msg);
View Full Code Here

            }
            BindingMessageInfo msg = isRequestor(message) ? bop.getInput()
                    : bop.getOutput();

           
            SoapBindingInfo binding = (SoapBindingInfo) message.getExchange()
                    .get(Endpoint.class).getEndpointInfo().getBinding();
            String style = binding.getStyle(bop.getOperationInfo());
            if (style == null) {
                style = binding.getStyle();
            }

            if ("rpc".equals(style)) {
                addOperationNode(message, xmlWriter);
                getRPCPartWrapper(msg, element, message, xmlWriter);
View Full Code Here

            String messageName = wsdlMessage.getMessageInfo().getName()
                    .getLocalPart();
            root.setAttribute(JbiConstants.WSDL11_WRAPPER_NAME, messageName);
            root.setAttribute(JbiConstants.WSDL11_WRAPPER_VERSION, "1.0");

            SoapBindingInfo binding = (SoapBindingInfo) message.getExchange()
                    .get(Endpoint.class).getEndpointInfo().getBinding();
            String style = binding.getStyle(wsdlOperation.getOperationInfo());
            if (style == null) {
                style = binding.getStyle();
            }

            Element body = getBodyElement(message);
            if (body == null) {
                return;
View Full Code Here

        rme.setManager(manager);
        Service as = control.createMock(Service.class);
        EasyMock.expect(ae.getService()).andReturn(as);
        EndpointInfo aei = control.createMock(EndpointInfo.class);
        EasyMock.expect(ae.getEndpointInfo()).andReturn(aei).times(2);
        SoapBindingInfo bi = control.createMock(SoapBindingInfo.class);
        EasyMock.expect(aei.getBinding()).andReturn(bi);
        SoapVersion sv = Soap11.getInstance();
        EasyMock.expect(bi.getSoapVersion()).andReturn(sv);
        String ns = "http://schemas.xmlsoap.org/wsdl/soap/";
        EasyMock.expect(bi.getBindingId()).andReturn(ns);
        EasyMock.expect(aei.getTransportId()).andReturn(ns);
        String addr = "addr";
        EasyMock.expect(aei.getAddress()).andReturn(addr);
        Object ua = new Object();
        EasyMock.expect(rme.getUsingAddressing(aei)).andReturn(ua);
View Full Code Here

       
        BindingInfo b = endpointInfo.getService().getBindings().iterator().next();
       
        assertTrue(b instanceof SoapBindingInfo);
       
        SoapBindingInfo sb = (SoapBindingInfo) b;
        assertEquals("HelloServiceSoapBinding", b.getName().getLocalPart());
        assertEquals("document", sb.getStyle());
       
        assertEquals(4, b.getOperations().size());
       
        BindingOperationInfo bop = b.getOperations().iterator().next();
        SoapOperationInfo sop = bop.getExtensor(SoapOperationInfo.class);
View Full Code Here

        Endpoint endpoint = server.getEndpoint();
        Binding binding = endpoint.getBinding();
        assertTrue(binding instanceof SoapBinding);

        SoapBindingInfo sb = (SoapBindingInfo)endpoint.getEndpointInfo().getBinding();
        assertEquals("document", sb.getStyle());
        assertEquals(false, bean.isWrapped());

        assertEquals(1, sb.getOperations().size());
        Node res = invoke(address, LocalTransportFactory.TRANSPORT_ID, "/org/apache/cxf/jaxws/sayHi.xml");
       
        addNamespace("j", "http://service.jaxws.cxf.apache.org/");
        assertValid("/s:Envelope/s:Body/j:sayHi", res);
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.binding.soap.model.SoapBindingInfo

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.