| 
| Exception handling with JAX-RPC [message #179557] | Thu, 21 September 2006 11:44  |  | 
| Eclipse User  |  |  |  |  | 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 #179672 is a reply to message #179639] | Fri, 22 September 2006 07:12   |  | 
| Eclipse User  |  |  |  |  | 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 #179810 is a reply to message #179639] | Mon, 25 September 2006 10:30  |  | 
| Eclipse User  |  |  |  |  | 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>
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.04941 seconds