[MOBY-dev] is anything wrong with asynchrounous services?

Martin Senger martin.senger at gmail.com
Tue May 29 21:45:16 UTC 2007


I have just spent a day trying to implement the asynchronous services spec
in jMoby. Thanks to an immediate help from Natalia, Johan, Romina, Ivan a
probably others, I was able to call an asynchronous service and make some
progress. The progress stopped, however, soon, and I am now wondering where
is the problem. It can be in the asynchronous specification itself, or in
the implementation of a service I was trying to call, or in my lack of
knowledge of web services protocols. Please help me clarify the situation.

The problem starts immediately at the beginning, with the first response, so
we do not need to go  and dive into the SOAP headers. Just as the spec says,
the first step is that a client sends a request (submit) to an asynchronous
service:

"This message is identical to the BioMOBY XML to request synchronous service
> execution. The only difference is that
> the client sends the request to the servicename_submit SOAP method."
>

This went fine, in my case.

The second step is that the service responds with a body that contains a
WS-Addressing-based EndpointReference. The service I was using, indeed, did
so. The problem is not with the contents of such response, but with its
format (well, now I am already expressing my opinions, which I should  not
do...). It looks like this:

<?xml version="1.0" encoding="UTF-8"?>
   <soap:Envelope xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsrl="http://docs.oasis-open.org/wsrf/rl-2" xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsrp="
http://docs.oasis-open.org/wsrf/rp-2" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:wsa="
http://www.w3.org/2005/08/addressing">
      <soap:Body wsu:Id="myBody">
         <runFastaForAminoAcids_submitResponse xmlns="http://biomoby.org/">
            <wsa:EndpointReference xmlns:wsa="
http://www.w3.org/2005/08/addressing">
               <wsa:Address>
http://inb.bsc.es/cgi-bin/mobyServices/asyncDispatcher.cgi</wsa:Address>
               <wsa:ReferenceParameters>
                  <moby:ServiceInvocationId xmlns:moby="http://biomoby.org/
">5627142941072148070044</moby:ServiceInvocationId>
               </wsa:ReferenceParameters>
            </wsa:EndpointReference>
         </runFastaForAminoAcids_submitResponse>
      </soap:Body>
   </soap:Envelope>


The above is exactly what the biomoby spec for async. services says it
should be. That's why I do not think that the problem is in the
implementation. I believe that it is either in the spec or in my
understanding (or better the lack of understanding). What I see is that this
is not an RPC/Encoded response. This looks more like a document/literal
response. And, indeed, the Axis toolkit I am using, refuses to parse such
message complaining that there are some unexpected children elements. And it
is true: in the RPC/Encoded style, the contents of the
<runFastaForAminoAcids_submitResponse>
tag (or its child, I am not sure) should be a string without any (visible,
not-encoded) XML. Like in any normal Biomoby response.

Shortly, this response should look, XML-encoding-wise, like any other
Biomoby response. Which it does not I think.

So where is the problem? It is just me who do not fully understand the
difference between RPC/Encoded and document/literal style? Even if so, I
wonder if anybody can "convince" Axis to send a request as RPC/encoded (as
the spec requires) and receive a response as document/literal.

You may ask why this does not matter in the Eddie's AsyncClient? As I see it
it is because Eddie creates there everything manually, so he is allowed to
send a request one style and parse the response in another style. Which I
feel is not a right way to do. Of course, I said already several times that
I will be glad if someone explains that I see it in a wrong way.

I really appreciate any answers, especially please soon answers - because
the next weekend there is a small meeting of Java biomoby developers in
Vancouver and we may discuss this issue there if we have some background
explanations and opinions from you.

Cheers,
Martin

-- 
Martin Senger
   email: martin.senger at gmail.com
   skype: martinsenger



More information about the MOBY-dev mailing list