Package javax.xml.soap

Examples of javax.xml.soap.MessageFactory.createMessage()


      try
      {
         //now call
         wsaSOAPConnection sconn = wsaSOAPConnection.newInstance(  );
         MessageFactory    mf    = MessageFactory.newInstance(  );
         SOAPMessage       soapm = mf.createMessage(  );

         //put XMLbean into SOAPBody
         soapm.getSOAPBody(  ).addDocument( (org.w3c.dom.Document) sdom.newDomNode(  ) );
         SOAPMessage                   subscribeResponse = sconn.call( soapm,
                                                                       epr.getAddress(  ).toString(  ) );
View Full Code Here


      try
      {
         //now call
         wsaSOAPConnection sconn = wsaSOAPConnection.newInstance(  );
         MessageFactory    mf    = MessageFactory.newInstance(  );
         SOAPMessage       soapm = mf.createMessage(  );

         //put XMLbean into SOAPBody
         soapm.getSOAPBody(  ).addDocument( (org.w3c.dom.Document) sdom.newDomNode(  ) );
         SOAPMessage                   subscribeResponse = sconn.call( soapm,
                                                                       epr.getAddress(  ).toString(  ) );
View Full Code Here

    private SOAPMessage prepareSOAPMessage(String resouceName) throws Exception {
        InputStream is = this.getClass().getResourceAsStream(resouceName);
        SOAPMessage soapMessage = null;
        MessageFactory factory = MessageFactory.newInstance();
        MimeHeaders mhs = null;
        soapMessage = factory.createMessage(mhs, is);
        return soapMessage;
    }

    private CachedStream prepareOutputStreamFromResource(String resouceName) throws Exception {
        SOAPMessage soapMessage = prepareSOAPMessage(resouceName);
View Full Code Here

    @Test
    public void testSWA() throws Exception {
        SOAPFactory soapFac = SOAPFactory.newInstance();
        MessageFactory msgFac = MessageFactory.newInstance();
        SOAPConnectionFactory conFac = SOAPConnectionFactory.newInstance();
        SOAPMessage msg = msgFac.createMessage();
       
        QName sayHi = new QName("http://apache.org/hello_world_rpclit", "sayHiWAttach");
        msg.getSOAPBody().addChildElement(soapFac.createElement(sayHi));
        AttachmentPart ap1 = msg.createAttachmentPart();
        ap1.setContent("Attachment content", "text/plain");
View Full Code Here

      try
      {
         //now call
         wsaSOAPConnection sconn = wsaSOAPConnection.newInstance(  );
         MessageFactory    mf    = MessageFactory.newInstance(  );
         SOAPMessage       soapm = mf.createMessage(  );

         //put XMLbean into SOAPBody
         soapm.getSOAPBody(  ).addDocument( (org.w3c.dom.Document) rdom.newDomNode(  ) );

         sconn.call( soapm,
View Full Code Here

      try
      {
         //now call
         wsaSOAPConnection sconn = wsaSOAPConnection.newInstance(  );
         MessageFactory    mf    = MessageFactory.newInstance(  );
         SOAPMessage       soapm = mf.createMessage(  );

         //put XMLbean into SOAPBody
         soapm.getSOAPBody(  ).addDocument( (org.w3c.dom.Document) usdom.newDomNode(  ) );

         sconn.call( soapm,
View Full Code Here

        SOAPMessage soapRes = null;

        try
        {
            MessageFactory msgFactory = MessageFactory.newInstance();
            soapReq = msgFactory.createMessage(null, req.getInputStream());
            soapRes = msgFactory.createMessage();
            if(log.isDebugEnabled())
            {
               ByteArrayOutputStream bs = new ByteArrayOutputStream();
               soapReq.writeTo(bs);
View Full Code Here

        try
        {
            MessageFactory msgFactory = MessageFactory.newInstance();
            soapReq = msgFactory.createMessage(null, req.getInputStream());
            soapRes = msgFactory.createMessage();
            if(log.isDebugEnabled())
            {
               ByteArrayOutputStream bs = new ByteArrayOutputStream();
               soapReq.writeTo(bs);
               log.debug("Request received::"+bs.toString());
View Full Code Here

    {
       String prefix = "uddi";
       MessageFactory msgFactory = MessageFactory.newInstance();
       SOAPFactory factory = SOAPFactory.newInstance();
      
       SOAPMessage message = msgFactory.createMessage();
       message.getSOAPHeader().detachNode();
       SOAPPart soapPart = message.getSOAPPart();
       SOAPBody soapBody = soapPart.getEnvelope().getBody();
       //Create the outer body element
       String uddins = IRegistry.UDDI_V2_NAMESPACE;
View Full Code Here

    {
       String prefix = "uddi";
       MessageFactory msgFactory = MessageFactory.newInstance();
       SOAPFactory factory = SOAPFactory.newInstance();
      
       SOAPMessage message = msgFactory.createMessage();
       message.getSOAPHeader().detachNode();
       SOAPPart soapPart = message.getSOAPPart();
       SOAPBody soapBody = soapPart.getEnvelope().getBody();
       //Create the outer body element
       String uddins = IRegistry.UDDI_V2_NAMESPACE;
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.