Package javax.xml.soap

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


        assertFalse(soapBody.getChildElements().hasNext());
       
        QName qname1 = new QName("http://wombat.ztrade.com",
                                 "GetLastTradePrice", "ztrade");
        SOAPElement child = soapBody.addChildElement(qname1);
        child.addTextNode("foo");
       
        assertTrue(child.getChildElements().hasNext());
       
        Node textNode = (Node)child.getChildElements().next();
View Full Code Here


            Name bodyElementName = new NameImpl(qName.getLocalPart(), qName.getPrefix(), qName.getNamespaceURI());

            if (fragmentRootCursor == null)
            {
               SOAPBodyElementDoc docBodyElement = new SOAPBodyElementDoc(bodyElementName);
               docBodyElement = (SOAPBodyElementDoc)soapBody.addChildElement(docBodyElement);

               destElement = docBodyElement;
               fragmentRootCursor = qName;
            }
View Full Code Here

         // payload is fault
         if (atPartMargin())
         {
            SOAPBody soapBody = soapEnv.getBody();
            SOAPFaultImpl soapFault = new SOAPFaultImpl(soapEnv.getPrefix(), soapEnv.getNamespaceURI());
            soapBody.addChildElement(soapFault);
            destElement = soapFault;
            previousPart = Part.FAULT;
         }

         if (fragmentRootCursor == null)
View Full Code Here

               if (log.isDebugEnabled())
                  log.debug("Create RPC body element: " + opName);

               soapBodyElement = new SOAPBodyElementRpc(opName);
               soapBodyElement = (SOAPBodyElement)soapBody.addChildElement(soapBodyElement);

               // Add soap encodingStyle
               if (opMetaData.getUse() == Use.ENCODED)
               {
                  String envURI = soapEnvelope.getNamespaceURI();
View Full Code Here

         {
            QName opQName = opMetaData.getResponseName();

            Name opName = new NameImpl(namespaceRegistry.registerQName(opQName));
            soapBodyElement = new SOAPBodyElementRpc(opName);
            soapBodyElement = (SOAPBodyElement)soapBody.addChildElement(soapBodyElement);

            // Add soap encodingStyle
            if (opMetaData.getUse() == Use.ENCODED)
            {
              String envURI = soapEnvelope.getNamespaceURI();
View Full Code Here

      SOAPMessage soapMessage = msgFactory.createMessage();
      SOAPEnvelope env = soapMessage.getSOAPPart().getEnvelope();
      SOAPBody body = env.getBody();

      Name name = soapFactory.createName("MyChild1");
      SOAPElement se = body.addChildElement(name);
      assertNotNull("Expected an element", se);

      assertEquals("Expected 1 child element", 1, getIteratorCount(body.getChildElements()));

      SOAPElement se2 = (SOAPElement)body.getChildElements().next();
View Full Code Here

      String u = "myURI";

      body.addNamespaceDeclaration(p, u);
      assertEquals(u, body.getNamespaceURI(p));

      SOAPElement se = body.addChildElement(s, p);
      assertNotNull("Expected an element", se);

      assertEquals("Expected 1 child element", 1, getIteratorCount(body.getChildElements()));

      SOAPElement se2 = (SOAPElement)body.getChildElements().next();
View Full Code Here

            if (log.isDebugEnabled())
               log.debug("Create RPC body element: " + opName);

            soapBodyElement = new SOAPBodyElementRpc(opName);
            soapBodyElement = (SOAPBodyElement)soapBody.addChildElement(soapBodyElement);

            // Add soap encodingStyle
            if (opMetaData.getUse() == Use.ENCODED)
            {
               String envURI = soapEnvelope.getNamespaceURI();
View Full Code Here

         {
            QName opQName = opMetaData.getResponseName();

            Name opName = new NameImpl(namespaceRegistry.registerQName(opQName));
            soapBodyElement = new SOAPBodyElementRpc(opName);
            soapBodyElement = (SOAPBodyElement)soapBody.addChildElement(soapBodyElement);

            // Add soap encodingStyle
            if (opMetaData.getUse() == Use.ENCODED)
            {
               String envURI = soapEnvelope.getNamespaceURI();
View Full Code Here

            Name bodyElementName = new NameImpl(qName.getLocalPart(), qName.getPrefix(), qName.getNamespaceURI());

            if (fragmentRootCursor == null)
            {
               SOAPBodyElementDoc docBodyElement = new SOAPBodyElementDoc(bodyElementName);
               docBodyElement = (SOAPBodyElementDoc)soapBody.addChildElement(docBodyElement);

               destElement = docBodyElement;
               fragmentRootCursor = qName;
            }
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.