Package javax.xml.soap

Examples of javax.xml.soap.SOAPConnection.call()


        msg.addAttachmentPart(ap2);
        msg.saveChanges();
       
        SOAPConnection con = conFac.createConnection();
        URL endpoint = new URL("http://localhost:9008/SOAPServiceProviderRPCLit/SoapPortProviderRPCLit1");
        SOAPMessage response = con.call(msg, endpoint);
        QName sayHiResp = new QName("http://apache.org/hello_world_rpclit", "sayHiResponse");
        assertNotNull(response.getSOAPBody().getChildElements(sayHiResp));
        assertEquals(2, response.countAttachments());
    }
View Full Code Here


            SOAPBody requestBody = requestEnvelope.getBody();
            requestBody.addDocument(document);

            // Send SOAP request
            SOAPConnection connection = soapConnectionFactory.createConnection();
            SOAPMessage responseMessage = connection.call(requestMessage, stiServiceURL);

            // Get STI response
            SOAPEnvelope responseEnvelope = responseMessage.getSOAPPart().getEnvelope();
            SOAPBody responseBody = responseEnvelope.getBody();
View Full Code Here

        msg.saveChanges();
       
        SOAPConnection con = conFac.createConnection();
        URL endpoint = new URL("http://localhost:" + PORT
                               + "/SOAPServiceProviderRPCLit/SoapPortProviderRPCLit1");
        SOAPMessage response = con.call(msg, endpoint);
        QName sayHiResp = new QName("http://apache.org/hello_world_rpclit", "sayHiResponse");
        assertNotNull(response.getSOAPBody().getChildElements(sayHiResp));
        assertEquals(2, response.countAttachments());
    }
View Full Code Here

            appendNodes (env, body, bodyContent);
           
            // Now invoke with the created message
            SOAPMessage response = null;
            try {
                response = connection.call(message, new URL(endpoint));
            } catch (SOAPException e) {
                if (e.getMessage().indexOf("ConnectException") >= 0) {
                    // Axis way of reporting this
                    if (logger.isDebugEnabled()) {
                        logger.debug
View Full Code Here

            endpoint = new URL(WFXML_SERVLET);
        } catch (MalformedURLException e) {
           throw new SOAPException(e.getMessage(), e);
        }
       
        return connection.call(request, endpoint);
    }
   
    /**
     * Retrieves the given key from the header of the given message.
     * @param message the message to inspect.
View Full Code Here

        throws SOAPException, MalformedURLException {
        SOAPConnectionFactory factory = SOAPConnectionFactory.newInstance();
        SOAPConnection connection = factory.createConnection();
       
        URL endpoint = new URL(observer);
        connection.call(message, endpoint);
    }

}
View Full Code Here

            // Create a url endpoint for the recipient of the message.
            URL urlEndpoint = new URL("http://localhost:8080/ReceivingSOAP11Servlet");

            // Send the message to the endpoint using the connection.
            SOAPConnection con = new SOAPConnectionImpl();
            SOAPMessage replymsg = con.call(msg, urlEndpoint);

            // Check if reply message
            if (!validateReplyMessage(replymsg, 1)) {
                //Reply message is correct
            } else {
View Full Code Here

        } catch (SOAPException e) {
            fail("Unexpected Exception " + e);
        }

        try {
            sCon.call(null, new Object());
            fail("Expected Exception did not occur");
        } catch (SOAPException e) {
            assertTrue(true);
        }
    }
View Full Code Here

            //Namespace prefix is empty
            body.addBodyElement(new QName("http://fakeNamespace2.org","echo"))
                          .addTextNode("This is some text");

            SOAPConnection sCon = SOAPConnectionFactory.newInstance().createConnection();
            SOAPMessage response = sCon.call(request, getAddress());
            assertFalse(response.getAttachments().hasNext());
            assertEquals(0, response.countAttachments());

            String requestStr = printSOAPMessage(request);
            String responseStr = printSOAPMessage(response);
View Full Code Here

            SOAPMessage request = mf.createMessage();

            createSimpleSOAPPart(request);

            SOAPConnection sCon = SOAPConnectionFactory.newInstance().createConnection();
            SOAPMessage response = sCon.call(request, getAddress());
            assertFalse(response.getAttachments().hasNext());
            assertEquals(0, response.countAttachments());

            String requestStr = printSOAPMessage(request);
            String responseStr = printSOAPMessage(response);
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.