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 Kenneth Lee <Ke...@KennethLee.org> on 2004/05/11 00:54:22 UTC
Message service has to many layers
Here is the contents from the posted message in tcpmon for a message
service:
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<getXML xmlns="http://webservice">
<getXML xsi:type="ns1:Document"
xmlns:ns1="http://xml.apache.org/xml-soap">
<Query xmlns="">Select * from decode</Query>
</getXML>
</getXML>
</soapenv:Body>
</soapenv:Envelope>
I get the correct message back in the right format. I don't understand
why there are two levels of <getXML . > in this post. Is this wrong? I
get error messages in my ClientTestStub program, but the return window
in tcpmon looks great. I don't get it.
The message in my test is:
C:\JavaDev\msgDocWS>ant foxproclientstub.run
Buildfile: build.xml
foxproclientstub.run:
[java] EXCEPTION in ClientFoxproStub.main: null
[java] java.lang.ClassCastException
[java] at client.ClientFoxproStub.main(Unknown Source)
BUILD SUCCESSFUL
Total time: 4 seconds
C:\JavaDev\msgDocWS>
The test code is:
public static void main(String[] args) {
try {
MSGDocWSServiceLocator serviceLocator = new
MSGDocWSServiceLocator();
MSGDocWSSoapBindingStub stub =
(MSGDocWSSoapBindingStub)serviceLocator.getMSGDocWS(new URL
("http://localhost:8081/axis/services/MSGDocWS"));
String sXML = "<Query>Select * from
decode</Query>";
org.w3c.dom.Document doc =
XMLUtils.stringToDocument(sXML);
org.w3c.dom.Document docReturnValue;
docReturnValue =
(org.w3c.dom.Document)stub.getXML(doc);
} catch (Exception e) {
System.out.println("EXCEPTION in
ClientFoxproStub.main: " + e.getMessage());
e.printStackTrace(System.out);
}
Thanks,
Ken Lee