WSDL 1.1 does not support the Robust In-Only MEP. If you are using WSDL 1.1 (pretty much required if you want to support interop), you must catch the HTTP error.
Anne On 8/18/05, Gordon Gekko <[EMAIL PROTECTED]> wrote: > 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:operation> > </wsdl:portType> > > <wsdl:binding name="BankBinding" type="tns:BankPortType"> > <soap:binding transport="http://schemas.xmlsoap.org/soap/http" > style="document" /> > <wsdl:operation name="accumulate"> > <soap:operation soapAction="accumulate" /> > <wsdl:input> > <soap:body use="literal" /> > </wsdl:input> > </wsdl:operation> > </wsdl:binding> > > 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. > > Thanks, > > Diego > > > 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] http://www.w3.org/TR/2005/WD-wsdl20-adjuncts-20050803/#patterns > > > > Anne > > > > On 8/17/05, Gordon Gekko <[EMAIL PROTECTED]> wrote: > > > >>Hi! > >> > >>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! > >> > >>Diego > >> > > > >> > > >
