You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Xiao, Hui" <hu...@ugsplm.com> on 2004/01/28 19:25:48 UTC
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;
}
}
Re: How to invoke "Message" style services passing a DOM Document
Posted by Dhanush Gopinath <dh...@mahindrabt.com>.
Hi ...
Not an expert though just telling you some fundas.
the invoke() method expects normal objects like int , String etc. ..
Document may not be able to send as a parameter ( Dunno .. I say MAY NOT BE)
So just try the typeMapping and beanMapping options available in the package.
Read the User Guide for that .
Regards
Dhanush
----- Original Message -----
From: Xiao, Hui
To: axis-user@ws.apache.org
Cc: Xiao, Hui ; Currier, Jeff
Sent: Wednesday, January 28, 2004 11:55 PM
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;
}
}
*********************************************************
Disclaimer
This message (including any attachments) contains
confidential information intended for a specific
individual and purpose, and is protected by law.
If you are not the intended recipient, you should
delete this message and are hereby notified that
any disclosure, copying, or distribution of this
message, or the taking of any action based on it,
is strictly prohibited.
*********************************************************
Visit us at http://www.mahindrabt.com