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());

        // Note all exceptions are caught and rethrown with a WebServiceException
        try {
            // Sample Document message
            // ..
View Full Code Here


                  }
                }
                //Need to make sure the protocol (envelope ns)  of the request matches the binding
                // expected by the service description
                if (!ignoreSOAPVersion && !Utils.bindingTypesMatch(request, endpointDesc)) {
                  Protocol protocol = request.getMessage().getProtocol();
                  MessageContext faultContext = Utils.createVersionMismatchMessage(request, protocol);
                  eic.setResponseMessageContext(faultContext);
                  return false;
                }
               
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) {
                    throw ExceptionFactory.makeWebServiceException(e);
View Full Code Here

                .getFactory(HandlerLifecycleManagerFactory.class);
        return elmf.createHandlerLifecycleManager();
    }
   
    private MessageContext isProtocolMismatch(MessageContext request, MessageContext response){
      Protocol requestProtocol =request.getMessage().getProtocol();
      Protocol responseProtocol = response.getMessage().getProtocol();
      boolean protocolMismatch = false;
      String msg = null;
      if(requestProtocol.equals(Protocol.soap11)){
        if(!responseProtocol.equals(Protocol.soap11)){
          protocolMismatch = true;
          msg = "Request SOAP message protocol is version 1.1, but Response SOAP message is configured for SOAP 1.2.  This is not supported.";
        }
      }
      else if(requestProtocol.equals(Protocol.soap12)){
        if(!responseProtocol.equals(Protocol.soap12)){
          protocolMismatch = true;
          msg = "Request SOAP message protocol is version 1.2, but Response SOAP message is configured for SOAP 1.1.  This is not supported.";
        }
      }
      MessageContext msgContext = null;
View Full Code Here

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

        EndpointInterfaceDescription ed = operationDesc.getEndpointInterfaceDescription();
        EndpointDescription endpointDesc = ed.getEndpointDescription();
        Protocol protocol = Protocol.getProtocolForBinding(endpointDesc.getClientBindingID());

        // Note all exceptions are caught and rethrown with a WebServiceException
        try {
            // Sample Document message
            // ..
View Full Code Here

    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

    }
   
    private Object[] createRequestParameters(MessageContext request) {
        // Get the appropriate MethodMarshaller for the WSDL type.  This will reflect
        // the "style" and "use" of the WSDL.
        Protocol requestProtocol = request.getMessage().getProtocol();
        MethodMarshaller methodMarshaller =
                getMethodMarshaller(requestProtocol, request.getOperationDescription(),
                                    request);
       
        // The MethodMarshaller will return the input parameters that are needed to
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

                  }
                }
                //Need to make sure the protocol (envelope ns)  of the request matches the binding
                // expected by the service description
                if (!ignoreSOAPVersion && !Utils.bindingTypesMatch(request, endpointDesc)) {
                  Protocol protocol = request.getMessage().getProtocol();
                  MessageContext faultContext = Utils.createVersionMismatchMessage(request, protocol);
                  eic.setResponseMessageContext(faultContext);
                  return false;
                }
               
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) {
                    throw ExceptionFactory.makeWebServiceException(e);
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.