Package org.apache.axis2.jaxws.message

Examples of org.apache.axis2.jaxws.message.Protocol


    public Message marshalRequest(Object[] signatureArguments, OperationDescription operationDesc)
            throws WebServiceException {

        EndpointInterfaceDescription ed = operationDesc.getEndpointInterfaceDescription();
        EndpointDescription endpointDesc = ed.getEndpointDescription();
        Protocol protocol = Protocol.getProtocolForBinding(endpointDesc.getClientBindingID());
        MarshalServiceRuntimeDescription marshalDesc =
                MethodMarshallerUtils.getMarshalDesc(endpointDesc);
        TreeSet<String> packages = marshalDesc.getPackages();
        String packagesKey = marshalDesc.getPackagesKey();
View Full Code Here


            if (endpointDesc.isMTOMEnabled()) {
                message.setMTOMEnabled(true);
            }

            // Save off the protocol info so we can use it when creating the response message.
            Protocol messageProtocol = message.getProtocol();
            // Determine what type blocks we want to create (String, Source, etc) based on Provider Type
            BlockFactory factory = createBlockFactory(providerType);


            Service.Mode providerServiceMode = endpointDesc.getServiceMode();
View Full Code Here

        if ((eds != null) && (eds.size() > 0)) {
            Iterator<EndpointDescription> i = eds.iterator();
            if (i.hasNext()) {
                EndpointDescription ed = eds.iterator().next();
               
                Protocol protocol = mc.getMessage().getProtocol();
                String bindingType = ed.getBindingType();
               
                if (log.isDebugEnabled()) {
                    log.debug("Checking for matching binding types.");
                    log.debug("    message protocol: " + protocol);
                    log.debug("        binding type: " + bindingType);
                }
               
                if (protocol.equals(Protocol.soap11)) {
                  return (BindingUtils.isSOAP11Binding(bindingType));
                } else if (protocol.equals(Protocol.soap12)) {
                  return (BindingUtils.isSOAP12Binding(bindingType));                
                } else if (protocol.equals(Protocol.rest)) {
                    return HTTPBinding.HTTP_BINDING.equalsIgnoreCase(bindingType);
                }               
            }
            else {
                if (log.isDebugEnabled()) {
View Full Code Here

        if (ic.getHandlers() == null) {
            ic.setHandlers(new HandlerResolverImpl(endpointDesc.getServiceDescription()).getHandlerChain(endpointDesc.getPortInfo()));
        }

        if (!bindingTypesMatch(requestMsgCtx, endpointDesc.getServiceDescription())) {
            Protocol protocol = requestMsgCtx.getMessage().getProtocol();
            // only if protocol is soap12 and MISmatches the endpoint do we halt processing
            if (protocol.equals(Protocol.soap12)) {
                ic.setResponseMessageContext(createMismatchFaultMsgCtx(requestMsgCtx,
                                                                       "Incoming SOAP message protocol is version 1.2, but endpoint is configured for SOAP 1.1"));
                return ic;
            } else if (protocol.equals(Protocol.soap11)) {
                // SOAP 1.1 message and SOAP 1.2 binding

                // The canSupport flag indicates that we can support this scenario.
                // Possible Examples of canSupport:  JAXB impl binding, JAXB Provider
                // Possible Example of !canSupport: Application handler usage, non-JAXB Provider
View Full Code Here

        // compare soap versions and respond appropriately under SOAP 1.2 Appendix 'A'
        Collection<EndpointDescription> eds = serviceDesc.getEndpointDescriptions_AsCollection();
        // dispatch endpoints do not have SEIs, so watch out for null or empty array
        if ((eds != null) && (eds.size() > 0)) {
            EndpointDescription ed = eds.iterator().next();
            Protocol protocol = requestMsgCtx.getMessage().getProtocol();
            String endpointBindingType = ed.getBindingType();
            if (protocol.equals(Protocol.soap11)) {
                return (SOAPBinding.SOAP11HTTP_BINDING.equalsIgnoreCase(endpointBindingType)) ||
                        (SOAPBinding.SOAP11HTTP_MTOM_BINDING.equalsIgnoreCase(endpointBindingType));
            } else if (protocol.equals(Protocol.soap12)) {
                return (SOAPBinding.SOAP12HTTP_BINDING.equalsIgnoreCase(endpointBindingType)) ||
                        (SOAPBinding.SOAP12HTTP_MTOM_BINDING.equalsIgnoreCase(endpointBindingType));
            } else if (protocol.equals(Protocol.rest)) {
                return HTTPBinding.HTTP_BINDING.equalsIgnoreCase(endpointBindingType);
            }
        }
        // safe to assume?
        return true;
View Full Code Here

                try {
                    StringReader sr = new StringReader(savedMsg);
                    XMLStreamReader xmlreader = StAXUtils.createXMLStreamReader(sr);
                    MessageFactory mf = (MessageFactory)
                            FactoryRegistry.getFactory(MessageFactory.class);
                    Protocol protocol = requestMsgContext.getAxisMessageContext().isDoingREST() ?
                            Protocol.rest : null;
                    Message msg = mf.createFrom(xmlreader, protocol);
                    requestMsgContext.setMessage(msg);
                } catch (Throwable e) {
                    ExceptionFactory.makeWebServiceException(e);
View Full Code Here

        if (log.isDebugEnabled()) {
            log.debug("Loaded block factory type [" + blockFactoryType.getName());
        }
        // The protocol of the Message that is created should be based
        // on the binding information available.
        Protocol proto = Protocol.getProtocolForBinding(endpointDesc.getClientBindingID());
        Message message = null;
        if (mode.equals(Mode.PAYLOAD)) {
            try {
                MessageFactory mf =
                        (MessageFactory)FactoryRegistry.getFactory(MessageFactory.class);
View Full Code Here

            log.debug(
                    "  The DocLitWrapped Plus marshaller is used when the web service method deviates from the normal doc/lit rules.");
        }
        EndpointInterfaceDescription ed = operationDesc.getEndpointInterfaceDescription();
        EndpointDescription endpointDesc = ed.getEndpointDescription();
        Protocol protocol = Protocol.getProtocolForBinding(endpointDesc.getClientBindingID());
        MarshalServiceRuntimeDescription marshalDesc =
                MethodMarshallerUtils.getMarshalDesc(endpointDesc);
        TreeSet<String> packages = marshalDesc.getPackages();
        String packagesKey = marshalDesc.getPackagesKey();
View Full Code Here

            } else {
                context = new JAXBBlockContext(clazz.getPackage().getName());
            }
            // The protocol of the Message that is created should be based
            // on the binding information available.
            Protocol proto = Protocol.getProtocolForBinding(endpointDesc.getClientBindingID());

            // Create a block from the value
            QName qName = XMLRootElementUtil.getXmlRootElementQNameFromObject(value);
            Block block = factory.createFrom(value, context, qName);
            MessageFactory mf = (MessageFactory)FactoryRegistry.getFactory(MessageFactory.class);
View Full Code Here

        SOAPEnvelope soapEnv = msgContext.getEnvelope();
        if (soapEnv != null) {
            MessageFactory msgFactory =
                    (MessageFactory)FactoryRegistry.getFactory(MessageFactory.class);
            try {
                Protocol protocol = msgContext.isDoingREST() ? Protocol.rest : null;
                message = msgFactory.createFrom(soapEnv, protocol);
            } catch (Exception e) {
                throw ExceptionFactory.makeWebServiceException("Could not create new Message");
            }
View Full Code Here

TOP

Related Classes of org.apache.axis2.jaxws.message.Protocol

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.