If you're using the nightly build, the messaging example will work fine, and
you can skip the rest of this message. But that example does not work if you
are using alpha 3. The problem is that the required signature for the service
has changed. In alpha3, the service has to receive and return a Document
object, while the current version uses an array of Element objects.
Here's the relevant client side code for alpha3:
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
// the next line may throw a javax.xml.parsers.ParserConfigurationException
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.newDocument();
// build document here....
Object[] args = new Object[1];
args[0] = new SOAPBodyElement(doc.getDocumentElement());
Vector result = (Vector) call.invoke( args );
SOAPBodyElement body = (SOAPBodyElement) result.elementAt(0);
Element elem = body.getAsDOM();
The signature for the service operation is:
public Document methodName(MessageContext msgContext, Document xml)
I learned this as a result of asking on the list about a week ago. One of the
things that helped me understand what to do with messages was to go to the CVS
archive and get the version of Admin.java and AdminClient.java that existed at
the time alpha3 was built.
Hope this helps.
Steven Gollery
Doug Davis wrote:
> Look at the latest version of the code - there's a messaging sample in
> there.
> Plus you can look at how the AdminClient does its job - it doesn't use RPC.
> -Dug
>
> "Frank van Lingen" <[EMAIL PROTECTED]> on 03/04/2002 09:29:32 PM
>
> Please respond to [EMAIL PROTECTED]
>
> To: <[EMAIL PROTECTED]>
> cc: <[EMAIL PROTECTED]>
> Subject: axis message example
>
> Hi,
>
> The only example in axis that deals with messages is "proxy". However,
> this seems not to be an complete example. Does anybody know (or has) a
> good stand alone example that uses messages instead of RPC?
>
> Frank van Lingen