[MOBY-dev] moby doc-lit services.
Jason Stewart
jason.e.stewart at gmail.com
Fri Sep 19 09:29:46 UTC 2008
Hey Dmitry,
I agree with your suggestion as to the "right" way to do it.
I am less concerned with the WSDL, from my current understanding of
MOBY (which is very weak I am afraid) the WSDL is almost useless,
MOBY-enabled clients will have to be aware of how to deserialize data
types that they handle using their own libraries or libraries bundled
with MOBY.
Originally I thought MOBY would rely heavily on XML Schemas to define
their data types, and that would be the core - but since that isn't
how things are done, I don't see much use in the WSDL. I'd like to
know if I am understanding this incorrectly.
Cheers, jas.
On Sat, Sep 20, 2008 at 2:26 AM, Dmitry Repchevsky
<dmitry.repchevski at bsc.es> wrote:
> Hi Jason,
>
>> Mark has asked me to modify SOAP::Lite in order to better support doc/lit
>> services in general...
>
> This is a good news, because my concern was that you are going to do a sort
> of hack - make a common schema for all services,
> something like a "<xs:string>" and pass a Moby message inside...
>
> What I suggested to do (and this is the "right" way to do in java) is to
> pass all the MobyMessage inside a soap message:
> Something like:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
> <S:Body>
> <ns1:MOBY xmlns:ns1="http://www.biomoby.org/moby">
> <ns1:mobyContent>
> <ns1:mobyData ns1:queryID="sip_1">
> <ns1:Simple ns1:articleName="id">
> <ns1:AminoAcidSequence ns1:id="" ns1:namespace="">
> <ns1:String ns1:articleName="SequenceString"
> ns1:id=""
> ns1:namespace="">AGHFJHGDKHGJKADGHJGDJH</ns1:String>
> </ns1:AminoAcidSequence>
> </ns1:Simple>
> </ns1:mobyData>
> </ns1:mobyContent>
> </ns1:MOBY>
> </S:Body>
> </S:Envelope>
>
> This way there is no problem as it is a STANDARD Moby XML inside a SOAP
> <BODY>.
>
> The problem is that you need to attach a XML Schema to your WSDL (if you
> wish a "real" web-service")
> Such a schema could be divided in two parts:
>
> 1. Static (common for all moby doc/lit services) that contains Moby specific
> schema (MobySimple, MobyContent....):
>
> ******************************************************************************************************************************
>
> <xs:schema
> version="1.0"
> targetNamespace="http://www.biomoby.org/moby"
> <http://www.biomoby.org/moby%22>
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> <http://www.w3.org/2001/XMLSchema%22>
> xmlns="http://www.biomoby.org/moby" <http://www.biomoby.org/moby%22>>
>
> <xs:element name="MOBY" type="mobyMessage"/>
> <xs:element name="mobyData" type="mobyData"/>
> <xs:element name="Collection" type="mobyCollection"/>
> <xs:element name="Simple" type="mobySimple"/>
> <xs:element name="mobyException" type="mobyException"/>
> <xs:element name="serviceNotes" type="serviceNotes"/>
>
> <xs:complexType name="mobyMessage">
> <xs:sequence>
> <xs:element name="mobyContent" type="mobyContent" minOccurs="0"/>
> </xs:sequence>
> </xs:complexType>
>
> <xs:complexType name="mobyContent">
> <xs:sequence>
> <xs:element ref="mobyData" minOccurs="0" maxOccurs="unbounded"/>
> <xs:element ref="serviceNotes" minOccurs="0"/>
> </xs:sequence>
> </xs:complexType>
>
> <xs:complexType name="mobyData">
> <xs:sequence>
> <xs:choice minOccurs="0" maxOccurs="unbounded">
> <xs:element ref="Simple"/>
> <xs:element ref="Collection"/>
> </xs:choice>
> <xs:element name="Parameter" type="mobyParameter" minOccurs="0"
> maxOccurs="unbounded"/>
> </xs:sequence>
> <xs:attribute ref="queryID"/>
> </xs:complexType>
>
> <xs:complexType name="mobySimple">
> <xs:sequence>
> <xs:any processContents="lax" namespace="##other"/>
> </xs:sequence>
> <xs:attribute ref="articleName"/>
> </xs:complexType>
>
> <xs:complexType name="mobyCollection">
> <xs:sequence>
> <xs:element ref="Simple" minOccurs="0" maxOccurs="unbounded"/>
> </xs:sequence>
> <xs:attribute ref="articleName"/>
> </xs:complexType>
>
> <xs:complexType name="mobyParameter">
> <xs:sequence>
> <xs:element name="Value" type="xs:string" minOccurs="0"/>
> </xs:sequence>
> <xs:attribute ref="articleName"/>
> </xs:complexType>
>
> <xs:complexType name="serviceNotes">
> <xs:sequence>
> <xs:element ref="mobyException" minOccurs="0" maxOccurs="unbounded"/>
> <xs:element name="notes" type="xs:string" minOccurs="0"/>
> </xs:sequence>
> </xs:complexType>
>
> <xs:complexType name="mobyException">
> <xs:sequence>
> <xs:element name="exceptionCode" type="xs:string" minOccurs="0"/>
> <xs:element name="exceptionMessage" type="xs:string" minOccurs="0"/>
> </xs:sequence>
> <xs:attribute ref="refElement"/>
> <xs:attribute ref="refQueryID"/>
> <xs:attribute ref="severity"/>
> </xs:complexType>
>
> <xs:simpleType name="severity">
> <xs:restriction base="xs:string">
> <xs:enumeration value="error"/>
> <xs:enumeration value="warning"/>
> <xs:enumeration value="information"/>
> </xs:restriction>
> </xs:simpleType>
> <xs:attribute name="articleName" type="xs:string"/>
> <xs:attribute name="queryID" type="xs:string"/>
> <xs:attribute name="refElement" type="xs:string"/>
> <xs:attribute name="refQueryID" type="xs:string"/>
> <xs:attribute name="severity" type="severity"/>
> </xs:schema>
>
> ******************************************************************************************************************************
>
> 2. Moby Datatypes specific one - that one depends of the ontology types used
> by service...
> In extreme case you can put the same scheme representing ALL the ontology
> (not generate it for every service, but generate it once for the ontology
> and use for every service).
> You can even put an EXTERNAL reference to it (for example make a servlet
> that dynamically generates it from the ontology). This way it will be always
> updated.
>
> Cheers,
>
> Dmitry
>
>
>
>
> Jason Stewart wrote:
>>
>> Hi Dmitry,
>>
>> On Fri, Sep 19, 2008 at 10:01 AM, Dmitry Repchevsky
>> <dmitry.repchevski at bsc.es> wrote:
>>
>>
>>>
>>> My name is Dmitry and I am a developer in Spanish National Institute of
>>> Bioinformatics.
>>> We just have finished an informal meeting with Mark Wilkinson and he
>>> suggested to contact you about moby document/literal services...
>>>
>>> I have my own implementation of it based on XML Schema and I would like
>>> to
>>> know the way you are implementing it.
>>>
>>
>> Mark has asked me to modify SOAP::Lite in order to better support
>> doc/lit services in general, not just for MOBY.
>>
>> I'd love to hear more about how you do things.
>>
>> Currently, I'm in discussion with the SOAP::Lite developer group how
>> to modify the core of S::L in order to better handle doc/lit.
>>
>> Cheers, jas.
>>
>>
>
>
More information about the MOBY-dev
mailing list