Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Exception handling with JAX-RPC
Exception handling with JAX-RPC [message #179557] Thu, 21 September 2006 15:44 Go to next message
Eclipse UserFriend
Originally posted by: Ben_Engbers.yahoo.com

Hi,

I am using Callisto with all features updated (yesterday).

I have read the article "Exception Handling with JAX-RPC" from Ping Wang
and Russell Butek and I believe that I am beginning to understand how I
should use wsdl:fault in my webservice.

Conform the instructions, I added the following lines to my wsdl:

<types>
..
<xsd:element name="PreFillResponseFault">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="compliance" type="xsd:string"></xsd:element>
<xsd:element name="bedrijfsObject" type="xsd:string"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</types>

<wsdl:message name="PreFillFaultMsg">
<wsdl:part name="fault" element="tns:PreFillResponseFault" />
</wsdl:message>

<wsdl:operation name="getPreFill">
<wsdl:input message="tns:getPreFillRequest"></wsdl:input>
<wsdl:output message="tns:getPreFillResponse"></wsdl:output>
<wsdl:fault name="fault" message="tns:PreFillFaultMsg"></wsdl:fault>
</wsdl:operation>
The WSDL-editor does not show any errors.

When I use the wizzard to generate the webservice, WTP generates
PreFillResponseFault as if it were a regular type. The class does not
extend java.lang.Exception.
I can add the necessary code manually but as soon as I try to test the
code with the webservices client, all the changes are overwritten.

Is it possible to use Callisto to build doc/literal webservices that use
wsdl:fault?

Ben
Re: Exception handling with JAX-RPC [message #179639 is a reply to message #179557] Fri, 22 September 2006 04:06 Go to previous messageGo to next message
Andrew Mak is currently offline Andrew MakFriend
Messages: 41
Registered: July 2009
Member
Hi Ben,

You may be missing the binding part for the fault element in your wsdl.
Check your wsdl and see if you have something similar to the following:

<wsdl:binding ...>
<wsdl:operation ...>
...
<wsdl:fault name="fault"> <!-- note here -->
<soap:fault use="literal" name="fault"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>

If not, the wsdl editor can help to generate that automatically. From the
wsdl editor's design view, right click on the binding node and select
"Generate Binding Content". Then check the "Overwrite existing binding
information" box and click finish.

Now if you regenerate the web service, it should create
PreFillResponseFault as a subclass of org.apache.axis.AxisFault (which
extends RemoteException).

Hope that helps,

Andrew
Re: Exception handling with JAX-RPC [message #179672 is a reply to message #179639] Fri, 22 September 2006 11:12 Go to previous messageGo to next message
Ben Engbers is currently offline Ben EngbersFriend
Messages: 4
Registered: July 2009
Junior Member
Hi,

Thanks a lot! I'm now at home but I know that I did not write a line
like that. I'll check monday and will tell you the result.

I really like working with Eclipse/Callisto and especially the WTP-tools
have helped me a lot to understand how to use webservices (my colleagues
who still have to work with Jdeveloper 10.1.2 are jealous :-) but I have
heared that 10.1.3 should be significantly better).
The tutorials on the Eclipse-WTP site are very instructive on how to
start writing webservices but I am certain that more information, like
the one you provided, would help a lot of people. Maybe that Kathy
and/or a colleague could write such a tutorial?

Have a nice weekend,
Ben

Andrew Mak schreef:
> Hi Ben,
>
> You may be missing the binding part for the fault element in your wsdl.
> Check your wsdl and see if you have something similar to the following:
>
> <wsdl:binding ...>
> <wsdl:operation ...>
> ...
> <wsdl:fault name="fault"> <!-- note here -->
> <soap:fault use="literal" name="fault"/>
> </wsdl:fault>
> </wsdl:operation>
> </wsdl:binding>
>
> If not, the wsdl editor can help to generate that automatically. From
> the wsdl editor's design view, right click on the binding node and
> select "Generate Binding Content". Then check the "Overwrite existing
> binding information" box and click finish.
>
> Now if you regenerate the web service, it should create
> PreFillResponseFault as a subclass of org.apache.axis.AxisFault (which
> extends RemoteException).
>
> Hope that helps,
>
> Andrew
>
>
Re: Exception handling with JAX-RPC [message #179696 is a reply to message #179672] Fri, 22 September 2006 14:29 Go to previous messageGo to next message
Andrew Mak is currently offline Andrew MakFriend
Messages: 41
Registered: July 2009
Member
Hi Ben,

Thanks for your comments and suggestions =) By the way, there is a WSDL
editor tutorial here:
http://www.eclipse.org/webtools/community/tutorials/WSDLEdit or/WSDLEditorTutorial.html

But it's not updated for WTP 1.5 yet. I'll forward your comments to the
appropriate team so they'll keep in mind when updating the tutorials.

Thanks,

Andrew
Re: Exception handling with JAX-RPC [message #179810 is a reply to message #179639] Mon, 25 September 2006 14:30 Go to previous message
Eclipse UserFriend
Originally posted by: Ben_Engbers.yahoo.com

Hi,

I added the soap:fault line and it works!
Out production webserver is Oracle IAS and some time ago I asked why my
sample proxy application which ran without problems on my development
machine, would nor run on the Oracle server.

Once I found the solution, I know that it is pretty dumb but all I had
to do was copy the endpoint from the WSDL and use it in the
setEndpoint-method.
Sometimes it is this kind of simple information which can take a lot of
time to look for.

Ben

Andrew Mak schreef:
> Hi Ben,
>
> You may be missing the binding part for the fault element in your wsdl.
> Check your wsdl and see if you have something similar to the following:
>
> <wsdl:binding ...>
> <wsdl:operation ...>
> ...
> <wsdl:fault name="fault"> <!-- note here -->
> <soap:fault use="literal" name="fault"/>
> </wsdl:fault>
> </wsdl:operation>
> </wsdl:binding>
Previous Topic:Run all Tomcat apps not just WTP deployed apps
Next Topic:Setting context for tomcat 5.0
Goto Forum:
  


Current Time: Fri Apr 19 16:29:57 GMT 2024

Powered by FUDForum. Page generated in 0.01641 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top