Examples of SOAPBody


Examples of javax.xml.soap.SOAPBody

    public StreamSource invoke(StreamSource request) {
        StreamSource response = new StreamSource();
        try {
            SOAPMessage msg = factory.createMessage();
            msg.getSOAPPart().setContent(request);
            SOAPBody body = msg.getSOAPBody();
            Node n = body.getFirstChild();

            while (n.getNodeType() != Node.ELEMENT_NODE) {
                n = n.getNextSibling();
            }
            if (n.getLocalName().equals(sayHi.getLocalPart())) {
View Full Code Here

Examples of javax.xml.soap.SOAPBody

        TestDynamicDataBindingCallback callback = 
            new TestDynamicDataBindingCallback(DOMSource.class, Mode.PAYLOAD);       
        TestSOAPBodyDataWriter<SOAPBody> soapBodyDataWriter = new TestSOAPBodyDataWriter<SOAPBody>(callback);
        obj = domSource;
        soapBodyDataWriter.write(obj, soapMsg.getSOAPBody());
        SOAPBody soapBody = soapBodyDataWriter.getTestSOAPBody();
        assertTrue("TextContent should be TestSOAPInputMessage",
                   "TestSOAPInputMessage".equals(soapBody.getFirstChild().getTextContent()));
       
    }
View Full Code Here

Examples of javax.xml.soap.SOAPBody

        TestDynamicDataBindingCallback callback = 
            new TestDynamicDataBindingCallback(SAXSource.class, Mode.PAYLOAD);       
        TestSOAPBodyDataWriter<SOAPBody> soapBodyDataWriter = new TestSOAPBodyDataWriter<SOAPBody>(callback);
        obj = saxSource;
        soapBodyDataWriter.write(obj, soapMsg.getSOAPBody());
        SOAPBody soapBody = soapBodyDataWriter.getTestSOAPBody();
        assertTrue("TextContent should be TestSOAPInputMessage",
                   "TestSOAPInputMessage".equals(soapBody.getFirstChild().getTextContent()));
     
    }
View Full Code Here

Examples of javax.xml.soap.SOAPBody

        TestDynamicDataBindingCallback callback = 
            new TestDynamicDataBindingCallback(StreamSource.class, Mode.PAYLOAD);       
        TestSOAPBodyDataWriter<SOAPBody> soapBodyDataWriter = new TestSOAPBodyDataWriter<SOAPBody>(callback);
        obj = streamSource;
        soapBodyDataWriter.write(obj, soapMsg.getSOAPBody());
        SOAPBody soapBody = soapBodyDataWriter.getTestSOAPBody();
        assertTrue("TextContent should be TestSOAPInputMessage",
                   "TestSOAPInputMessage".equals(soapBody.getFirstChild().getTextContent()));
     
    }
View Full Code Here

Examples of javax.xml.soap.SOAPBody

            new TestDynamicDataBindingCallback(jc, Mode.PAYLOAD);       
        TestSOAPBodyDataWriter<SOAPBody> soapBodyDataWriter = new TestSOAPBodyDataWriter<SOAPBody>(callback);
        GreetMe greetMe = new GreetMe();
        greetMe.setRequestType("DIPLO");
        soapBodyDataWriter.write(greetMe, soapMsg.getSOAPBody());
        SOAPBody soapBody = soapBodyDataWriter.getTestSOAPBody();
        assertTrue("TextContent should be DIPLO",
                   "DIPLO".equals(soapBody.getFirstChild().getTextContent()));
     
    }
View Full Code Here

Examples of javax.xml.soap.SOAPBody

    }
   
    public SOAPMessage invoke(SOAPMessage request) {
        SOAPMessage response = null;       
        try {
            SOAPBody body = request.getSOAPBody();
            Node n = body.getFirstChild();

            while (n.getNodeType() != Node.ELEMENT_NODE) {
                n = n.getNextSibling();
            }
            if (n.getLocalName().equals(sayHi.getLocalPart())) {
View Full Code Here

Examples of javax.xml.soap.SOAPBody

    public DOMSource invoke(DOMSource request) {
        DOMSource response = new DOMSource();
        try {
            SOAPMessage msg = factory.createMessage();
            msg.getSOAPPart().setContent(request);
            SOAPBody body = msg.getSOAPBody();
            Node n = body.getFirstChild();

            while (n.getNodeType() != Node.ELEMENT_NODE) {
                n = n.getNextSibling();
            }
            if (n.getLocalName().equals(sayHi.getLocalPart())) {
View Full Code Here

Examples of javax.xml.soap.SOAPBody

      MimeHeaders mh = message.getMimeHeaders();
      mh.setHeader("SOAPAction", "\"urn:schemas-microsoft-com:xml-analysis:Execute\"");

      SOAPPart soapPart = message.getSOAPPart();
      SOAPEnvelope envelope = soapPart.getEnvelope();
      SOAPBody body = envelope.getBody();
      Name nEx = envelope.createName("Execute", "", XMLA_URI);

      SOAPElement eEx = body.addChildElement(nEx);

      // add the parameters

      // COMMAND parameter
      // <Command>
View Full Code Here

Examples of javax.xml.soap.SOAPBody

   */
  protected void parseResult(SOAPMessage reply) throws SOAPException
  {
    SOAPPart soapPart = reply.getSOAPPart();
    SOAPEnvelope soapEnvelope = soapPart.getEnvelope();
    SOAPBody soapBody = soapEnvelope.getBody();
    SOAPElement eElement = null;

    if (log.isDebugEnabled())
    {
      log.debug("XML/A result envelope: " + soapEnvelope.toString());
    }
   
    SOAPFault fault = soapBody.getFault();
    if (fault != null)
    {
      handleResultFault(fault);
    }
   
    Name eName = soapEnvelope.createName("ExecuteResponse", "", XMLA_URI);

    // Get the ExecuteResponse-Node
    Iterator responseElements = soapBody.getChildElements(eName);
    if (responseElements.hasNext())
    {
      Object eObj = responseElements.next();
      if (eObj == null)
      {
View Full Code Here

Examples of net.rim.device.api.io.parser.soap.SOAPBody

    private void displaySoap(final Message message) {
        final Object soap = message.getObjectPayload();

        final SOAPEnvelope env = (SOAPEnvelope) soap;
        final SOAPHeader header = env.getHeader();
        final SOAPBody body = env.getBody();

        String str = "====== Envelope:";
        str += "\nName: " + env.getName();
        str += "\nNamespace: " + env.getNamespace();
        str += "\n====== Header:";
        if (header != null) {
            str += "\nName: " + header.getName();
            str += "\nNamespace: " + header.getNamespace();
            str += "\nNumber of children: " + header.getChildren().size();
        } else {
            str += "\n null";
        }

        str += "\n====== Body:";
        if (body != null) {
            str += "\nName: " + body.getName();
            str += "\nNamespace: " + body.getNamespace();

            final Vector children = body.getChildren();

            str += "\nNumber of children: " + children.size();
            for (int i = 0; i < children.size(); i++) {
                final SOAPElement element = (SOAPElement) children.elementAt(i);
                if (element != 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.