[MOBY-dev] soap encoding

Dmitry Repchevsky dmitry.repchevski at bsc.es
Mon Apr 23 10:40:18 UTC 2007


Hello,

My name is Dmitry and I was contracted by INB (Spain) to work on web 
services (JMoby).
Reading some papers from JMoby I have implemented some services using 
MoSeS and by now have a jboss 4.03sp1 working.
The problem is that JMoby uses "soap encoding" (section 5) while this 
encoding is considered obsolete and unfortunately no any modern java 
application servers support it.
Actually JBoss dropped support starting from 4.04 when they passed to 
JEE5 compatible web services stack (jax-ws compatible).

The java skeleton generated by MoSeS generates the service endpoint 
method passing an Object to it (while according moby wsdl it should be a 
string).
There is no problem to change the Object to String (this is the only 
change needed) to generate equal wsdl (otherwise wsdl generated by wsdp 
contains "xsd:anyType" that is incompatible with web services WS-I 
specification).

Even more this change would permit to generate the web service with 
"rpc-literal" encoding.
We have tested generated web-service with both types of clients - 
"soap-encoding" and "rpc-literal" encoding on both platforms (java & perl).
It works well.

The idea is to make (at least java, not sure for perl) webservices that 
supports both encoding thinking that in a future we could migrate also 
clients (actually the only thing needed is to recompile it with new 
generated wsdl. This would permit us to move to JBoss5 or any JEE 
compatible server in a future.

Here I attach some example of wsdl generated with and without "literal"
note: the soap-encoding version actually is not that one generated from 
MoSeS interface, because  MoSeS generates "Object"  that translates to 
"xsd:anyType"
*****************************************************
<?xml version="1.0" encoding="UTF-8"?>

<definitions name="runEmbossAntigenicFromSequence" 
targetNamespace="http://biomoby.org/" xmlns:tns="http://biomoby.org/" 
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="runEmbossAntigenicFromSequenceSEI_runEmbossAntigenicFromSequence">
   <part name="String_1" type="xsd:string"/></message>
 <message 
name="runEmbossAntigenicFromSequenceSEI_runEmbossAntigenicFromSequenceResponse"> 

   <part name="result" type="xsd:string"/></message>
 <portType name="runEmbossAntigenicFromSequenceSEI">
   <operation name="runEmbossAntigenicFromSequence" 
parameterOrder="String_1">
     <input 
message="tns:runEmbossAntigenicFromSequenceSEI_runEmbossAntigenicFromSequence"/> 

     <output 
message="tns:runEmbossAntigenicFromSequenceSEI_runEmbossAntigenicFromSequenceResponse"/></operation></portType> 

 <binding name="runEmbossAntigenicFromSequenceSEIBinding" 
type="tns:runEmbossAntigenicFromSequenceSEI">
   <soap:binding transport="http://schemas.xmlsoap.org/soap/http" 
style="rpc"/>
   <operation name="runEmbossAntigenicFromSequence">
     <soap:operation soapAction=""/>
     <input>
       <soap:body use="literal" namespace="http://biomoby.org/"/></input>
     <output>
       <soap:body use="literal" 
namespace="http://biomoby.org/"/></output></operation></binding>
 <service name="RunEmbossAntigenicFromSequence">
   <port name="runEmbossAntigenicFromSequenceSEIPort" 
binding="tns:runEmbossAntigenicFromSequenceSEIBinding">
     <soap:address 
location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>
*****************************************************

*****************************************************
<?xml version="1.0" encoding="UTF-8"?>

<definitions name="runEmbossAntigenicFromSequence" 
targetNamespace="http://biomoby.org/" xmlns:tns="http://biomoby.org/" 
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="runEmbossAntigenicFromSequenceSEI_runEmbossAntigenicFromSequence">
   <part name="String_1" type="xsd:string"/></message>
 <message 
name="runEmbossAntigenicFromSequenceSEI_runEmbossAntigenicFromSequenceResponse"> 

   <part name="result" type="xsd:string"/></message>
 <portType name="runEmbossAntigenicFromSequenceSEI">
   <operation name="runEmbossAntigenicFromSequence" 
parameterOrder="String_1">
     <input 
message="tns:runEmbossAntigenicFromSequenceSEI_runEmbossAntigenicFromSequence"/> 

     <output 
message="tns:runEmbossAntigenicFromSequenceSEI_runEmbossAntigenicFromSequenceResponse"/></operation></portType> 

 <binding name="runEmbossAntigenicFromSequenceSEIBinding" 
type="tns:runEmbossAntigenicFromSequenceSEI">
   <soap:binding transport="http://schemas.xmlsoap.org/soap/http" 
style="rpc"/>
   <operation name="runEmbossAntigenicFromSequence">
     <soap:operation soapAction=""/>
     <input>
       <soap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" 
namespace="http://biomoby.org/"/></input>
     <output>
       <soap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" 
namespace="http://biomoby.org/"/></output></operation></binding>
 <service name="RunEmbossAntigenicFromSequence">
   <port name="runEmbossAntigenicFromSequenceSEIPort" 
binding="tns:runEmbossAntigenicFromSequenceSEIBinding">
     <soap:address 
location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>
*****************************************************

Yours Sincerely,

Dmitry,



More information about the MOBY-dev mailing list