On Fri, May 7, 2010 at 6:12 AM, Lev Lvovsky <lis...@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.

thanks,
Amila.

>
> My assumption was that the client code would realize that it received an
> error message and at least die with a generic "I encountered a fault as
> you'd described it" in the WSDL, or something similar.
>
> Is there something incorrect in the WSDL representation, something lacking
> in the client implementation (written by me), or can the stubbed code only
> deal with one type of response?
>
> Any input would be greatly appreciated!
>
> thanks,
> -lev
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
> For additional commands, e-mail: java-user-h...@axis.apache.org
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Reply via email to