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) .....
Balaji Loganathan
author and deputy
Bartender
Joined: Jul 13, 2001
Posts: 3150
posted
0
Originally posted by Susilo Saja:
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) .....
/* * This class was automatically generated with * <a href="http://www.castor.org">Castor 0.9.5.3</a>, using an XML * Schema. * $Id: CNop.java,v 1.2 2004/11/22 03:09:24 dpitaloka Exp $ */
package gov.pbb.pos.dao;
//---------------------------------/ //- Imported classes and packages -/ //---------------------------------/
/** * Returns the value of field 'kdBlok'. * * @return the value of field 'kdBlok'. */ public java.lang.String getKdBlok() { return this._kdBlok; } //-- java.lang.String getKdBlok()
/** * Returns the value of field 'kdDati2'. * * @return the value of field 'kdDati2'. */ public java.lang.String getKdDati2() { return this._kdDati2; } //-- java.lang.String getKdDati2()
/** * Returns the value of field 'kdJnsOp'. * * @return the value of field 'kdJnsOp'. */ public java.lang.String getKdJnsOp() { return this._kdJnsOp; } //-- java.lang.String getKdJnsOp()
/** * Returns the value of field 'kdKecamatan'. * * @return the value of field 'kdKecamatan'. */ public java.lang.String getKdKecamatan() { return this._kdKecamatan; } //-- java.lang.String getKdKecamatan()
/** * Returns the value of field 'kdKelurahan'. * * @return the value of field 'kdKelurahan'. */ public java.lang.String getKdKelurahan() { return this._kdKelurahan; } //-- java.lang.String getKdKelurahan()
/** * Returns the value of field 'kdPropinsi'. * * @return the value of field 'kdPropinsi'. */ public java.lang.String getKdPropinsi() { return this._kdPropinsi; } //-- java.lang.String getKdPropinsi()
/** * Returns the value of field 'noUrut'. * * @return the value of field 'noUrut'. */ public java.lang.String getNoUrut() { return this._noUrut; } //-- java.lang.String getNoUrut()
/** * Sets the value of field 'kdBlok'. * * @param kdBlok the value of field 'kdBlok'. */ public void setKdBlok(java.lang.String kdBlok) { this._kdBlok = kdBlok; } //-- void setKdBlok(java.lang.String)
/** * Sets the value of field 'kdDati2'. * * @param kdDati2 the value of field 'kdDati2'. */ public void setKdDati2(java.lang.String kdDati2) { this._kdDati2 = kdDati2; } //-- void setKdDati2(java.lang.String)
/** * Sets the value of field 'kdJnsOp'. * * @param kdJnsOp the value of field 'kdJnsOp'. */ public void setKdJnsOp(java.lang.String kdJnsOp) { this._kdJnsOp = kdJnsOp; } //-- void setKdJnsOp(java.lang.String)
/** * Sets the value of field 'kdKecamatan'. * * @param kdKecamatan the value of field 'kdKecamatan'. */ public void setKdKecamatan(java.lang.String kdKecamatan) { this._kdKecamatan = kdKecamatan; } //-- void setKdKecamatan(java.lang.String)
/** * Sets the value of field 'kdKelurahan'. * * @param kdKelurahan the value of field 'kdKelurahan'. */ public void setKdKelurahan(java.lang.String kdKelurahan) { this._kdKelurahan = kdKelurahan; } //-- void setKdKelurahan(java.lang.String)
/** * Sets the value of field 'kdPropinsi'. * * @param kdPropinsi the value of field 'kdPropinsi'. */ public void setKdPropinsi(java.lang.String kdPropinsi) { this._kdPropinsi = kdPropinsi; } //-- void setKdPropinsi(java.lang.String)
/** * Sets the value of field 'noUrut'. * * @param noUrut the value of field 'noUrut'. */ public void setNoUrut(java.lang.String noUrut) { this._noUrut = noUrut; } //-- void setNoUrut(java.lang.String)