Package org.apache.axiom.soap

Examples of org.apache.axiom.soap.SOAPBody.addChild()


        Object[] args = (Object[])msg.getBody();
        if (args != null && args.length > 0) {
            SOAPBody body = env.getBody();
            for (Object bc : args) {
                if (bc instanceof OMElement) {
                    body.addChild((OMElement)bc);
                } else {
                    throw new IllegalArgumentException(
                                                       "Can't handle mixed payloads between OMElements and other types.");
                }
            }
View Full Code Here


                            SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
                            SOAPEnvelope resEnv = factory.createSOAPEnvelope();
                            SOAPBody resBody = factory.createSOAPBody();
                            OMElement resService = factory.createOMElement(new QName(serviceName + "Response"));
                            resService.addChild(resultSer.getFirstElement());
                            resBody.addChild(resService);
                            resEnv.addChild(resBody);

                            // The declareDefaultNamespace method doesn't work see (https://issues.apache.org/jira/browse/AXIS2-3156)
                            // so the following doesn't work:
                            // resService.declareDefaultNamespace(ModelService.TNS);
View Full Code Here

            SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
            SOAPEnvelope resEnv = factory.createSOAPEnvelope();
            SOAPBody resBody = factory.createSOAPBody();
            OMElement errMsg = factory.createOMElement(new QName("Response"));
            errMsg.addChild(resultSer.getFirstElement());
            resBody.addChild(errMsg);
            resEnv.addChild(resBody);

            // log the response message
            if (Debug.verboseOn()) {
                try {
View Full Code Here

        SOAPBody body = soapFactory.createSOAPBody();
        envelope.addChild(body);

        OMElement valueElement = soapFactory.createOMElement("Value", null);
        valueElement.setText(value);
        body.addChild(valueElement);

        return envelope;
    }

    private static String getProperty(String name, String def) {
View Full Code Here

      for (Iterator it = body.getChildren(); it.hasNext();) {
        OMNode node = (OMNode) it.next();
        node.discard();
      }
    }
    body.addChild(element);
  }

  public static void setXMLPayload(MessageContext mc, OMElement element) {
    if (mc.getEnvelope() == null) {
      try {
View Full Code Here

        block2.addChild(h2Val3);

        OMElement operation =
                omfactory.createOMElement("echoBoolean", "http://soapinterop.org/", null);
        SOAPBody body = omfactory.createSOAPBody(reqEnv);
        body.addChild(operation);
        operation.addAttribute("soapenv:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/",
                               null);

        OMElement part = omfactory.createOMElement("inputBoolean", "", null);
        part.addAttribute("xsi:type", "xsd:boolean", null);
View Full Code Here

        OMElement operation = omfactory.createOMElement("echoLinkedList",
                                                        "http://soapinterop.org/WSDLInteropTestRpcEnc",
                                                        null);
        SOAPBody body = omfactory.createSOAPBody(reqEnv);
        body.addChild(operation);
        operation.addAttribute("soapenv:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/",
                               null);

        OMElement part = omfactory.createOMElement("param0", "", null);
        part.addAttribute("xsi:type", "s:List", null);
View Full Code Here

        part2.addChild(value10);
        part2.addChild(value11);
        part2.addChild(value12);

        operation.addChild(part);
        body.addChild(part2);

        return reqEnv;

    }
}
View Full Code Here

        block2.addChild(h2Val3);

        OMElement operation =
                omfactory.createOMElement("echoStringArray", "http://soapinterop.org/", null);
        SOAPBody body = omfactory.createSOAPBody(reqEnv);
        body.addChild(operation);
        operation.addAttribute("soapenv:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/",
                               null);

        OMElement part = omfactory.createOMElement("inputStringArray", "", null);
        part.addAttribute("xsi:type", "SOAP-ENC:Array", null);
View Full Code Here

        block2.addChild(h2Val3);

        OMElement operation =
                omfactory.createOMElement("echoIntegerArray", "http://soapinterop.org/", null);
        SOAPBody body = omfactory.createSOAPBody(reqEnv);
        body.addChild(operation);
        operation.addAttribute("soapenv:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/",
                               null);
        OMElement part = omfactory.createOMElement("inputIntegerArray", "", null);
        part.addAttribute("xsi:type", "SOAP-ENC:Array", null);
        part.addAttribute("SOAP-ENC:arrayType", "xsd:int[3]", null);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.