Package javax.xml.soap

Examples of javax.xml.soap.SOAPHeader.detachNode()


    public void testHeader() throws Exception {
        SOAPEnvelope env = new org.apache.axis.message.SOAPEnvelope();
        SOAPHeader h1 = env.getHeader();
        assertTrue("null initial header", h1 != null);
        h1.detachNode();
        assertTrue("header not freed", env.getHeader() == null);
        SOAPHeader h2 = env.addHeader();
        assertTrue("null created header", h2 != null);
        assertEquals("wrong header retrieved", h2, env.getHeader());
        assertEquals("header parent incorrect", env,
View Full Code Here


        SOAPEnvelope se = sp.getEnvelope();
        smsg.writeTo(System.out);
        assertTrue(se != null);
        SOAPHeader header = se.getHeader();
        assertNotNull(header);
        header.detachNode();
        assertNull(se.getHeader());
        assertNull(smsg.getSOAPHeader());
    }

    public void testDetachBody() {
View Full Code Here

        SOAPEnvelope envelope = soapPart.getEnvelope();

        SOAPHeader header = envelope.getHeader();
        SOAPBody body = envelope.getBody();

        header.detachNode();

        Name bodyName = envelope.createName("getQuote", "n", "urn:xmethods-delayed-quotes");
        SOAPBodyElement gltp = body.addBodyElement(bodyName);

        Name name = envelope.createName("symbol");
View Full Code Here

      SOAPMessage resMsg = dispatch.invoke(reqMsg);
      SOAPEnvelope resEnv = resMsg.getSOAPPart().getEnvelope();
     
      SOAPHeader soapHeader = resEnv.getHeader();
      if (soapHeader != null)
         soapHeader.detachNode();
     
      assertEquals(DOMUtils.parse(msgString), resEnv);
   }

   public void testProviderMessage() throws Exception
View Full Code Here

      SOAPMessage resMsg = con.call(reqMsg, epURL);
      SOAPEnvelope resEnv = resMsg.getSOAPPart().getEnvelope();

      SOAPHeader soapHeader = resEnv.getHeader();
      if (soapHeader != null)
         soapHeader.detachNode();
     
      assertEquals(reqEnv, resEnv);
   }

   private SOAPMessage getRequestMessage() throws SOAPException, IOException
View Full Code Here

      // Get the SOAP header from the envelope
      SOAPHeader header = envelope.getHeader();        

      // The client does not yet support SOAP headers
      header.detachNode();

      // Get the SOAP body from the envelope and populate it
      SOAPBody body = envelope.getBody();

      // Create the default namespace for the SOAP body
View Full Code Here

      // Get the SOAP header from the envelope
      SOAPHeader header = envelope.getHeader();        

      // The client does not yet support SOAP headers
      header.detachNode();

      // Get the SOAP body from the envelope and populate it
      SOAPBody body = envelope.getBody();

      // Create the default namespace for the SOAP body
View Full Code Here

    public void testHeader() throws Exception {
        SOAPEnvelope env = new org.apache.axis.message.SOAPEnvelope();
        SOAPHeader h1 = env.getHeader();
        assertTrue("null initial header", h1 != null);
        h1.detachNode();
        assertTrue("header not freed", env.getHeader() == null);
        SOAPHeader h2 = env.addHeader();
        assertTrue("null created header", h2 != null);
        assertEquals("wrong header retrieved", h2, env.getHeader());
        assertEquals("header parent incorrect", env,
View Full Code Here

      SOAPMessage resMsg = dispatch.invoke(reqMsg);
      SOAPEnvelope resEnv = resMsg.getSOAPPart().getEnvelope();
     
      SOAPHeader soapHeader = resEnv.getHeader();
      if (soapHeader != null)
         soapHeader.detachNode();
     
      assertEquals(DOMUtils.parse(msgString), resEnv);
   }

   public void testProviderMessage() throws Exception
View Full Code Here

      SOAPMessage resMsg = con.call(reqMsg, epURL);
      SOAPEnvelope resEnv = resMsg.getSOAPPart().getEnvelope();

      SOAPHeader soapHeader = resEnv.getHeader();
      if (soapHeader != null)
         soapHeader.detachNode();
     
      assertEquals(reqEnv, resEnv);
   }

   private SOAPMessage getRequestMessage() throws SOAPException, IOException
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.