Re: axis1.3-ClassCast Exception at call.invoke
Ketan, i'm not able to resolve it. As u said, i tried debugging too. is there any other way to solve it? Thanks On 11/23/05, Ketan Deshpande [EMAIL PROTECTED] wrote: Hi!I meant, when you are debugging using Eclipse, attach the axis source code whenstepping into the _call.invoke. That will also help track what's causing theerror.-K--- jsri [EMAIL PROTECTED] wrote: Ketan, I guess, axis sourceis attached.Pls find the attached SOAPBIindingStub. Pls go throught and let me know. jsri On 11/23/05, Ketan Deshpande [EMAIL PROTECTED] wrote: If you are running Windows, You can use Ethereal or other n/w analyzers to look at the traffic going to/from the server. You can also use other SOAP analyzers - see Mindreef Soapscope and other such programs. http://www.soapui.org/ You can still debug the client side - you need to attach the axis source when you want to step into _call.invoke. If you want to test whether the SOAP service is coded properly - you can try other tools that can independently test the web service. This may be overkill for the problem you are facing - but that's what I can think of, right now... :-) -K --- jsri [EMAIL PROTECTED] wrote:Hi Ketan, Thanks for responding. I generated the java classes and stub using axis. App server is not running on my box.I'm developing client code to access webservice. Can i still install, try running the tcpmon to checkSOAP req/res. Thanks, jsri i checked the SOAP response On 11/22/05, Ketan Deshpande [EMAIL PROTECTED] wrote: Can you look at the SOAP response - use tcpmon or some other n/w sniffertoactually look at the SOAP request/response between client and server? The other way to debug that I can think of is to debug the call.invoke-download the source for 1.3 and step thru... -K --- jsri [EMAIL PROTECTED] wrote:Thanks for responding. yes, bean mappings are defined. On 11/22/05, Developer Developer [EMAIL PROTECTED] wrote: you have defined the bean mappings required for serialization and deserialization at the server and client side ? On 11/21/05, jsri [EMAIL PROTECTED] wrote: Hello all I'm a newbie to webservices. I'm trying to consume webservices.I'musing axis1.3 ,Eclipse IDE. Using axis i got the java stubclassesgenerated. I'm able to receive string literals from webservice.Problemcomes with objects..bean. This is the scenairo of the application...When isend an Patient ID to the webservices it returns demographic informationrelated to the Patient ID. (a) Query record -method returns Patient record for the requestedPatient-MPI ID1. I sent an invalid MPI ID. I got msg from webservice- MPI IDdoesn't exists . 2.When i send the existing MPI ID i get ClassCastException. It show the error at call.invoke().I tried using the same jar filesusedby the webservice provider to generate java calsses stubs.stillgot thesame errors. I attached wsdl and soapbindingstub class.I'm pastingthecode snippetsstack trace below. Generated SoapBindingStub.java * public com.stchome.mpi.MPIQueryReply queryRecord(java.lang.Stringin0,long in1) throws java.rmi.RemoteException { if (super.cachedEndpoint == null) {throw new org.apache.axis.NoEndPointException ();} org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[0]);_call.setUseSOAPAction(true);_call.setSOAPActionURI(); _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);_call.setOperationName(new javax.xml.namespace.QName (urn:mpi,queryRecord)); setRequestHeaders(_call); setAttachments(_call); try { java.lang.Object _resp = _call.invoke(new java.lang.Object []{in0,new java.lang.Long(in1)}); if (_resp instanceof java.rmi.RemoteException) {throw (java.rmi.RemoteException)_resp;}else {extractAttachments(_call); try {return (com.stchome.mpi.MPIQueryReply) _resp;}catch ( java.lang.Exception _exception) {return (com.stchome.mpi.MPIQueryReply)org.apache.axis.utils.JavaUtils.convert(_resp, com.stchome.mpi.MPIQueryReply.class);}}} catch (org.apache.axis.AxisFault axisFaultException) { throw axisFaultException;} } *ClientTest.java Query Record **
Re: axis1.3-ClassCast Exception at call.invoke
Hi Ketan, Thanks for responding. I generated the java classes and stub using axis. App server is not running on my box. I'm developing client code to access webservice. Can i still install, try running the tcpmon to check SOAP req/res. Thanks, jsri i checked the SOAP response On 11/22/05, Ketan Deshpande [EMAIL PROTECTED] wrote: Can you look at the SOAP response - use tcpmon or some other n/w sniffer toactually look at the SOAP request/response between client and server? The other way to debug that I can think of is to debug the call.invoke -download the source for 1.3 and step thru...-K--- jsri [EMAIL PROTECTED] wrote: Thanks for responding. yes, bean mappings are defined. On 11/22/05, Developer Developer [EMAIL PROTECTED] wrote: you have defined the bean mappings required for serialization and deserialization at the server and client side ? On 11/21/05, jsri [EMAIL PROTECTED] wrote: Hello all I'm a newbie to webservices. I'm trying to consume webservices. I'musing axis1.3 ,Eclipse IDE. Using axis i got the java stub classes generated. I'm able to receive string literals from webservice. Problemcomes with objects..bean. This is the scenairo of the application...When isend an Patient ID to the webservices it returns demographic informationrelated to the Patient ID. (a) Query record -method returns Patient record for the requestedPatient-MPI ID 1. I sent an invalid MPI ID. I got msg from webservice- MPI IDdoesn't exists .2.When i send the existing MPI ID i get ClassCastException. It show the error at call.invoke().I tried using the same jar files usedby the webservice provider to generate java calsses stubs.still got thesame errors. I attached wsdl and soapbindingstub class.I'm pasting thecode snippetsstack trace below. Generated SoapBindingStub.java *public com.stchome.mpi.MPIQueryReply queryRecord(java.lang.String in0,long in1) throws java.rmi.RemoteException { if (super.cachedEndpoint == null) {throw new org.apache.axis.NoEndPointException();} org.apache.axis.client.Call _call = createCall();_call.setOperation(_operations[0]);_call.setUseSOAPAction(true); _call.setSOAPActionURI();_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);_call.setOperationName(new javax.xml.namespace.QName(urn:mpi,queryRecord)); setRequestHeaders(_call); setAttachments(_call); try { java.lang.Object _resp = _call.invoke(new java.lang.Object [] {in0,new java.lang.Long(in1)}); if (_resp instanceof java.rmi.RemoteException) {throw (java.rmi.RemoteException)_resp;}else {extractAttachments(_call);try { return (com.stchome.mpi.MPIQueryReply) _resp;}catch (java.lang.Exception _exception) {return (com.stchome.mpi.MPIQueryReply) org.apache.axis.utils.JavaUtils.convert(_resp,com.stchome.mpi.MPIQueryReply.class);}}} catch (org.apache.axis.AxisFault axisFaultException) {throw axisFaultException;} }* ClientTest.java Query Record**public void QueryMPI() throws Exception { java.lang.String in0String = new String(system); //mpi userlong in1Long = 17831; try{ MPIServiceLocator temp = new MPIServiceLocator(); MPI mpi = temp.getMPI(); com.stchome.mpi.MPIQueryReply x = mpi.queryRecord(in0String,in1Long); System.out.println((x.getRecord()).getFirstName()); System.out.println(Status : + x.getStatus ());System.out.println(Status String : + x.getStatusString());} *AxisFaultfaultCode: { http://schemas.xmlsoap.org/soap/envelope/}Server.userException http://schemas.xmlsoap.org/soap/envelope/%7DServer.userException faultSubcode:faultString: java.lang.ClassCastExceptionfaultActor:faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException http://xml.apache.org/axis/%7DstackTrace:java.lang.ClassCastException at org.apache.axis.message.SOAPFaultBuilder.createFault (SOAPFaultBuilder.java:222)at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)at org.apache.axis.encoding.DeserializationContext.endElement (DeserializationContext.java:1087)at org.apache.xerces.parsers.AbstractSAXParser.endElement(UnknownSource) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement (UnknownSource)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Re: axis1.3-ClassCast Exception at call.invoke
If you are running Windows, You can use Ethereal or other n/w analyzers to look at the traffic going to/from the server. You can also use other SOAP analyzers - see Mindreef Soapscope and other such programs. http://www.soapui.org/ You can still debug the client side - you need to attach the axis source when you want to step into _call.invoke. If you want to test whether the SOAP service is coded properly - you can try other tools that can independently test the web service. This may be overkill for the problem you are facing - but that's what I can think of, right now... :-) -K --- jsri [EMAIL PROTECTED] wrote: Hi Ketan, Thanks for responding. I generated the java classes and stub using axis. App server is not running on my box. I'm developing client code to access webservice. Can i still install, try running the tcpmon to check SOAP req/res. Thanks, jsri i checked the SOAP response On 11/22/05, Ketan Deshpande [EMAIL PROTECTED] wrote: Can you look at the SOAP response - use tcpmon or some other n/w sniffer to actually look at the SOAP request/response between client and server? The other way to debug that I can think of is to debug the call.invoke - download the source for 1.3 and step thru... -K --- jsri [EMAIL PROTECTED] wrote: Thanks for responding. yes, bean mappings are defined. On 11/22/05, Developer Developer [EMAIL PROTECTED] wrote: you have defined the bean mappings required for serialization and deserialization at the server and client side ? On 11/21/05, jsri [EMAIL PROTECTED] wrote: Hello all I'm a newbie to webservices. I'm trying to consume webservices. I'm using axis1.3 ,Eclipse IDE. Using axis i got the java stub classes generated. I'm able to receive string literals from webservice. Problem comes with objects..bean. This is the scenairo of the application...When i send an Patient ID to the webservices it returns demographic information related to the Patient ID. (a) Query record -method returns Patient record for the requested Patient-MPI ID 1. I sent an invalid MPI ID. I got msg from webservice- MPI ID doesn't exists . 2.When i send the existing MPI ID i get ClassCastException. It show the error at call.invoke().I tried using the same jar files used by the webservice provider to generate java calsses stubs.still got the same errors. I attached wsdl and soapbindingstub class.I'm pasting the code snippetsstack trace below. Generated SoapBindingStub.java * public com.stchome.mpi.MPIQueryReply queryRecord(java.lang.Stringin0, long in1) throws java.rmi.RemoteException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[0]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(); _call.setSOAPVersion( org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName(urn:mpi, queryRecord)); setRequestHeaders(_call); setAttachments(_call); try { java.lang.Object _resp = _call.invoke(new java.lang.Object [] {in0, new java.lang.Long(in1)}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } else { extractAttachments(_call); try { return (com.stchome.mpi.MPIQueryReply) _resp; } catch (java.lang.Exception _exception) { return (com.stchome.mpi.MPIQueryReply) org.apache.axis.utils.JavaUtils.convert(_resp, com.stchome.mpi.MPIQueryReply.class); } } } catch (org.apache.axis.AxisFault axisFaultException) { throw axisFaultException; } } * ClientTest.java Query Record ** public void QueryMPI() throws Exception { java.lang.String in0String = new String(system); //mpi user long in1Long = 17831; try{ MPIServiceLocator temp = new MPIServiceLocator(); MPI mpi = temp.getMPI(); com.stchome.mpi.MPIQueryReply x = mpi.queryRecord (in0String,in1Long); System.out.println((x.getRecord()).getFirstName()); System.out.println(Status : + x.getStatus ()); System.out.println(Status String : + x.getStatusString()); } * AxisFault faultCode: {
Re: axis1.3-ClassCast Exception at call.invoke
Ketan, I guess, axis source is attached.Pls find the attached SOAPBIindingStub. Pls go throught and let me know. jsriOn 11/23/05, Ketan Deshpande [EMAIL PROTECTED] wrote: If you are running Windows, You can use Ethereal or other n/w analyzers to lookat the traffic going to/from the server. You can also use other SOAP analyzers- see Mindreef Soapscope and other such programs. http://www.soapui.org/You can still debug the client side - you need to attach the axis source whenyou want to step into _call.invoke.If you want to test whether the SOAP service is coded properly - you can try other tools that can independently test the web service.This may be overkill for the problem you are facing - but that's what I canthink of, right now... :-)-K--- jsri [EMAIL PROTECTED] wrote: Hi Ketan, Thanks for responding. I generated the java classes and stub using axis. App server is not running on my box.I'm developing client code to access webservice. Can i still install, try running the tcpmon to checkSOAP req/res. Thanks, jsri i checked the SOAP response On 11/22/05, Ketan Deshpande [EMAIL PROTECTED] wrote: Can you look at the SOAP response - use tcpmon or some other n/w sniffer to actually look at the SOAP request/response between client and server? The other way to debug that I can think of is to debug the call.invoke - download the source for 1.3 and step thru... -K --- jsri [EMAIL PROTECTED] wrote:Thanks for responding. yes, bean mappings are defined. On 11/22/05, Developer Developer [EMAIL PROTECTED] wrote: you have defined the bean mappings required for serialization and deserialization at the server and client side ? On 11/21/05, jsri [EMAIL PROTECTED] wrote: Hello all I'm a newbie to webservices. I'm trying to consume webservices. I'm using axis1.3 ,Eclipse IDE. Using axis i got the java stub classes generated. I'm able to receive string literals from webservice. Problem comes with objects..bean. This is the scenairo of the application...When i send an Patient ID to the webservices it returns demographic information related to the Patient ID. (a) Query record -method returns Patient record for the requested Patient-MPI ID 1. I sent an invalid MPI ID. I got msg from webservice- MPI ID doesn't exists . 2.When i send the existing MPI ID i get ClassCastException. It show the error at call.invoke().I tried using the same jar files used by the webservice provider to generate java calsses stubs.still got the same errors. I attached wsdl and soapbindingstub class.I'm pasting the code snippetsstack trace below. Generated SoapBindingStub.java * public com.stchome.mpi.MPIQueryReply queryRecord(java.lang.Stringin0, long in1) throws java.rmi.RemoteException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[0]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(); _call.setSOAPVersion( org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName(urn:mpi, queryRecord)); setRequestHeaders(_call); setAttachments(_call); try { java.lang.Object _resp = _call.invoke(new java.lang.Object [] {in0, new java.lang.Long(in1)}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException )_resp; } else { extractAttachments(_call); try { return ( com.stchome.mpi.MPIQueryReply) _resp; } catch (java.lang.Exception _exception) { return (com.stchome.mpi.MPIQueryReply) org.apache.axis.utils.JavaUtils.convert(_resp, com.stchome.mpi.MPIQueryReply.class); } } } catch (org.apache.axis.AxisFault axisFaultException) { throw axisFaultException; } } * ClientTest.java Query Record ** public void QueryMPI() throws Exception { java.lang.String in0String = new String(system); //mpi user long in1Long = 17831; try{ MPIServiceLocator temp = new MPIServiceLocator(); MPI mpi = temp.getMPI(); com.stchome.mpi.MPIQueryReply x = mpi.queryRecord (in0String,in1Long); System.out.println((x.getRecord()).getFirstName()); System.out.println(Status : + x.getStatus ()); System.out.println(Status String : + x.getStatusString()); } * AxisFault faultCode: {
Re: axis1.3-ClassCast Exception at call.invoke
Hi! I meant, when you are debugging using Eclipse, attach the axis source code when stepping into the _call.invoke. That will also help track what's causing the error. -K --- jsri [EMAIL PROTECTED] wrote: Ketan, I guess, axis source is attached.Pls find the attached SOAPBIindingStub. Pls go throught and let me know. jsri On 11/23/05, Ketan Deshpande [EMAIL PROTECTED] wrote: If you are running Windows, You can use Ethereal or other n/w analyzers to look at the traffic going to/from the server. You can also use other SOAP analyzers - see Mindreef Soapscope and other such programs. http://www.soapui.org/ You can still debug the client side - you need to attach the axis source when you want to step into _call.invoke. If you want to test whether the SOAP service is coded properly - you can try other tools that can independently test the web service. This may be overkill for the problem you are facing - but that's what I can think of, right now... :-) -K --- jsri [EMAIL PROTECTED] wrote: Hi Ketan, Thanks for responding. I generated the java classes and stub using axis. App server is not running on my box. I'm developing client code to access webservice. Can i still install, try running the tcpmon to check SOAP req/res. Thanks, jsri i checked the SOAP response On 11/22/05, Ketan Deshpande [EMAIL PROTECTED] wrote: Can you look at the SOAP response - use tcpmon or some other n/w sniffer to actually look at the SOAP request/response between client and server? The other way to debug that I can think of is to debug the call.invoke- download the source for 1.3 and step thru... -K --- jsri [EMAIL PROTECTED] wrote: Thanks for responding. yes, bean mappings are defined. On 11/22/05, Developer Developer [EMAIL PROTECTED] wrote: you have defined the bean mappings required for serialization and deserialization at the server and client side ? On 11/21/05, jsri [EMAIL PROTECTED] wrote: Hello all I'm a newbie to webservices. I'm trying to consume webservices. I'm using axis1.3 ,Eclipse IDE. Using axis i got the java stub classes generated. I'm able to receive string literals from webservice. Problem comes with objects..bean. This is the scenairo of the application...When i send an Patient ID to the webservices it returns demographic information related to the Patient ID. (a) Query record -method returns Patient record for the requested Patient-MPI ID 1. I sent an invalid MPI ID. I got msg from webservice- MPI ID doesn't exists . 2.When i send the existing MPI ID i get ClassCastException. It show the error at call.invoke().I tried using the same jar files used by the webservice provider to generate java calsses stubs.still got the same errors. I attached wsdl and soapbindingstub class.I'm pasting the code snippetsstack trace below. Generated SoapBindingStub.java * public com.stchome.mpi.MPIQueryReply queryRecord(java.lang.Stringin0, long in1) throws java.rmi.RemoteException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[0]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(); _call.setSOAPVersion( org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName (urn:mpi, queryRecord)); setRequestHeaders(_call); setAttachments(_call); try { java.lang.Object _resp = _call.invoke(new java.lang.Object [] {in0, new java.lang.Long(in1)}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } else { extractAttachments(_call); try { return (com.stchome.mpi.MPIQueryReply) _resp; } catch (java.lang.Exception _exception) { return (com.stchome.mpi.MPIQueryReply) org.apache.axis.utils.JavaUtils.convert(_resp, com.stchome.mpi.MPIQueryReply.class); } } } catch (org.apache.axis.AxisFault axisFaultException) { throw axisFaultException; } } * ClientTest.java Query Record ** public void
axis1.3-ClassCast Exception at call.invoke- Pls help
Hi all, pls help ...what could be possible server side errors. I'm able to receive string literals from webservice. IOn 11/21/05, jsri [EMAIL PROTECTED] wrote: Hello all I'm a newbie to webservices. I'm trying to consume webservices. I'm using axis1.3,Eclipse IDE. Using axis i got the java stub classes generated. I'm able to receive string literals from webservice. Problem comes with objects..bean. This is the scenairo of the application...When i send an Patient ID to the webservices it returns demographic information related to the Patient ID. (a) Query record -method returns Patient record for the requested Patient-MPI ID 1. I sent an invalid MPI ID. I got msg from webservice- MPI ID doesn't exists . 2.When i send the existing MPI ID i get ClassCastException.It show the error at call.invoke().I tried using the same jar files used by the webservice provider to generate java calsses stubs.still got the same errors. I attached wsdl and soapbindingstub class.I'm pasting the code snippetsstack trace below. Generated SoapBindingStub.java * public com.stchome.mpi.MPIQueryReply queryRecord(java.lang.String in0, long in1) throws java.rmi.RemoteException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[0]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(); _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName(urn:mpi, queryRecord)); setRequestHeaders(_call); setAttachments(_call); try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0, new java.lang.Long(in1)}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } else { extractAttachments(_call); try { return (com.stchome.mpi.MPIQueryReply) _resp; } catch (java.lang.Exception _exception) { return (com.stchome.mpi.MPIQueryReply) org.apache.axis.utils.JavaUtils.convert(_resp, com.stchome.mpi.MPIQueryReply.class); } } } catch (org.apache.axis.AxisFault axisFaultException) { throw axisFaultException; } } * ClientTest.java Query Record ** public void QueryMPI() throws Exception { java.lang.String in0String = new String(system); //mpi user long in1Long = 17831; try{ MPIServiceLocator temp = new MPIServiceLocator(); MPI mpi = temp.getMPI(); com.stchome.mpi.MPIQueryReply x = mpi.queryRecord(in0String,in1Long); System.out.println((x.getRecord()).getFirstName()); System.out.println(Status : + x.getStatus()); System.out.println(Status String : + x.getStatusString()); } * AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.ClassCastException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at
Re: axis1.3-ClassCast Exception at call.invoke
you have defined the bean mappings required for serialization and deserialization at the server and client side ? On 11/21/05, jsri [EMAIL PROTECTED] wrote: Hello allI'm a newbie to webservices. I'm trying to consume webservices. I'm using axis1.3 ,Eclipse IDE. Using axis i got the java stub classes generated. I'm able to receive string literals from webservice. Problem comes with objects..bean. This is the scenairo of the application...When i send an Patient ID to the webservices it returns demographic information related to the Patient ID. (a) Query record -method returns Patient record for the requested Patient-MPI ID 1. I sent an invalid MPI ID. I got msg from webservice- MPI ID doesn't exists .2.When i send the existing MPI ID i get ClassCastException. It show the error at call.invoke().I tried using the same jar files used by the webservice provider to generate java calsses stubs.still got the same errors. I attached wsdl and soapbindingstub class.I'm pasting the code snippetsstack trace below. Generated SoapBindingStub.java * public com.stchome.mpi.MPIQueryReply queryRecord(java.lang.String in0, long in1) throws java.rmi.RemoteException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[0]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(); _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName(urn:mpi, queryRecord)); setRequestHeaders(_call); setAttachments(_call); try {java.lang.Object _resp = _call.invoke(new java.lang.Object [] {in0, new java.lang.Long(in1)}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } else { extractAttachments(_call); try { return (com.stchome.mpi.MPIQueryReply) _resp; } catch (java.lang.Exception _exception) { return (com.stchome.mpi.MPIQueryReply) org.apache.axis.utils.JavaUtils.convert(_resp, com.stchome.mpi.MPIQueryReply.class); } } } catch (org.apache.axis.AxisFault axisFaultException) { throw axisFaultException; } }* ClientTest.java Query Record** public void QueryMPI() throws Exception { java.lang.String in0String = new String(system); //mpi user long in1Long = 17831; try{ MPIServiceLocator temp = new MPIServiceLocator(); MPI mpi = temp.getMPI(); com.stchome.mpi.MPIQueryReply x = mpi.queryRecord(in0String,in1Long); System.out.println((x.getRecord()).getFirstName()); System.out.println(Status : + x.getStatus ()); System.out.println(Status String : + x.getStatusString()); } *AxisFaultfaultCode: { http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.ClassCastException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement (DeserializationContext.java:1087) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch (Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse (Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java :696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java :206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at mpi.MPISoapBindingStub.queryRecord(MPISoapBindingStub.java:310) at dhh.oph.latb.mpi.QueryMpi.searchMpi(QueryMpi.java :92) at dhh.oph.latb.mpi.QueryMpi.main(QueryMpi.java:286)
Re: axis1.3-ClassCast Exception at call.invoke
Thanks for responding. yes, bean mappings are defined.On 11/22/05, Developer Developer [EMAIL PROTECTED] wrote:you have defined the bean mappings required for serialization and deserialization at the server and client side ? On 11/21/05, jsri [EMAIL PROTECTED] wrote: Hello allI'm a newbie to webservices. I'm trying to consume webservices. I'm using axis1.3 ,Eclipse IDE. Using axis i got the java stub classes generated. I'm able to receive string literals from webservice. Problem comes with objects..bean. This is the scenairo of the application...When i send an Patient ID to the webservices it returns demographic information related to the Patient ID. (a) Query record -method returns Patient record for the requested Patient-MPI ID 1. I sent an invalid MPI ID. I got msg from webservice- MPI ID doesn't exists .2.When i send the existing MPI ID i get ClassCastException. It show the error at call.invoke().I tried using the same jar files used by the webservice provider to generate java calsses stubs.still got the same errors. I attached wsdl and soapbindingstub class.I'm pasting the code snippetsstack trace below. Generated SoapBindingStub.java * public com.stchome.mpi.MPIQueryReply queryRecord(java.lang.String in0, long in1) throws java.rmi.RemoteException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[0]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(); _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName (urn:mpi, queryRecord)); setRequestHeaders(_call); setAttachments(_call); try {java.lang.Object _resp = _call.invoke(new java.lang.Object [] {in0, new java.lang.Long(in1)}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } else { extractAttachments(_call); try { return (com.stchome.mpi.MPIQueryReply) _resp; } catch (java.lang.Exception _exception) { return (com.stchome.mpi.MPIQueryReply) org.apache.axis.utils.JavaUtils.convert(_resp, com.stchome.mpi.MPIQueryReply.class); } } } catch (org.apache.axis.AxisFault axisFaultException) { throw axisFaultException; } }* ClientTest.java Query Record** public void QueryMPI() throws Exception { java.lang.String in0String = new String(system); //mpi user long in1Long = 17831; try{ MPIServiceLocator temp = new MPIServiceLocator(); MPI mpi = temp.getMPI(); com.stchome.mpi.MPIQueryReply x = mpi.queryRecord(in0String,in1Long); System.out.println((x.getRecord()).getFirstName()); System.out.println(Status : + x.getStatus ()); System.out.println(Status String : + x.getStatusString()); } *AxisFault faultCode: { http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.ClassCastException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement (DeserializationContext.java:1087) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch (Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse (Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope (SOAPPart.java :696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java :206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at
Re: axis1.3-ClassCast Exception at call.invoke
Can you look at the SOAP response - use tcpmon or some other n/w sniffer to actually look at the SOAP request/response between client and server? The other way to debug that I can think of is to debug the call.invoke - download the source for 1.3 and step thru... -K --- jsri [EMAIL PROTECTED] wrote: Thanks for responding. yes, bean mappings are defined. On 11/22/05, Developer Developer [EMAIL PROTECTED] wrote: you have defined the bean mappings required for serialization and deserialization at the server and client side ? On 11/21/05, jsri [EMAIL PROTECTED] wrote: Hello all I'm a newbie to webservices. I'm trying to consume webservices. I'm using axis1.3 ,Eclipse IDE. Using axis i got the java stub classes generated. I'm able to receive string literals from webservice. Problem comes with objects..bean. This is the scenairo of the application...When i send an Patient ID to the webservices it returns demographic information related to the Patient ID. (a) Query record -method returns Patient record for the requested Patient-MPI ID 1. I sent an invalid MPI ID. I got msg from webservice- MPI ID doesn't exists . 2.When i send the existing MPI ID i get ClassCastException. It show the error at call.invoke().I tried using the same jar files used by the webservice provider to generate java calsses stubs.still got the same errors. I attached wsdl and soapbindingstub class.I'm pasting the code snippetsstack trace below. Generated SoapBindingStub.java * public com.stchome.mpi.MPIQueryReply queryRecord(java.lang.String in0, long in1) throws java.rmi.RemoteException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[0]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(); _call.setSOAPVersion( org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName(urn:mpi, queryRecord)); setRequestHeaders(_call); setAttachments(_call); try { java.lang.Object _resp = _call.invoke(new java.lang.Object [] {in0, new java.lang.Long(in1)}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } else { extractAttachments(_call); try { return (com.stchome.mpi.MPIQueryReply) _resp; } catch (java.lang.Exception _exception) { return (com.stchome.mpi.MPIQueryReply) org.apache.axis.utils.JavaUtils.convert(_resp, com.stchome.mpi.MPIQueryReply.class); } } } catch (org.apache.axis.AxisFault axisFaultException) { throw axisFaultException; } } * ClientTest.java Query Record ** public void QueryMPI() throws Exception { java.lang.String in0String = new String(system); //mpi user long in1Long = 17831; try{ MPIServiceLocator temp = new MPIServiceLocator(); MPI mpi = temp.getMPI(); com.stchome.mpi.MPIQueryReply x = mpi.queryRecord(in0String,in1Long); System.out.println((x.getRecord()).getFirstName()); System.out.println(Status : + x.getStatus ()); System.out.println(Status String : + x.getStatusString()); } * AxisFault faultCode: { http://schemas.xmlsoap.org/soap/envelope/}Server.userException http://schemas.xmlsoap.org/soap/envelope/%7DServer.userException faultSubcode: faultString: java.lang.ClassCastException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException http://xml.apache.org/axis/%7DstackTrace:java.lang.ClassCastException at org.apache.axis.message.SOAPFaultBuilder.createFault( SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement( SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement ( DeserializationContext.java:1087) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
axis1.3-ClassCast Exception at call.invoke
Hello all I'm a newbie to webservices. I'm trying to consume webservices. I'm using axis1.3,Eclipse IDE. Using axis i got the java stub classes generated. I'm able to receive string literals from webservice. Problem comes with objects..bean. This is the scenairo of the application...When i send an Patient ID to the webservices it returns demographic information related to the Patient ID. (a) Query record -method returns Patient record for the requested Patient-MPI ID 1. I sent an invalid MPI ID. I got msg from webservice- MPI ID doesn't exists . 2.When i send the existing MPI ID i get ClassCastException.It show the error at call.invoke().I tried using the same jar files used by the webservice provider to generate java calsses stubs.still got the same errors. I attached wsdl and soapbindingstub class.I'm pasting the code snippetsstack trace below. Generated SoapBindingStub.java * public com.stchome.mpi.MPIQueryReply queryRecord(java.lang.String in0, long in1) throws java.rmi.RemoteException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[0]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(); _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName(urn:mpi, queryRecord)); setRequestHeaders(_call); setAttachments(_call); try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0, new java.lang.Long(in1)}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } else { extractAttachments(_call); try { return (com.stchome.mpi.MPIQueryReply) _resp; } catch (java.lang.Exception _exception) { return (com.stchome.mpi.MPIQueryReply) org.apache.axis.utils.JavaUtils.convert(_resp, com.stchome.mpi.MPIQueryReply.class); } } } catch (org.apache.axis.AxisFault axisFaultException) { throw axisFaultException; } } * ClientTest.java Query Record ** public void QueryMPI() throws Exception { java.lang.String in0String = new String(system); //mpi user long in1Long = 17831; try{ MPIServiceLocator temp = new MPIServiceLocator(); MPI mpi = temp.getMPI(); com.stchome.mpi.MPIQueryReply x = mpi.queryRecord(in0String,in1Long); System.out.println((x.getRecord()).getFirstName()); System.out.println(Status : + x.getStatus()); System.out.println(Status String : + x.getStatusString()); } * AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.ClassCastException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at mpi.MPISoapBindingStub.queryRecord(MPISoapBindingStub.java:310) at dhh.oph.latb.mpi.QueryMpi.searchMpi(QueryMpi.java:92) at dhh.oph.latb.mpi.QueryMpi.main(QueryMpi.java:286)