[MOBY-dev] invoking document literal services
Dmitry Repchevsky
dmitry.repchevski at bsc.es
Fri Jul 3 18:15:50 UTC 2009
>
> Excuse me if I sound daft.. but what is the point of making a
> Document/literal service if you end up having to use xsd:any and a
> normal Moby message? (Or do we have an XSD schema for Moby
> messages..?)
>
I agree with you, it is not my fault that moby is incompatible with
schema...
Moby message can be divided into two parts, auxiliary one and an
ontology one.
First part is schema compatible, another one no.
> You might with doc/literal be able to support a more up-to-date
> clients like Axis2 and CXF for Java, but if it's just a wrapper for
> the 'real' Moby message inside that needs to be parsed manually or
> using moby libraries.. what is the big gain? :-)
>
Not exactly.
The message 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>
**************************************************
CAN be parsed using JAX-WS standard methods.
I have an alternative BioMoby Java API based on JAX-WS/JAXB and using it
I CAN provide STANDARD doc-lit BioMoby services:
**************************************************
@WebService()
@SOAPBinding(style=SOAPBinding.Style.DOCUMENT,
use=SOAPBinding.Use.LITERAL,
parameterStyle=SOAPBinding.ParameterStyle.BARE)
//@XmlSeeAlso({AminoAcidSequence.class, MobyString.class})
public class MobyDocWebService
{
@WebResult(name="MOBY", targetNamespace="http://www.biomoby.org/moby")
public MobyMessage runMyService(@WebParam(name="MOBY", targetNamespace="http://www.biomoby.org/moby", mode = WebParam.Mode.IN) MobyMessage msg)
{
return msg; // just to return back the message
}
}
**************************************************
Another project I have done is to automagically generate a JAX-WS proxy
application (*.war) for any (including asynchronous) biomoby services.
Such a proxy expose biomoby services as WSDL doc-lit ones (+WSA for
asynchrony) with preserving all the moby ontology.
Cheers,
Dmitry
More information about the MOBY-dev
mailing list