Hi, Fuhwei! This was exactly the missing piece! Thanks a lot for the information (which by the way I could not find in the Tuscany documentation ...) Now the DataObject passed in as an argument by the Tuscany runtime has the type as given in the WSDL/Schema.
Thanks again, Kai -----Ursprüngliche Nachricht----- Von: Fuhwei Lwo [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 4. Dezember 2007 16:44 An: [email protected] Betreff: Re: WG: Untyped SDO DataObjects in WebService invocations Hi Kai, I would think your helloworld.composite should have some global element like this: <dbsdo:import.sdo location="wsdl/helloworld.wsdl"/> Tuscany would use this global element to register your types. There is an article talking about this subject. Although it's old (Tuscany evolved very fast), the concept is similar. http://www-128.ibm.com/developerworks/webservices/library/ws-sdoapis/index.html Fuhwei "Hudalla Kai (CI/TMP)" <[EMAIL PROTECTED]> wrote: Hi Frank, The problem is that the Tuscany runtime does not seem to create a DataObject of the expected type. The service implementation code looks like this public DataObject getGreetings(DataObject getGreetings) { System.out.println("type of submitted DataObject is: {" + getGreetings.getType().getURI() + "}" + getGreetings.getType().getName()); return null; } The output on the console I get is: type of submitted DataObject is: {http://www.apache.org/tuscany/2005/SDO}AnyTypeDataObject However, I would expect Tuscany to create a DataObject having type {http://helloworld/type}GetGreetings which I would expect Tuscany to derive from the XML Schema referenced in the WSDL used to describe the service. My helloworld.composite looks like this: targetNamespace="http://sample" xmlns:sample="http://sample" xmlns:dbsdo="http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0" xmlns:wsdli="http://www.w3.org/2004/08/wsdl-instance" name="helloworldws"> wsdli:wsdlLocation="http://helloworld wsdl/helloworld.wsdl" /> However, it seems that Tuscany couldn't care less about my WSDl and Schema. Am I getting something wrong here? How do I declare the WSDL and Schema so that Tuscany considers it? Kai -----Urspr榀gliche Nachricht----- Von: Frank Budinsky [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 4. Dezember 2007 16:06 An: [email protected] Betreff: Re: Untyped SDO DataObjects in WebService invocations Hi Kai, Dynamic DataObjects should have dynamic types. I'm not sure I understand exactly what is happening in your example, but DataObject.getType() should be returning the appropriate types. If it isn't then my guess is that the metadata wasn't registered/initialized properly. Frank. "Hudalla Kai (CI/TMP)" wrote on 12/04/2007 09:48:12 AM: > Hi, > > I am playing around with the several ways to implement a web service in > Java. Currently I am trying to modify the HelloWorld Web Service SDO > example to support Dynamic DataObjects instead of the generated static > types. Therefore I have modified the HelloWorld interface to use generic > DataObject as parameter and return type. > > @Remotable > public interface HelloWorld { > > public DataObject getGreetings(DataObject getGreetings); > } > > When I implement this interface accordingly and run it I see that the > DataObject instance provided by the Tuscany runtime when invoking the > service is totally untyped, i.e. the type information available in the > WSDL and Schema is not used for deserializing the incoming message to a > DataObject. This is very annoying since it is almost impossible to > access the data contained in the provided DataObject instance because > none of the properties I would expect from the Schema are available. > > Is this intended behaviour of the Tuscany container? What is the dynamic > SDO API good for in this case? > > Kai > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
