Package org.apache.axiom.soap.impl.llom.soap11

Examples of org.apache.axiom.soap.impl.llom.soap11.SOAP11HeaderImpl


        TestLogger.logger.debug("---------------------------------------");
        TestLogger.logger.debug("test: " + getName());
       
        OMElement payload = createPayload();
       
        SOAPFactory factory = new SOAP11Factory();
        SOAPEnvelope env = factory.createSOAPEnvelope();
        SOAPBody body = factory.createSOAPBody(env);
       
        body.addChild(payload);
       
        OMOutputFormat format = new OMOutputFormat();
        format.setDoOptimize(true);
View Full Code Here


        if (documentElement instanceof SOAPEnvelope) {
            envelope = (SOAPEnvelope) documentElement;
        } else {
            // If it is not a SOAPEnvelope we wrap that with a fake
            // SOAPEnvelope.
            SOAPFactory soapFactory = new SOAP11Factory();
            envelope = soapFactory.getDefaultEnvelope();
            envelope.getBody().addChild(documentElement);
        }
        return envelope;
    }
View Full Code Here

     * @return
     */
    private static SOAPFactory _getFactory(Protocol protocol) {
        SOAPFactory soapFactory;
        if (protocol == Protocol.soap11) {
            soapFactory = new SOAP11Factory();
        } else if (protocol == Protocol.soap12) {
            soapFactory = new SOAP12Factory();
        } else if (protocol == Protocol.rest) {
            // For REST, create a SOAP 1.1 Envelope to contain the message
            // This is consistent with Axis2.
            soapFactory = new SOAP11Factory();
        } else {
            throw ExceptionFactory
                    .makeWebServiceException(Messages.getMessage("RESTIsNotSupported"), null);
        }
        return soapFactory;
View Full Code Here

    SOAPFactory factory = null;
    if(soap12){
      factory = new SOAP12Factory();
    }
    else{
      factory = new SOAP11Factory();
    }
   
    OutputStream tmpOut2 = connection.getOutputStream();
    byte ar[] = null;
    if(piggyBack){
View Full Code Here

    SOAPFactory factory = null;
    if(soap12){
      factory = new SOAP12Factory();
    }
    else{
      factory = new SOAP11Factory();
    }
   
    byte ar[] = null;
    if(piggyBack){
      ar = getPiggybackedAckMessageAsBytes(ackMsgSeqID, applicationMsgSeqID, factory);
View Full Code Here

   *
   * @return
   */
  private byte[] getAppMessageAsBytes(String uuid) throws Exception
  {
    SOAPFactory factory = new SOAP11Factory();
    SOAPEnvelope dummyEnvelope = factory.getDefaultEnvelope();
   
    // Create a "new" application message
    MessageContext messageContext = new MessageContext();
    messageContext.setConfigurationContext(serverConfigContext);
    messageContext.setAxisService(serverConfigContext.getAxisConfiguration().getService("RMSampleService"));   
View Full Code Here

   *
   * @return
   */
  private byte[] getCloseMessageAsBytes(String uuid) throws Exception
  {
    SOAPFactory factory = new SOAP11Factory();
    SOAPEnvelope dummyEnvelope = factory.getDefaultEnvelope();
   
    // Create a "new" application message
    MessageContext messageContext = new MessageContext();
    messageContext.setConfigurationContext(serverConfigContext);
    messageContext.setAxisService(serverConfigContext.getAxisConfiguration().getService("RMSampleService"));   
View Full Code Here

   *
   * @return
   */
  private byte[] getAckRequestMessageAsBytes(String uuid) throws Exception
  {
    SOAPFactory factory = new SOAP11Factory();
    SOAPEnvelope dummyEnvelope = factory.getDefaultEnvelope();
   
    // Create a "new" application message
    MessageContext messageContext = new MessageContext();
    messageContext.setConfigurationContext(serverConfigContext);
    messageContext.setAxisService(serverConfigContext.getAxisConfiguration().getService("RMSampleService"));   
View Full Code Here

                                   Map map,ConfigurationContext configCtx) throws AxisFault {
        String[] values =
                Utils.parseRequestURLForServiceAndOperation(requestUrl,
                                                        configCtx.getServiceContextPath());
        if (values == null) {
            return new SOAP11Factory().getDefaultEnvelope();
        }

        if ((values[1] != null) && (values[0] != null)) {
            String srvice = values[0];
            AxisService service = configCtx.getAxisConfiguration().getService(srvice);
            if (service == null) {
                throw new AxisFault("service not found: " + srvice);
            }
            String operation = values[1];
            SOAPFactory soapFactory = new SOAP11Factory();
            SOAPEnvelope envelope = soapFactory.getDefaultEnvelope();
//            OMNamespace omNs = soapFactory.createOMNamespace(values[0], "services");
            OMNamespace omNs = soapFactory.createOMNamespace(service.getSchematargetNamespace(),
                                                             service.getSchematargetNamespacePrefix());
            //OMNamespace defualtNs = new OMNamespaceImpl("", null, soapFactory);
            soapFactory.createOMNamespace(service.getSchematargetNamespace(),
                                          service.getSchematargetNamespacePrefix());
            OMElement opElement = soapFactory.createOMElement(operation, omNs);
            Iterator it = map.keySet().iterator();

            while (it.hasNext()) {
                String name = (String) it.next();
                String value = (String) map.get(name);
                OMElement omEle = soapFactory.createOMElement(name, omNs);

                omEle.setText(value);
                opElement.addChild(omEle);
            }
View Full Code Here

                                // If the content Type is text/xml (BTW which is the SOAP 1.1 Content type ) and
                                // the SOAP Action is absent it is rest !!
                                msgContext.setDoingREST(true);

                                SOAPFactory soapFactory = new SOAP11Factory();

                                builder = new StAXOMBuilder(xmlreader);
                                builder.setOMBuilderFactory(soapFactory);
                                envelope = soapFactory.getDefaultEnvelope();
                                envelope.getBody().addChild(builder.getDocumentElement());
                            }
                        } else {
                            builder = new StAXSOAPModelBuilder(
                                    xmlreader, SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
View Full Code Here

TOP

Related Classes of org.apache.axiom.soap.impl.llom.soap11.SOAP11HeaderImpl

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.