Hi, Chris.
If you have <import.sdo location="wsdl/MedRecWebServices.wsdl"/>, it means
that you prefer to use the dynamic SDO model derived from the WSDL/XSD. I
have two questions:
1) Is the exception from client side or server side?
2) What's our business interface expecting? The strongly-typed java
class/interface generated by SDO or the dynamic DataObject?
Basically, the "import.sdo" needs to be consistent with your business
interface signature.
Thanks,
Raymond
----- Original Message -----
From: Chris Wall
To: Raymond Feng
Sent: Wednesday, August 30, 2006 4:05 PM
Subject: Re: Returning DynamicDataObjectImpl from web service call produces
TargetException leads to ClassCastException
Hey Raymond.
Our *client* scdl has: <import.sdo location="wsdl/MedRecWebServices.wsdl"/>.
Deserialized into the dynamic SDO makes sense. XMLStreamReader2XMLDocument
parses the stream and creates a DynamicDataObjectImpl as it's root object.
DynamicDataObjectImpl is aware of it's Patient context -
name=getPatientResponse, package=java: com.bea.proto.webservice, and
attributes. It's the root object that is returned from the binding.
Shouldn't there be an intermediate step that generates a Patient object?
-Chris
On 8/30/06, Raymond Feng <[EMAIL PROTECTED]> wrote:
Hi,
It seems that the exception is thrown from the target component and it's
related to the static/dynamic SDO (The incoming XML got deserialized into
the dynamic SDO instead of the generated static class which your component
implementation code expects).
What does the "import.sdo" look like on the server side? Using "<import.sdo
factory="..."/>"?
Thanks,
Raymond
----- Original Message -----
From: Chris Wall
To: tuscany-dev@ws.apache.org ; [EMAIL PROTECTED]
Sent: Wednesday, August 30, 2006 2:37 PM
Subject: Returning DynamicDataObjectImpl from web service call produces
TargetException leads to ClassCastException
Hi. After a successful invocation of a web service, a TargetException
occurs ("Cannot evaulate $Proxy35.toString()") after body is returned from
JDKOutboundInvocationHandler. This eventually leads to a
ClassCastException:
java.lang.ClassCastException:
org.apache.tuscany.sdo.impl.DynamicDataObjectImpl
at $Proxy35.getPatient(Unknown Source)
at
com.bea.proto.webservice.client.MedRecWebServicesServiceComponent.getPatient(
MedRecWebServicesServiceComponent.java:26)
Unfortunately I couldn't figure out how to get the full stacktrace from
TargetException.
Admittedly, this one has me confused. My first question is why is this
happening? My second question is when, if ever, does the SDO layer convert
the DynamicDataObjectImpl back to the intended return object (in this case a
Patient object).
Thanks.
-Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]