axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Gekko <>
Subject Re: [axis2] in-only MEP
Date Thu, 18 Aug 2005 12:59:32 GMT
Hi Anne,

I'm using axis2 but with a wsdl written following the 1.1 specification. 
  The wsdl portType and binding are very simple:

  <wsdl:portType name="BankPortType">
   <wsdl:operation name="accumulate">
    <wsdl:input message="tns:accumulateRequestMessage" />

  <wsdl:binding name="BankBinding" type="tns:BankPortType">
   <soap:binding transport="" 
style="document" />
   <wsdl:operation name="accumulate">
    <soap:operation soapAction="accumulate" />
     <soap:body use="literal" />

Then I ran the wsdl2java tool and generated the classes both for the 
client and the server.  I modified the message receiver so that it 
extends AbstractInMessageReceiver instead of 
AbstractInOutSyncMessageReceiver and the stub so that it uses the 
MessageSender API instead of Call.  This works fine except that it has, 
as you said, an in-only MEP behaviour instead of Robust in-only.

In the client I tried to set the field isExceptionToBeThrownOnSOAPFault 
of the MessageSender object instance to true, but it still doesn't throw 
an exception when it receives a soap fault.

How can I modify the code in order to have a robust in-only MEP behaviour?
I've not looked into wsdl 2.0 do you think that it worth the effort? 
Maybe it has more expressive power so it's so the code that id generated 
from the wsdl conforms better to what you have in mind.



Anne Thomas Manes wrote:
> Are you using Axis1 or Axis2?
> If you are using Axis1, then you'll need to catch the HTTP 500 error
> code. Your client won't actually receive the SOAP fault, because Axis
> won't process any returned SOAP messages.
> If you're using Axis 2, along with SOAP 1.2 and WSDL 2.0, then you can
> use the Robust In-Only MEP [1], which supports return of fault
> messages.
> [1]
> Anne
> On 8/17/05, Gordon Gekko <> wrote:
>>I've a question about in-only message exchange pattern and exception.
>>I've written a client and a server that both manage in-only message
>>exchange.  Now, when the server computation goes fine I get back a http
>>packet with 202 (accepted) as response code and when something goes
>>wrong an exception is raised in the server and I get back an http
>>message with response code 500 (internal server error) and a soap fault
>>message in the body.  But in the latter case an exception is not raised
>>in the client so I cannot notice that something went wrong in the server.
>>I know that it is called "fire and forget" but I should not be aware
>>that something went wrong in the server?  Or am I doing something wrong?
>>Thanks a lot for any reply!

View raw message