Examples of SOAPConnection


Examples of javax.xml.soap.SOAPConnection

   public void testSOAPConnection() throws Exception
   {
      SOAPMessage reqMsg = getRequestMessage();
      URL epURL = new URL(TARGET_ENDPOINT_ADDRESS);
      SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
      SOAPMessage resMsg = con.call(reqMsg, epURL);
      SOAPEnvelope resEnv = resMsg.getSOAPPart().getEnvelope();

      String response = "";

      SOAPBody body = resEnv.getBody();
View Full Code Here

Examples of javax.xml.soap.SOAPConnection

   private SOAPMessage sendMessage(final String message) throws SOAPException, IOException
   {
      MessageFactory msgFactory = MessageFactory.newInstance();
      SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(message.getBytes()));

      SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
      SOAPMessage resMsg = con.call(reqMsg, TARGET_ENDPOINT_ADDRESS);

      return resMsg;
   }
View Full Code Here

Examples of javax.xml.soap.SOAPConnection

   public void testSOAPConnection() throws Exception
   {
      SOAPMessage reqMsg = getRequestMessage();
      URL epURL = new URL(TARGET_ENDPOINT_ADDRESS);
      SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
      SOAPMessage resMsg = con.call(reqMsg, epURL);
      SOAPEnvelope resEnv = resMsg.getSOAPPart().getEnvelope();

      String response = "";

      SOAPBody body = resEnv.getBody();
View Full Code Here

Examples of javax.xml.soap.SOAPConnection

         "  </ns1:echoString>" +
         " </env:Body>" +
         "</env:Envelope>";
     
      SOAPMessage reqMessage = factory.createMessage(null, new ByteArrayInputStream(reqStr.getBytes()));
      SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
      SOAPMessage resMessage = con.call(reqMessage, "http://" + getServerHost() + ":8080/jaxrpc-jbws1188");
      SOAPElement soapElement = (SOAPElement)resMessage.getSOAPBody().getChildElements().next();
      soapElement = (SOAPElement)soapElement.getChildElements().next();
      assertEquals("Hello Jimbo!", soapElement.getValue());
   }
View Full Code Here

Examples of javax.xml.soap.SOAPConnection

         "  </ns1:echoString>" +
         " </env:Body>" +
         "</env:Envelope>";
     
      SOAPMessage reqMessage = factory.createMessage(null, new ByteArrayInputStream(reqStr.getBytes()));
      SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
      SOAPMessage resMessage = con.call(reqMessage, "http://" + getServerHost() + ":8080/jaxrpc-jbws1188");
      SOAPElement soapElement = (SOAPElement)resMessage.getSOAPBody().getChildElements().next();
      soapElement = (SOAPElement)soapElement.getChildElements().next();
      assertEquals("Hello Jimbo!", soapElement.getValue());
   }
View Full Code Here

Examples of javax.xml.soap.SOAPConnection

   public void testProviderMessage() throws Exception
   {
      SOAPMessage reqMsg = getRequestMessage();
      URL epURL = new URL(TARGET_ENDPOINT_ADDRESS);
      SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
      SOAPMessage resMsg = con.call(reqMsg, epURL);
      SOAPEnvelope resEnv = resMsg.getSOAPPart().getEnvelope();
      Detail detail = resEnv.getBody().getFault().getDetail();
      assertNotNull(detail);
      SOAPElement exception = (SOAPElement)detail.getDetailEntries().next();
      assertNotNull(exception);
View Full Code Here

Examples of javax.xml.soap.SOAPConnection

            // 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

Examples of javax.xml.soap.SOAPConnection

      body.addDocument( JaxpUtils.toDocument( request.toString(  ) ) );
      SOAPHeader header = soapRequestMsg.getSOAPHeader(  );
      addWSAHeaders( header,
                     endpointUrl.toString(  ) );

      SOAPConnection soapConn        = SOAPConnectionFactory.newInstance(  ).createConnection(  );
      SOAPMessage    soapResponseMsg = soapConn.call( soapRequestMsg,
                                                      endpointUrl.toString(  ) );
      Iterator       propElemsIter =
         soapResponseMsg.getSOAPPart(  ).getEnvelope(  ).getBody(  ).getChildElements(  );
      List           propElemsList = toList( propElemsIter );
      SOAPElement[]  soapElemArray = (SOAPElement[]) propElemsList.toArray( new SOAPElement[0] );
View Full Code Here

Examples of javax.xml.soap.SOAPConnection

                                                                          ResourceProperties11Constants.NSPREFIX_WSRP,
                                                                          ResourceProperties11Constants.NSURI_WSRP ) );
      requestElem.addNamespaceDeclaration( propQName.getPrefix(  ),
                                           propQName.getNamespaceURI(  ) );
      SaajUtils.addTextNode( requestElem, propQName.getPrefix(  ) + ":" + propQName.getLocalPart(  ) );
      SOAPConnection soapConn        = SOAPConnectionFactory.newInstance(  ).createConnection(  );
      SOAPMessage    soapResponseMsg = soapConn.call( soapRequestMsg,
                                                      m_endpointRef.getAddress(  ).toString(  ) );
      Iterator       propElemsIter =
         soapResponseMsg.getSOAPPart(  ).getEnvelope(  ).getBody(  ).getChildElements(  );
      List           propElemsList = toList( propElemsIter );
      return (SOAPElement[]) propElemsList.toArray( new SOAPElement[0] );
View Full Code Here

Examples of javax.xml.soap.SOAPConnection

      LOG.debug( MSG.getMessage( Keys.EMITTING_TO_HTTP_DEST,
                                 getDestinationUrl(  ) ) );

      try
      {
         SOAPConnection soapConn = SOAPConnectionFactory.newInstance(  ).createConnection(  );
         SOAPMessage    response = soapConn.call( getNotification(  ),
                                                  getDestinationUrl(  ).toString(  ) );
         LOG.debug( MSG.getMessage( Keys.RESPONSE_TO_EMIT,
                                    response.toString(  ) ) );
      }
      catch ( SOAPException e )
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.