axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lev Lvovsky <lis...@sonous.com>
Subject Re: wsdl2java.sh and operation outfault definitions
Date Mon, 10 May 2010 16:38:55 GMT
Hi Amila,

On May 8, 2010, at 8:25 PM, Amila Suriarachchi wrote:

>> On Fri, May 7, 2010 at 6:12 AM, Lev Lvovsky <lists2@sonous.com> wrote:
>> Hello,
>> 
>> I'm running a wsdl file through the wsdl2java.sh application and am running into
some unexpected problems.
>> 
>> Below is pseudo-code of the stubbed client code which calls our webservice - in particular
the method which gets called to communicate with the service and get the response we're looking
for:
>> 
>> ...
>>  public  com.sonous.test.wsdl.TestServiceStub.TestResponse getTestResonse()
>>    throws java.rmi.RemoteException, com.sonous.test.wsdl.TestFault{
>> ...
>> 
>> the portion of the WSDL which corresponds to this is:
>> 
>> ...
>> <output element="test:TestResponse"/>
>> <outfault ref="te:TestFault" />
>> </operation>
>> ...
>> 
>> Normal operation is as expected, however when I invoke an error in the service (perform
a GET on an incorrect URL), the application dies complaining about not getting the response
that it expected (in fact it got an XML document which is totally different from the regular
response, which is normal in my mind).
> 
> you can not get a fault as described in the wsdl for an incorrect url. Here the request
never reach the server. Normally these faults refer to business logic exceptions at the server
side.

In our specific case, our service can respond with an error document (as well as error HTTP
code) if the URL accessed refers to a resource which is not available (for example, it may
have been removed in the intervening moments since the client did a List operation).  This
is an entirely valid response from the service, and seems like it should be handled by the
client gracefully.

Moreover, if my interpretation of the WSDL 2.0 W3C spec is correct, there are two ways for
the client to get an error in this case - "infault", and "outfault".  If a URL is incorrect
entirely (e.g. I just point to www.google.com), I would imagine that would result in an infault,
otherwise, if our own service gives back a document which indicates an error (as described
by the WSDL and referenced Schemas), that would indicate an outfault.

thanks,
-lev


> 
> thanks,
> Amila.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Mime
View raw message