Hello! I'm doing some experiments about webservices interoperability using Axis, Weblogic and .NET.
I'm building a relatively simple webservice. It's a service that provides informations about registered users in a database. I have several implementation of the service.
For the webservice, I use a class Person (a bean having setter/getter for all of its fields) and a class dp, that contains methods returning array of person( Person[] ).
1)The first implementation of my service provider was done on Weblogic8.1 and it's working quite fine. The corresponding WSDL generated by weblogic can be found at: http://ahouans.sh.cvut.cz/tmp/wl.wsdl
2)The next was a .NET implementation. That one works fine too. The corresponding WSDL file is available at: http://ahouans.sh.cvut.cz/tmp/net.wsdl
3) I've used the WSDL from Weblogic to generate client code for VS.NET and Axis1.1(in JBuilder). The Axis client works well with the weblogic server implementation as well as with the .NET implementation. The .NET client works well with both weblogic and .NET too.
4) Now, I'm willing to implement a tomcat provider of the same service. The Java classes used are quite similar to the one of weblogic. but the WSDL generated from the DP classe looks different. it can be seen at: http://ahouans.sh.cvut.cz/tmp/axis02.wsdl The provider is deployed on Tomcat4.1 and it seems OK. Now, I'm trying to access the showAllUsers(a method that takes no parameter and returns Person[]) using the two clients I've built before. 4-1) The .NET client complains saying:
"Client found response content-type of 'text/plain', but expected 'text/xml'"
4-2) The Axis client complains. The stacktrace is:
<axisClientStacktrace>
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXParseException: Document root element is
missing.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: org.xml.sax.SAXParseException:
Document root element is missing.
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3170)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:501)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538) at org.apache.axis.Message.getSOAPEnvelope(Message.java:376) at org.apache.axis.client.Call.invokeEngine(Call.java:2583) ...... </<axisClientStacktrace>
4-3) In order to see what is going on on the wire, I have used TCPmon. The request for the method that displays all users in the DB is:
POST /dpWeb/services/DP HTTP/1.0 Content-Type: text/xml; charset=utf-8 Accept: application/soap+xml, application/dime, multipart/related, text/* User-Agent: Axis/1.1 Host: localhost Cache-Control: no-cache Pragma: no-cache SOAPAction: "http://www.openuri.org/showAllUsers" Content-Length: 317 <?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> <showAllUsers xmlns="http://www.openuri.org/"/> </soapenv:Body> </soapenv:Envelope>
And the response is:
HTTP/1.1 200 OK Content-Type: text/plain Date: Sun, 21 Dec 2003 00:05:35 GMT Server: Apache Coyote/1.0 Connection: close
So, it seems that not all the response is sent back to the client. I have written some system.out.println() on the server and noticed that the client calls correctly the method on the server; on the server, I can get the result printed out. But somehow, It isn't correctly sent back to the client!
Any idea about what I'm doing wrong? I know I could use the WSDL generated by the axis provider to generate build a new axis client, but I wish I could use the two clients I've already built. So, please any idea about what changes I have to do in order to fix this problem?
Thanks in advance.
Arcadius. PS: I apologize for the long message.
