Package javax.xml.soap

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


        logMessage(soapMessage);

     
        final SOAPConnection soapConnection = getSoapConnectionInstance();
        final SOAPMessage soapMessageReply =
            soapConnection.call(soapMessage, url);
        logger.info("\nSOAP response");
        logMessage(soapMessageReply);
        soapConnection.close();
       
        return soapMessageReply.getSOAPBody();
View Full Code Here


        ap2.setContent("Attachment content - Part 2", "text/plain");
        msg.addAttachmentPart(ap2);
       
        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

        {
           SOAPMessage message = this.createSOAPMessage(request);
           //Make the SAAJ Call now
           SOAPConnectionFactory soapConnectionFactory = SOAPConnectionFactory.newInstance();
           SOAPConnection connection = soapConnectionFactory.createConnection();
           SOAPMessage soapResponse = connection.call(message, endpointURL);
          
           SOAPBody soapBody = soapResponse.getSOAPBody();
           boolean hasFault = soapBody.hasFault();
           if(hasFault)
           {
View Full Code Here

        {
           SOAPMessage message = this.createSOAPMessage(request);
           //Make the SAAJ Call now
           SOAPConnectionFactory soapConnectionFactory = SOAPConnectionFactory.newInstance();
           SOAPConnection connection = soapConnectionFactory.createConnection();
           SOAPMessage soapResponse = connection.call(message, endpointURL);
          
           SOAPBody soapBody = soapResponse.getSOAPBody();
           boolean hasFault = soapBody.hasFault();
           if(hasFault)
           {
View Full Code Here

            URLEndpoint endpoint = new URLEndpoint (url);

            /**
             * Send SOAP message.
             */
            SOAPMessage resp = soapConnection.call(soapMessage, endpoint);

            /**
             * Print response to the std output.
             */
            resp.writeTo( System.out );
View Full Code Here

        SOAPElement element = request.getSOAPBody().addChildElement(new QName(EchoPayloadEndpoint.NAMESPACE, EchoPayloadEndpoint.LOCAL_PART));
        element.setTextContent("Hello World");

        SOAPConnection connection = connectionFactory.createConnection();

        SOAPMessage response = connection.call(request, url);

        assertXMLEqual(request.getSOAPPart(), response.getSOAPPart());
    }

View Full Code Here

                .addTextNode(name);

        URLEndpoint endpoint = new URLEndpoint(url);
        msg.saveChanges();

        SOAPMessage reply = connection.call(msg, endpoint);
        //System.out.println("Received reply from: " + endpoint);
        //reply.writeTo(System.out);
        connection.close();
    }
}
View Full Code Here

        Name name = envelope.createName("symbol");
        SOAPElement symbol = gltp.addChildElement(name);
        symbol.addTextNode(tickerSymbol);

        URLEndpoint endpoint = new URLEndpoint("http://66.28.98.121:9090/soap");
        SOAPMessage response = con.call(message, endpoint);
        con.close();

        SOAPPart sp = response.getSOAPPart();
        SOAPEnvelope se = sp.getEnvelope();
        SOAPBody sb = se.getBody();
View Full Code Here

                element.addAttribute(requestEnvelope.createName
                                     ("href"), "cid:" + attachment.getContentId());
            }
        }
        javax.xml.soap.SOAPMessage returnedSOAPMessage =
                soapConnection.call(soapMessage, endPointURLString);
        Iterator iterator = returnedSOAPMessage.getAttachments();
        if (!iterator.hasNext()) {
            //The wrong type of object that what was expected.
            System.out.println("Received problem response from server");
            throw new AxisFault("", "Received problem response from server", null, null);
View Full Code Here

        SOAPConnection connection = null;
        try {
            connection = getConnectionFactory().createConnection();

            SOAPMessage inMessage = marshaler.createSOAPMessage(exchange.getMessage("in"));
            SOAPMessage response = connection.call(inMessage, soapEndpoint);

            NormalizedMessage outMessage = exchange.createMessage();
            marshaler.toNMS(outMessage, response);

            answer(exchange, outMessage);
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.