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:

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
        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">
            
    <service name="HelloWorld" promote="HelloWorldImpl">
        <interface.java interface="helloworld.HelloWorld" />
        <binding.ws 
wsdlElement="http://helloworld#wsdl.binding(HelloWorldSoapBinding)"
            wsdli:wsdlLocation="http://helloworld wsdl/helloworld.wsdl" />
    </service>
    
    <component name="HelloWorldImpl">
        <implementation.java class="helloworld.HelloWorldImpl" />
    </component>
</composite>

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üngliche 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)" <[EMAIL PROTECTED]> 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]

Reply via email to