Package javax.xml.soap

Examples of javax.xml.soap.SOAPElement.addChildElement()


      SOAPPart sp = message.getSOAPPart();
      SOAPEnvelope envelope = sp.getEnvelope();
      SOAPBody bdy = envelope.getBody();

      SOAPElement sbe = bdy.addChildElement(new SOAPBodyElementRpc(envelope.createName("echoString", "ns1", TARGET_NAMESPACE)));
      sbe.addChildElement(envelope.createName("String_1")).addTextNode("Hello");
      sbe.addChildElement(envelope.createName("String_2")).addTextNode("world!");

      return message;
   }
View Full Code Here


      SOAPEnvelope envelope = sp.getEnvelope();
      SOAPBody bdy = envelope.getBody();

      SOAPElement sbe = bdy.addChildElement(new SOAPBodyElementRpc(envelope.createName("echoString", "ns1", TARGET_NAMESPACE)));
      sbe.addChildElement(envelope.createName("String_1")).addTextNode("Hello");
      sbe.addChildElement(envelope.createName("String_2")).addTextNode("world!");

      return message;
   }

   private void validateResponse(SOAPMessage response) throws Exception
View Full Code Here

      // Add a soap body element
      SOAPElement sbe = bdy.addChildElement(new SOAPBodyElementRpc(envelope.createName(rpcMethodName, NS_PREFIX, TARGET_NAMESPACE)));

      // Add a some child elements
      sbe.addChildElement(envelope.createName("message")).addTextNode("Some text message");
      return msg;
   }

   private void addAttachmentPart(SOAPMessage msg, String contentType, DataHandler dataHandler)
   {
View Full Code Here

        SOAPEnvelope se = sp.getEnvelope();
        SOAPBody sb = se.getBody();
        SOAPElement el1 = sb.addBodyElement(se.createName("element1",
                                                          "prefix1",
                                                          "http://www.sun.com"));
        el1.addChildElement(se.createName("element2",
                                          "prefix2",
                                          "http://www.apache.org"));

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        msg.writeTo(baos);
View Full Code Here

        SOAPElement root = body.addChildElement(
            "TestSimpleAsyncGetRequest", BAS, httpCallBean
                .getNameSpace());

         root.addChildElement(MESSAGE, BAS,
            httpCallBean.getNameSpace()).addTextNode(content);

       
      } catch (SOAPException e) {
        throw new RuntimeException(e);
View Full Code Here

              .getNameSpace());

      SOAPElement theMessage = root.addChildElement(MESSAGE, BAS,
          httpCallBean.getNameSpace());

      theMessage.addChildElement(
          envelope.createName("name", BAS, httpCallBean
              .getNameSpace())).addTextNode("sum");

      theMessage.addChildElement(
          envelope.createName("value1", BAS, httpCallBean
View Full Code Here

      theMessage.addChildElement(
          envelope.createName("name", BAS, httpCallBean
              .getNameSpace())).addTextNode("sum");

      theMessage.addChildElement(
          envelope.createName("value1", BAS, httpCallBean
              .getNameSpace())).addTextNode("" + complexIdentifier);

      theMessage.addChildElement(
          envelope.createName("value2", BAS, httpCallBean
View Full Code Here

      theMessage.addChildElement(
          envelope.createName("value1", BAS, httpCallBean
              .getNameSpace())).addTextNode("" + complexIdentifier);

      theMessage.addChildElement(
          envelope.createName("value2", BAS, httpCallBean
              .getNameSpace())).addTextNode("" + complexIdentifier);
     
    } catch (SOAPException e) {
      throw new RuntimeException(e);
View Full Code Here

      SOAPElement root = body.addChildElement(
          "TestParameterStylesRequest", BAS, httpCallBean
              .getNameSpace());

      root.addChildElement(
          envelope.createName("HeaderParam", BAS, httpCallBean
              .getNameSpace())).addTextNode(headerParam);
     
      root.addChildElement(
          envelope.createName("queryParam", BAS, httpCallBean
View Full Code Here

      root.addChildElement(
          envelope.createName("HeaderParam", BAS, httpCallBean
              .getNameSpace())).addTextNode(headerParam);
     
      root.addChildElement(
          envelope.createName("queryParam", BAS, httpCallBean
              .getNameSpace())).addTextNode(queryParam);
     
     
    } catch (SOAPException e) {
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.