The API allows to develop BioMoby services based on JAX-WS architecture. Using this API one can implement a synchronous (RPC-encoded) "moby" servces. It also contains an experimental support for asynchronous Document/Literal services ("doc-literal-async").
One can use a MobyGenerator utility to generate EJB3 service templates based on this API. Also it is easy to transform these generated services to a Servlet based ones.
Here is a simple BioMoby synchronous service implementation:
@WebServiceProvider(serviceName="TestService", portName="runTest", targetNamespace="urn:TestService/wsdl", wsdlLocation = "WEB-INF/wsdl/TestService.wsdl") @javax.xml.ws.ServiceMode(value=javax.xml.ws.Service.Mode.MESSAGE) @Stateless(name="NCBIBlastp") public class NCBIBlastpService extends MobyProvider implements Provider { @Override public MobyMessage call(MobyMessage message) { return message; } }
And the WSDL file description:
<?xml version="1.0" encoding="UTF-8"?> <definitions name="TestService" targetNamespace="urn:TestService/wsdl" xmlns:tns="urn:TestService/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <types/> <message name="RequestMessage"> <part name="request" type="xsd:string"/> </message> <message name="ResponseMessage"> <part name="result" type="xsd:string"/> </message> <portType name="runTestSEI"> <operation name="runTest" parameterOrder="request"> <input message="tns:RequestMessage"/> <output message="tns:ResponseMessage"/> </operation> </portType> <binding name="runTestSEIBinding" type="tns:runTestSEI"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/> <operation name="runTest"> <soap:operation soapAction=""/> <input> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:TestService/wsdl"/> </input> <output> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:TestService/wsdl"/> </output> </operation> </binding> <service name="TestService"> <port name="runTest" binding="tns:runTestSEIBinding"> <soap:address location="REPLACE_WITH_ACTUAL_URL"/> </port> </service> </definitions>