[MOBY-dev] Decisions from the BioHackathon

Dmitry Repchevsky dmitry.repchevski at bsc.es
Mon Feb 18 09:57:45 UTC 2008


Hello Martin,

> My (a bit vague) understanding of the document/literal style is that the
> message payload becomes an integral part of the whole SOAP message.
> Therefore, the payload itself cannot start with
If I understand you correct, the proposal is to use the MobyMessage 
itself as a payload and not the String as it is now.
COOL!!! This could makes happy.

So actually the Java method would looks like:
MobyMessage runMyService(MobeMessage msg);

So, actually we are moving to XML Schema message representation (which 
is EXACTLY that my API does).

In this case WSDL would have XML Schema for the message (which would be 
the same for ANY "doc-literal" service when MobyObject would be 
represented as XML ANY type, but this is the problem of representing an 
ontology object in XML schema and, IMHO, we can do nothing with it.).

Here is the possible WSDL with MobyMessage XML Schema:
*********************************************************************************************
<?xml version="1.0" encoding="UTF-8"?>
<definitions name='MobyDocWebServiceService' 
targetNamespace='http://moby.ejb.inb.bsc.es/' 
xmlns='http://schemas.xmlsoap.org/wsdl/' 
xmlns:ns1='http://www.biomoby.org/moby' 
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' 
xmlns:tns='http://moby.ejb.inb.bsc.es/' 
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
 <types>
  <xs:schema attributeFormDefault='qualified' 
elementFormDefault='qualified' 
targetNamespace='http://www.biomoby.org/moby' version='1.0' 
xmlns='http://www.biomoby.org/moby' 
xmlns:moby='http://www.biomoby.org/moby' 
xmlns:tns='http://www.biomoby.org/moby' 
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
   <xs:element name='Collection' type='mobyCollection'/>
   <xs:element name='MOBY' type='mobyMessage'/>
   <xs:element name='Simple' type='mobySimple'/>
   <xs:element name='mobyData' type='mobyData'/>
   <xs:element name='mobyException' type='mobyException'/>
   <xs:element name='serviceNotes' type='serviceNotes'/>
   <xs:complexType name='mobyMessage'>
    <xs:sequence>
     <xs:element minOccurs='0' name='mobyContent' type='mobyContent'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='mobyContent'>
    <xs:sequence>
     <xs:element maxOccurs='unbounded' minOccurs='0' ref='mobyData'/>
     <xs:element minOccurs='0' ref='serviceNotes'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='mobyData'>
    <xs:sequence>
     <xs:choice maxOccurs='unbounded' minOccurs='0'>
      <xs:element ref='Simple'/>
      <xs:element ref='Collection'/>
     </xs:choice>
     <xs:element maxOccurs='unbounded' minOccurs='0' name='Parameter' 
type='mobyParameter'/>
    </xs:sequence>
    <xs:attribute ref='queryID'/>
   </xs:complexType>
   <xs:complexType name='mobySimple'>
    <xs:sequence>
     <xs:any namespace='##other' processContents='lax'/>
    </xs:sequence>
    <xs:attribute ref='articleName'/>
   </xs:complexType>
   <xs:complexType name='mobyCollection'>
    <xs:sequence>
     <xs:element maxOccurs='unbounded' minOccurs='0' ref='Simple'/>
    </xs:sequence>
    <xs:attribute ref='articleName'/>
   </xs:complexType>
   <xs:complexType name='mobyParameter'>
    <xs:sequence>
     <xs:element minOccurs='0' name='Value' type='xs:string'/>
    </xs:sequence>
    <xs:attribute ref='articleName'/>
   </xs:complexType>
   <xs:complexType name='serviceNotes'>
    <xs:sequence>
     <xs:element maxOccurs='unbounded' minOccurs='0' ref='mobyException'/>
     <xs:element minOccurs='0' name='notes' type='xs:string'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='mobyException'>
    <xs:sequence>
     <xs:element minOccurs='0' name='exceptionCode' type='xs:string'/>
     <xs:element minOccurs='0' name='exceptionMessage' type='xs:string'/>
    </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>
  <xs:schema targetNamespace='http://moby.ejb.inb.bsc.es/' version='1.0' 
xmlns:ns1='http://www.biomoby.org/moby' 
xmlns:tns='http://moby.ejb.inb.bsc.es/' 
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
   <xs:import namespace='http://www.biomoby.org/moby'/>
   <xs:element name='runMyService' type='tns:runMyService'/>
   <xs:element name='runMyServiceResponse' type='tns:runMyServiceResponse'/>
   <xs:complexType name='runMyService'>
    <xs:sequence>
     <xs:element minOccurs='0' name='arg0' type='ns1:mobyMessage'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='runMyServiceResponse'>
    <xs:sequence>
     <xs:element minOccurs='0' name='return' type='ns1:mobyMessage'/>
    </xs:sequence>
   </xs:complexType>
  </xs:schema>
 </types>
 <message name='MobyDocWebService_runMyService' 
xmlns='http://schemas.xmlsoap.org/wsdl/'>
  <part element='tns:runMyService' name='runMyService'/>
 </message>
 <message name='MobyDocWebService_runMyServiceResponse'>
  <part element='tns:runMyServiceResponse' name='runMyServiceResponse'/>
 </message>
 <portType name='MobyDocWebService'>
  <operation name='runMyService' parameterOrder='runMyService'>
   <input message='tns:MobyDocWebService_runMyService'/>
   <output message='tns:MobyDocWebService_runMyServiceResponse'/>
  </operation>
 </portType>
 <binding name='MobyDocWebServiceBinding' type='tns:MobyDocWebService'>
  <soap:binding style='document' 
transport='http://schemas.xmlsoap.org/soap/http'/>
  <operation name='runMyService'>
   <soap:operation soapAction=''/>
   <input>
    <soap:body use='literal'/>
   </input>
   <output>
    <soap:body use='literal'/>
   </output>
  </operation>
 </binding>
 <service name='MobyDocWebServiceService'>
  <port binding='tns:MobyDocWebServiceBinding' name='MobyDocWebServicePort'>
   <soap:address 
location='http://127.0.0.1:8080/BioServices/MobyDocWebService'/>
  </port>
 </service>
</definitions>
*********************************************************************************************

This WSDL is AUTOMATICALLY generated for the Service:

*********************************************************************************************
package es.bsc.inb.ejb.moby;

import javax.jws.WebService;
import javax.ejb.Stateless;
import org.biomoby.shared.jaxb.messages.MobyMessage;

@Stateless()
@WebService()
public class MobyDocWebService
{
    public MobyMessage runMyService(MobyMessage msg)
    {
        return msg;
    }
}
*********************************************************************************************

Cheers,

Dmitry



More information about the MOBY-dev mailing list