Package javax.xml.soap

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


       
        request.getSOAPPart().getEnvelope().getBody().addBodyElement(new QName("urn:test", "echo"));
        request.getMimeHeaders().addHeader("SOAPAction", soapAction);

        SOAPConnection sCon = SOAPConnectionFactory.newInstance().createConnection();
        sCon.call(request, getAddress());
        sCon.close();
       
        assertEquals(soapAction, lastSoapAction);
    }
   
View Full Code Here


        envelope.getHeader().removeContents();
        // Change the name of the body content so that the request is routed to the echo service
        ((SOAPElement)envelope.getBody().getChildElements().next()).setElementQName(new QName("echo"));
       
        SOAPConnection sCon = SOAPConnectionFactory.newInstance().createConnection();
        SOAPMessage response = sCon.call(request, getAddress());
        sCon.close();
       
        SOAPPart soapPart = response.getSOAPPart();
        SOAPElement textElement =
                (SOAPElement)soapPart.getEnvelope().getElementsByTagName("text").item(0);
View Full Code Here

            // Let the Echo service trigger a SOAP fault on every second call. This allows us to check
            // that the connection cleanup is done correctly also if the response is a SOAP fault.
            triggerFault = i % 2 == 0;
            if (triggerFault) {
                try {
                    conn.call(request, getAddress());
                    fail("Expected SOAPException");
                } catch (SOAPException ex) {
                    // Expected
                }
            } else {
View Full Code Here

                    fail("Expected SOAPException");
                } catch (SOAPException ex) {
                    // Expected
                }
            } else {
                SOAPMessage response = conn.call(request, getAddress());
                assertEquals(1000, ((Element)response.getSOAPBody().getFirstChild()).getChildNodes().getLength());
            }
        }
        conn.close();
    }
View Full Code Here

      debug( "Request for Execute" ); //$NON-NLS-1$
      logSoapMsg( msg );

      // run the call
      reply = connection.call( msg, url );

      debug( "Reply from Execute" ); //$NON-NLS-1$
      logSoapMsg( reply );

      // error check
View Full Code Here

      debug(
        Messages.getInstance().getString( "XMLABaseComponent.DEBUG_0006_DISCOVER_REQUEST" ) + request ); //$NON-NLS-1$
      logSoapMsg( msg );

      // run the call
      SOAPMessage reply = connection.call( msg, discoverUrl );

      debug(
        Messages.getInstance().getString( "XMLABaseComponent.DEBUG_0007_DISCOVER_RESPONSE" ) + request ); //$NON-NLS-1$
      logSoapMsg( reply );
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

        SOAPBodyElement bodyElement = body.addBodyElement(bodyName);
        Name name = envelope.createName("arg0");
        SOAPElement symbol = bodyElement.addChildElement(name);
        symbol.addTextNode("Hello");
        URLEndpoint endpoint = new URLEndpoint(AxisGeronimoUtils.getURL("axis/EchoHeaders.jws").toString());
        SOAPMessage response = con.call(message, endpoint);
        String responseEncoding = (String) response.getProperty(SOAPMessage.CHARACTER_SET_ENCODING);
        assertEquals(requestEncoding.toLowerCase(), responseEncoding.toLowerCase());
    }

    protected void tearDown() throws Exception {
View Full Code Here

      SOAPConnection con = conFac.createConnection();

      final String serviceURL = "http://" + getServerHost() + ":8080/saaj-soap-connection";

      URL endpoint = new URL(serviceURL);
      SOAPMessage response = con.call(msg, endpoint);
      QName sayHiResp = new QName("http://www.jboss.org/jbossws/saaj", "sayHelloResponse");

      Iterator<?> sayHiRespIterator = response.getSOAPBody().getChildElements(sayHiResp);
      SOAPElement soapElement = (SOAPElement) sayHiRespIterator.next();
      assertNotNull(soapElement);
View Full Code Here

            throws SOAPException {
        SOAPConnection connection = null;
        SOAPMessage response = null;
        try {
            connection = createConnection();
            response = connection.call(message, url);
        } finally {
            if (connection != null) {
                closeConnection(connection);
            }
        }
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.