Hi Chris, see comments in-line.

Cheers,
Jervis

> -----Original Message-----
> From: Chris Wall [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 30, 2006 6:01 AM
> To: [email protected]
> Subject: Re: How to invoke a web service with complex types? 
> Java object
> / SDO conversion?
> 
> 
> Hi Raymond.
> 
> In our case, the client is privy to the domain objects - Java objects
> (interfaces/classes) - used by the web service.  For example, 
> locally the
> client uses org.client.Patient throughout the application.  
> Before invoking
> a web service the client converts org.client.Patient to
> org.service.Patient(provided by service provider), and then invokes
> the web service passing
> org.service.Patient.
> 
> Migrating this code to Tuscany we're finding that SDO handles 
> the outbound
> by converting the Patient object to a String (I think).  The 
> inbound doesn't
> convert at all, but instead sends back null.
> 
I am not sure whether or not you are talking about the Celtix binding. It looks 
like you are referring to the Celtix binding code from last week, I am afraid 
it was not complete at that stage. But the latest version should allow both 
inbound and outbound working, I have tested helloworldwsclient sample, it works 
fine. 

Please note there is a hack currently in Celtix binding 
NodeDataReader/NodeDataWriter code. I have to convert SDO object to stream 
first, then stream to XML Node. This is because Celtix 1.0 does not have a 
direct support to stax. Problem can be fixed once we move Celtix binding to be 
based on the latest CeltixFire code base. CeltixFire repository is already 
available  from apache incubator. 

As Raymond has mentioned, a pluggable databinding framework is under 
construction at the moment. Before this happens, if you are keen to use other 
databindings such as JAXB or xmlbeans, you can do so by implementing your own 
NodeDataReader/NodeDataWriter. Let me know if you need any helps.


> It would be cool if the binding layer was able to dynamically 
> convert a Java
> object to a schema type matching the package name and class 
> name in the
> WSDL.  This is the ultimate non-invasive approach.
> 
> It sounds as if the WS binding layer for both Axis2 and 
> Celtix support only
> SDO as of today.  If this is true, what are the steps to 
> communicate with a
> complex type web service?  My guess is:
> 
> 1.) Generate SDO objects from WSDL using tuscany-sdo-plugin.
> 
> 2.) Create a service component (@Service) that matches the 
> web service's
> method signatures.
> 
> 3.) In the application scdl, import the WSDL into SDO
> (<import.sdolocation="..."/>).  Although, I'm not sure exactly what
> this does.
> 
> 4.) In the application scdl, configure the service component with the
> binding.ws.
> 
> 5.) Within the client application, convert local Java objects 
> to SDO object
> using the Factory created in #1.
> 
> 6.) Within the client application, locate the service via 
> Tuscany context
> and invoke web service proxy method passing in the SDO object.
> 
> How does that sound?
> 
> -Chris
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to