Hello all again,
I need now to pass XML files between Web services. I'm thinking to use DOM
Documents, so my web service method would be (Test):
public Document mirrorMethod(Document doc){
return doc;
}
And in my client I'm calling the service:
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document documentXML = builder.parse("myXML.xml");
System.out.println(documentXML.getChildNodes().getLength());
String urlWS = "http://localhost:8080/axis/services/XMLService";
Object[] params = {documentXML};
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(urlWS);
call.setOperationName("doFilter");
Document saida = (Document) call.invoke(params);
System.out.print(saida.getChildNodes().getLength());
If you see my client I should print the same values of
getChildNodes().getLength(), but it isn't happening. My service return is
always 'null'.
Does anyone could identify why this isn't working? Is DOM Document the better
way to send and receive a XML file to a web service?
Thanks a lot for all help.
FabrÃcio.
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.