Hi
I am using a Messaging style service.
Following is the code.
Not sure whether ur looking for the same kind of thing.
 
  String url = ""http://localhost:5555/soap/servlet/messagerouter">http://localhost:5555/soap/servlet/messagerouter";
DocumentBuilder xdb = XMLParserUtils.getXMLDocBuilder();
   Document doc = xdb.parse (new InputSource ("file:///" + file.getAbsolutePath()));
Envelope msgEnv = Envelope.unmarshall (doc.getDocumentElement ());
   Message msg = new Message ();
   msg.send (new URL (url), "", msgEnv);
   SOAPTransport st = msg.getSOAPTransport ();
   BufferedReader br = st.receive ();

thanks and regards
hanmayya udgiri 
 

 -----Original Message-----
From: Xiao, Hui [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 28, 2004 11:56 PM
To: [EMAIL PROTECTED]
Cc: Xiao, Hui; Currier, Jeff
Subject: How to invoke "Message" style services passing a DOM Document

Dear experts,

 

I am trying to invoke the modified MessageService (see below) using

 

     call.invoke(mydoc);

 

where mydoc is of Document type. However, I got a compilation error because the above signature doesn’t exist in the org.apache.axis.client.Call definition. 
 
Is there anybody who knows how to invoke my service passing a DOM Document object? Thanks a lot,
 
Hui Xiao

 

 

package samples.message ;

 

import org.w3c.dom.Document;

 

/**

 * Simple message-style service sample.

 */

public class MessageService {

    /**

     * Service method, which simply echoes back any XML it receives.

     *

     * @param elems an array of DOM Elements, one for each SOAP body element

     * @return an array of DOM Elements to be sent in the response body

     */

    public Document echoElements(Document doc) {

        return doc;

    }

}

 

Confidentiality Notice

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.

Reply via email to