Package javax.xml.soap

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


      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


                                                                          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

                                 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

                ByteArrayOutputStream buffer = new ByteArrayOutputStream();
                inMessage.writeTo(buffer);
                logger.debug(new String(buffer.toByteArray()));
            }
           
            SOAPMessage response = connection.call(inMessage, soapEndpoint);
            if (response != null) {
                marshaler.toNMS(out, response);
                return true;
            } else {
                return false;
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

        jpegAttach.setContentId("submitSampleImage@apache.org");
        jpegAttach.setContentType("image/jpg");
        request.addAttachmentPart(jpegAttach);

        SOAPConnection sCon = SOAPConnectionFactory.newInstance().createConnection();
        SOAPMessage response = sCon.call(request, getAddress());

        int attachmentCount = response.countAttachments();
        assertTrue(attachmentCount == 2);

        Iterator attachIter = response.getAttachments();
View Full Code Here

        jpegAttach.setContentType("image/jpg");
        request.addAttachmentPart(jpegAttach);


        SOAPConnection sCon = SOAPConnectionFactory.newInstance().createConnection();
        SOAPMessage response = sCon.call(request, getAddress());

        int attachmentCount = response.countAttachments();
        assertTrue(attachmentCount == 2);

        Iterator attachIter = response.getAttachments();
View Full Code Here

                    "/test-resources" + File.separator + "soap-part-iso-8859-1.xml");
            SOAPMessage requestMessage = MessageFactory.newInstance().createMessage(mimeHeaders,fileInputStream);
           

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

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

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.