On Fri, Sep 3, 2010 at 7:28 AM, Millies, Sebastian <[email protected]> wrote: > I share your doubt about dynamic SDO. Can anyone provide a working example > of that? I have created a service using dynamic SDOs. I post the service > interface > and wsdl below. Point is, the wsdl - generated by the Tuscany runtime and > downloaded from the service URL - cannot be imported in SOAP UI 3.5.1. > It gives a NullPointerException. Now that might perhaps be a problem with SOAP > UI, but I'm more inclined to believe it's a problem with the wsdl, and hence > with Tuscany (1.6). > > With regard to persistence: I do not see dynamic SDO persisted in relational > DB. > That would be easier for static SDO. For dynamic SDO, I'd look on NoSQL > databases, > or maybe Solr/Lucene for persistence. > > -- Sebastian > >>From: Anurag Sharma [mailto:[email protected]] >>Sent: Thursday, September 02, 2010 7:51 PM >> >>I am reading through SDO spec and not clear yet if an SDO implementation >>would be against a specific data model outlined >by say XSD and then there >>would be a corresponding Relation DB model to enable persistence. >> >>Or SDO implementation would be generic enough to create/save any model? >>(doubt) >> >>Thanks, >>Anurag > > > ------ 8< ------ > Attached: Service interface and problematic wsdl (never mind the totally > unstandard > service and method names): > > import commonj.sdo.DataObject; > import java.util.List; > import org.osoa.sca.annotations.Remotable; > > @Remotable > public abstract interface GetDataServiceWithoutException > { > public abstract byte[] getMessage(String paramString); > > public abstract List<byte[]> getMessageList(String paramString); > > public abstract DataObject getMessageSDO(String paramString); > > public abstract List<DataObject> getMessageListSDOList(String paramString); > > public abstract DataObject[] getMessageListSDOArr(String paramString); > > public abstract DataObject getMessageListSDOinSDO(String paramString); > } > > <?xml version="1.0" encoding="UTF-8"?> > <wsdl:definitions name="GetDataServiceWithoutExceptionService" > targetNamespace="http://api.softwareag.com/" > xmlns:tns="http://api.softwareag.com/" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:SOAP11="http://schemas.xmlsoap.org/wsdl/soap/"> > <wsdl:types> > <xs:schema attributeFormDefault="qualified" > elementFormDefault="unqualified" targetNamespace="http://api.softwareag.com/" > xmlns:ns0="http://sdo.commonj/" xmlns:tns="http://api.softwareag.com/" > xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:import > namespace="http://sdo.commonj/"/><xs:element > name="getMessageListResponse"><xs:complexType><xs:sequence><xs:element > minOccurs="0" name="return" nillable="true" > type="xs:anyType"/></xs:sequence></xs:complexType></xs:element><xs:element > name="getMessageSDOResponse"><xs:complexType><xs:sequence><xs:element > minOccurs="0" name="return" nillable="true" > type="ns0:dataObject"/></xs:sequence></xs:complexType></xs:element><xs:element > > name="getMessageListSDOListResponse"><xs:complexType><xs:sequence><xs:element > minOccurs="0" name="return" nillable="true" > type="xs:anyType"/></xs:sequence></xs:complexType></xs:element><xs:element > name="getMessageListSDOList"><xs:complexType><xs:sequence><xs:element > minOccurs="0" name="arg0" nillable="true" > type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element > name="getMessageListSDOArr"><xs:complexType><xs:sequence><xs:element > minOccurs="0" name="arg0" nillable="true" > type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element > name="getMessageSDO"><xs:complexType><xs:sequence><xs:element minOccurs="0" > name="arg0" nillable="true" > type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element > name="getMessageList"><xs:complexType><xs:sequence><xs:element minOccurs="0" > name="arg0" nillable="true" > type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element > name="getMessageResponse"><xs:complexType><xs:sequence><xs:element > minOccurs="0" name="return" nillable="true" > type="xs:byte"/></xs:sequence></xs:complexType></xs:element><xs:element > name="getMessageListSDOinSDOResponse"><xs:complexType><xs:sequence><xs:element > minOccurs="0" name="return" nillable="true" > type="ns0:dataObject"/></xs:sequence></xs:complexType></xs:element><xs:element > name="getMessageListSDOinSDO"><xs:complexType><xs:sequence><xs:element > minOccurs="0" name="arg0" nillable="true" > type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element > name="getMessage"><xs:complexType><xs:sequence><xs:element minOccurs="0" > name="arg0" nillable="true" > type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element > name="getMessageListSDOArrResponse"><xs:complexType><xs:sequence><xs:element > maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" > type="ns0:dataObject"/></xs:sequence></xs:complexType></xs:element></xs:schema> > </wsdl:types> > <wsdl:message name="getMessageListResponse"> > <wsdl:part name="getMessageListResponse" > element="tns:getMessageListResponse"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="getMessageSDOResponse"> > <wsdl:part name="getMessageSDOResponse" > element="tns:getMessageSDOResponse"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="getMessageListSDOListResponse"> > <wsdl:part name="getMessageListSDOListResponse" > element="tns:getMessageListSDOListResponse"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="getMessageListSDOList"> > <wsdl:part name="getMessageListSDOList" > element="tns:getMessageListSDOList"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="getMessageListSDOArr"> > <wsdl:part name="getMessageListSDOArr" element="tns:getMessageListSDOArr"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="getMessageSDO"> > <wsdl:part name="getMessageSDO" element="tns:getMessageSDO"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="getMessageList"> > <wsdl:part name="getMessageList" element="tns:getMessageList"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="getMessageResponse"> > <wsdl:part name="getMessageResponse" element="tns:getMessageResponse"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="getMessageListSDOinSDOResponse"> > <wsdl:part name="getMessageListSDOinSDOResponse" > element="tns:getMessageListSDOinSDOResponse"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="getMessageListSDOinSDO"> > <wsdl:part name="getMessageListSDOinSDO" > element="tns:getMessageListSDOinSDO"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="getMessage"> > <wsdl:part name="getMessage" element="tns:getMessage"> > </wsdl:part> > </wsdl:message> > <wsdl:message name="getMessageListSDOArrResponse"> > <wsdl:part name="getMessageListSDOArrResponse" > element="tns:getMessageListSDOArrResponse"> > </wsdl:part> > </wsdl:message> > <wsdl:portType name="GetDataServiceWithoutException"> > <wsdl:operation name="getMessageList"> > <wsdl:input message="tns:getMessageList"> > </wsdl:input> > <wsdl:output message="tns:getMessageListResponse"> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getMessageSDO"> > <wsdl:input message="tns:getMessageSDO"> > </wsdl:input> > <wsdl:output message="tns:getMessageSDOResponse"> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getMessageListSDOList"> > <wsdl:input message="tns:getMessageListSDOList"> > </wsdl:input> > <wsdl:output message="tns:getMessageListSDOListResponse"> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getMessageListSDOArr"> > <wsdl:input message="tns:getMessageListSDOArr"> > </wsdl:input> > <wsdl:output message="tns:getMessageListSDOArrResponse"> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getMessageListSDOinSDO"> > <wsdl:input message="tns:getMessageListSDOinSDO"> > </wsdl:input> > <wsdl:output message="tns:getMessageListSDOinSDOResponse"> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getMessage"> > <wsdl:input message="tns:getMessage"> > </wsdl:input> > <wsdl:output message="tns:getMessageResponse"> > </wsdl:output> > </wsdl:operation> > </wsdl:portType> > <wsdl:binding name="GetDataServiceWithoutExceptionBinding" > type="tns:GetDataServiceWithoutException"> > <SOAP:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http"/> > <wsdl:operation name="getMessageList"> > <SOAP:operation/> > <wsdl:input> > <SOAP:body use="literal"/> > </wsdl:input> > <wsdl:output> > <SOAP:body use="literal"/> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getMessageSDO"> > <SOAP:operation/> > <wsdl:input> > <SOAP:body use="literal"/> > </wsdl:input> > <wsdl:output> > <SOAP:body use="literal"/> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getMessageListSDOList"> > <SOAP:operation/> > <wsdl:input> > <SOAP:body use="literal"/> > </wsdl:input> > <wsdl:output> > <SOAP:body use="literal"/> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getMessageListSDOArr"> > <SOAP:operation/> > <wsdl:input> > <SOAP:body use="literal"/> > </wsdl:input> > <wsdl:output> > <SOAP:body use="literal"/> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getMessageListSDOinSDO"> > <SOAP:operation/> > <wsdl:input> > <SOAP:body use="literal"/> > </wsdl:input> > <wsdl:output> > <SOAP:body use="literal"/> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getMessage"> > <SOAP:operation/> > <wsdl:input> > <SOAP:body use="literal"/> > </wsdl:input> > <wsdl:output> > <SOAP:body use="literal"/> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > <wsdl:service name="GetDataServiceWithoutExceptionService"> > <wsdl:port name="GetDataServiceWithoutExceptionPort" > binding="tns:GetDataServiceWithoutExceptionBinding"> > <SOAP:address > location="http://localhost:8081/GetDataServiceWithoutException"/> > </wsdl:port> > </wsdl:service> > </wsdl:definitions> > > >
I'm not really an expert on SDO but the issue with the WSDL that Tuscany generated is that it includes <xs:import namespace="http://sdo.commonj/" /> Which doesn't resolve to anything sensible. The type dataObject is defined here [1] but even then that's in a different namespace. IIUC the dynamic SDO data object is intended to provide a dynamic set/get given element name style interface over an xml model. This allows you to define service interfaces that take arbitrary data types (imagine the scenario where you want to implement a service that process every message, regardless or message type, entering a message queue for example). Assuming that the dynamic object is backed by some known type model then I don't see why it shouldn't be persisted but I'm getting out of my depth re. what the Tuscany implementation actually does. The guy that knows about this stuff is away today I think so you may get a real answer on Monday. [1] http://svn.apache.org/repos/asf/tuscany/sdo-java/trunk/sdo-api/src/main/resources/xml/sdoModel.xsd Simon -- Apache Tuscany committer: tuscany.apache.org Co-author of a book about Tuscany and SCA: tuscanyinaction.com
