Hi,
I'm tring to pass a DOM document to a message-style web service in Axis.
I have deployed a service with the following signature:
public Document myMethod(Document body)
How can I invoke this service from client side? Actually, I cannot find something like "call.invoke(Document doc)".
I've try to use the following methods:
"DOMParser parser = new DOMParser();
parser.parse("File:///c:/myfile.xml");
Document doc=parser.getDocument();
Document dom=(Document)call.invoke(new Object[]{doc});"
and I always got the error:
faultString: java.io.IOException: No serializer found for class org.apache.xerces.dom.DeferredDocumentImpl in registry org.apache.axis.encoding.TypeMappingImpl@5e13ad
Anyone can help me figure it out? or should I set a proxy first?
by the way, I'm using Axis 1.1 and Xerces parser.
Thanks,
Herman
-
How to send DOM document in Axis? (2 messages)
- Posted by: Herman Lu
- Posted on: May 13 2003 22:07 EDT
Threaded Messages (2)
- How to send DOM document in Axis? by Jason McKerr on May 15 2003 12:00 EDT
- How to send DOM document in Axis? by Herman Lu on May 15 2003 19:06 EDT
-
How to send DOM document in Axis?[ Go to top ]
- Posted by: Jason McKerr
- Posted on: May 15 2003 12:00 EDT
- in response to Herman Lu
The Axis engiine doesn't support serializer/deserializer for DOM Document object. You can either write your own and register it, or use an Element[] something like this:
public static Element[] getDoc() throws Exception {
DOMParser parser = new DOMParser();
parser.parse("File:///c:/myfile.xml");
Document doc=parser.getDocument();
Element[] result = new Element[1];
result[0] = doc.getDocumentElement();
return result;
} -
How to send DOM document in Axis?[ Go to top ]
- Posted by: Herman Lu
- Posted on: May 15 2003 19:06 EDT
- in response to Jason McKerr
Thanks. It's helpful.