Hi, I am making web service server and client.
I use Apache-Axis (
Java) as the server, and C# (using Visual Studio) as the client.
The Axis Code :
============
package gov.pbb.pos.webservice;
public class CPosService {
....
public
String getDetails(CQuery _oQuery)
{
....
}
....
}
public class CQuery implements java.io.Serializable {
....
private gov.pbb.pos.dao.CNop _nop;
public gov.pbb.pos.dao.CNop getNop() {
return this._nop;
}
public void setNop(gov.pbb.pos.dao.CNop nop) {
this._nop = nop;
}
....
}
C# Client :
============
I am using Visual Studio, add web reference to the wsdl with name "posServer".
posServer.CQuery query = new posServer.CQuery();
posServer.CNop nop = new posServer.CNop();
query.nop = nop;
//calling the service
posServer.CPosServiceService pos = new posServer.CPosServiceService();
string result = pos.getDetails(query); //error in this line
The error is :
org.xml.sax.SAXException: Bad types (class gov.pbb.pos.webservice.CQuery -> class gov.pbb.pos.dao.CNop)
While the stack trace in axis are :
org.xml.sax.SAXException:
Bad types (class gov.pbb.pos.webservice.CQuery -> class gov.pbb.pos.dao.CNop)
at org.apache.axis.AxisFault.makeFault(AxisFault.java:120)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:280)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
.....