Package javax.xml.soap

Examples of javax.xml.soap.SOAPMessage


       
        String replyBuffer;
       
        public void handleResponse(Response<SOAPMessage> response) {
            try {
                SOAPMessage reply = response.get();
                replyBuffer = reply.getSOAPBody().getTextContent();
            } catch (Exception e) {
                e.printStackTrace();
            }           
        }
View Full Code Here


    }

    public SAXSource invoke(SAXSource request) {
        SAXSource response = new SAXSource();
        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();
            }
View Full Code Here

   
    public void setUp() throws IOException, SOAPException {
        is =  getClass().getResourceAsStream("GreetMeDocLiteralReq.xml");
        is2 =  getClass().getResourceAsStream("GreetMeDocLiteralReq.xml");
        is3 =  getClass().getResourceAsStream("GreetMeDocLiteralReq.xml");
        SOAPMessage msg = MessageFactory.newInstance().createMessage(null, is);
        domSource = new DOMSource(msg.getSOAPPart());
        saxSource = new SAXSource(new InputSource(is2));
        streamSource = new StreamSource(is3);
        soapMsg = MessageFactory.newInstance().createMessage();
        assertNotNull(soapMsg);
    }
View Full Code Here

            new TestDynamicDataBindingCallback(DOMSource.class, Mode.MESSAGE);       
        TestSOAPMessageDataWriter<SOAPMessage> soapMessageDataWriter =
            new TestSOAPMessageDataWriter<SOAPMessage>(callback);
        obj = domSource;
        soapMessageDataWriter.write(obj, soapMsg);
        SOAPMessage soapMessage = soapMessageDataWriter.getTestSOAPMessage();
        assertTrue("TextContent should be TestSOAPInputMessage",
                   "TestSOAPInputMessage".equals(soapMessage.getSOAPBody().getFirstChild().getTextContent()));
       
    }
View Full Code Here

            new TestDynamicDataBindingCallback(SAXSource.class, Mode.MESSAGE);       
        TestSOAPMessageDataWriter<SOAPMessage> soapMessageDataWriter =
            new TestSOAPMessageDataWriter<SOAPMessage>(callback);
        obj = saxSource;
        soapMessageDataWriter.write(obj, soapMsg);
        SOAPMessage soapMessage = soapMessageDataWriter.getTestSOAPMessage();
        assertTrue("TextContent should be TestSOAPInputMessage",
                   "TestSOAPInputMessage".equals(soapMessage.getSOAPBody().getFirstChild().getTextContent()));
     
    }
View Full Code Here

            new TestDynamicDataBindingCallback(StreamSource.class, Mode.MESSAGE);       
        TestSOAPMessageDataWriter<SOAPMessage> soapMessageDataWriter =
            new TestSOAPMessageDataWriter<SOAPMessage>(callback);
        obj = streamSource;
        soapMessageDataWriter.write(obj, soapMsg);
        SOAPMessage soapMessage = soapMessageDataWriter.getTestSOAPMessage();
        assertTrue("TextContent should be TestSOAPInputMessage",
                   "TestSOAPInputMessage".equals(soapMessage.getSOAPBody().getFirstChild().getTextContent()));
     
    }
View Full Code Here

        return outbound;
    }
   
    private void record(StreamMessageContext context) {       
        if (ContextUtils.isOutbound(context)) {
            SOAPMessage sm = (SOAPMessage)context.get("org.objectweb.celtix.bindings.soap.message");
            outbound.add(sm);
        }
    }
View Full Code Here

    }

    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();
            }
View Full Code Here

   
    public void setUp() throws IOException, SOAPException {
        is =  getClass().getResourceAsStream("GreetMeDocLiteralReq.xml");
        is2 =  getClass().getResourceAsStream("GreetMeDocLiteralSOAPBodyReq.xml");
        is3 =  getClass().getResourceAsStream("GreetMeDocLiteralSOAPBodyReq.xml");
        SOAPMessage msg = MessageFactory.newInstance().createMessage(null, is);
        domSource = new DOMSource(msg.getSOAPBody().extractContentAsDocument());
        saxSource = new SAXSource(new InputSource(is2));
        streamSource = new StreamSource(is3);
        soapMsg = MessageFactory.newInstance().createMessage();
        assertNotNull(soapMsg);
    }
View Full Code Here

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

            while (n.getNodeType() != Node.ELEMENT_NODE) {
View Full Code Here

TOP

Related Classes of javax.xml.soap.SOAPMessage

Copyright © 2018 www.massapicom. 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.