| Author |
Message |
|
|
Post subject: (5.1&5.5) Generating Web Service Client results in NPE
Posted: May 25, 2007 - 08:46 AM
|
|

Joined: May 25, 2007
Posts: 2
|
|
When generating a new web servixce client using a wsdl file containing a SOAP fault the generation fails. With the following stacktrace in the error log:
| Code: |
eclipse.buildId=M20070212-1330
java.version=1.5.0_11
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=nl_NL
Command-line arguments: -os win32 -ws win32 -arch x86
Error
Fri May 25 08:46:45 CEST 2007
Error generating services
java.lang.NullPointerException
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.getExceptionClass(AbstractServiceGenerator.java:428)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generateFaults(AbstractServiceGenerator.java:407)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generateOperation(AbstractServiceGenerator.java:366)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generate(AbstractServiceGenerator.java:123)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generate(AbstractServiceGenerator.java:67)
at org.codehaus.xfire.gen.jsr181.ServiceInterfaceGenerator.generate(ServiceInterfaceGenerator.java:49)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generate(AbstractServiceGenerator.java:54)
at org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java:167)
at com.genuitec.eclipse.ws.xfire.generator.WSGenJob.run(WSGenJob.java:209)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
|
I first created the web service using JSR181 and deployed it.
Saved the resulting wsdl
Used the wizard to create a new web service client...
No validation errors found -> next
Dialog pops up with Error during Generation :(
Removing MyException from the throw clause from the orginal webmethod results in the client stubs being generated. Soap fault handling seems to be broken!
I have all the code and logs available in a zip file. How can I submit this information? |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: (5.1&5.5) Generating Web Service Client results in N
Posted: May 25, 2007 - 04:41 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23855
|
|
Please email them to support@myeclipseide.com ATTN Riyad, with a link to this post for reference. We'll look at them right away, thank you for the report. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: RE: (5.1&5.5) Generating Web Service Client results in N
Posted: May 29, 2007 - 02:42 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23855
|
|
Ernst-Jan,
Thank you for the email, we are looking into your example project. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: RE: (5.1&5.5) Generating Web Service Client results in N
Posted: Sep 16, 2007 - 11:16 AM
|
|
Joined: Sep 16, 2007
Posts: 1
|
|
Hi,
Any news on this. We are getting the same error withour WSDL. When we remove faults, everything is OK. In validation phse, we are getting error, that WS-I test assertion document (TAD) was either not found or..
Matra |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Sep 17, 2007 - 12:17 AM
|
|
Veteran Member


Joined: Jul 18, 2004
Posts: 21
|
|
Count me in. I'm trying to generate against the following wsdl:
| Code: | <?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2005 sp2 U (http://www.altova.com) by Rakesh Vidyadharan (Tribune Media Services) -->
<!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by John Wolak (Tribune Media Services) -->
<!-- $Id: xtvd.wsdl,v 1.22 2004/10/20 18:34:41 rakesh Exp $ -->
<wsdl:definitions
xmlns:tms="urn:TMSWebServices"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:TMSWebServices"
name="xtvdWebService"
>
<wsdl:types>
<xsd:schema targetNamespace="urn:TMSWebServices">
<xsd:include schemaLocation="tmsxtvd.xsd"/>
<xsd:complexType name="xtvdResponse">
<xsd:sequence>
<xsd:element name="messages">
<xsd:annotation>
<xsd:documentation xml:lang="en">A collection of messages that may be sent back by the server to the client. Messages are usually used by the server to notify the user of changes to their subscription caused by automatic changes in station's that are part of their subscription. For instance, messages are passed back if a lineup selected by the user is no-longer valid, if all the stations selected by the user has been removed as they are no longer valid ... </xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="message" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation xml:lang="en">An individual message that is passed back by the server.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element ref="tms:xtvd"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="downloadTimes">
<xsd:sequence>
<xsd:element name="blockedDownloadTime" type="tms:dateTime" minOccurs="0">
<xsd:annotation>
<xsd:documentation xml:lang="en">The time (in UTC) until which download requests will be blocked by the webservice.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="suggestedDownloadTime" type="tms:dateTime">
<xsd:annotation>
<xsd:documentation xml:lang="en">The time (in UTC) at which the webservice recommends that the client attempt another download request.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="downloadResponse">
<wsdl:part name="xtvdResponse" type="tms:xtvdResponse"/>
</wsdl:message>
<wsdl:message name="downloadRequest">
<wsdl:part name="startTime" type="tms:dateTime"/>
<wsdl:part name="endTime" type="tms:dateTime"/>
</wsdl:message>
<wsdl:message name="acknowledgeResponse">
<wsdl:part name="downloadTimes" type="tms:downloadTimes"/>
</wsdl:message>
<wsdl:message name="voidMessage">
<wsdl:documentation>A general success message to indicate a successful transaction. In general failures will result in SOAP Faults.</wsdl:documentation>
</wsdl:message>
<wsdl:message name="webserviceFault"/>
<wsdl:portType name="xtvdPortType">
<wsdl:operation name="download">
<wsdl:input message="tms:downloadRequest"/>
<wsdl:output message="tms:downloadResponse"/>
<wsdl:fault name="webserviceFault" message="tms:webserviceFault"/>
</wsdl:operation>
<wsdl:operation name="acknowledge">
<wsdl:input message="tms:voidMessage"/>
<wsdl:output message="tms:acknowledgeResponse"/>
<wsdl:fault name="FaultName" message="tms:webserviceFault"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="xtvdBinding" type="tms:xtvdPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="download">
<soap:operation soapAction="urn:TMSWebServices:xtvdWebService#download" style="rpc"/>
<wsdl:input>
<soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:TMSWebServices"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:TMSWebServices"/>
</wsdl:output>
<wsdl:fault name="webserviceFault">
<soap:fault name="webserviceFault" use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="acknowledge">
<soap:operation soapAction="urn:TMSWebServices:xtvdWebService#acknowledge" style="rpc"/>
<wsdl:input>
<soap:body use="literal" namespace="urn:TMSWebServices"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal" namespace="urn:TMSWebServices"/>
</wsdl:output>
<wsdl:fault name="FaultName">
<soap:fault name="FaultName" use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="xtvdWebService">
<wsdl:port name="xtvdWebServicePort" binding="tms:xtvdBinding">
<soap:address location="http://webservices.schedulesdirect.tmsdatadirect.com/schedulesdirect/tvlistings/xtvdService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
|
[/code] |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Sep 17, 2007 - 03:50 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23855
|
|
rshendershot,
When I paste your WSDL into a WSDL file in MyEclipse there are 6 errors marked on the file. With those errors it is unlikely the WSDL validator is going to pass this file through to generation stage. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Sep 19, 2007 - 07:41 PM
|
|
Registered Member


Joined: Mar 30, 2006
Posts: 3
|
|
I have the same issue. As soon as I add excpetion/fault handling to the method it blows up with the described NullPointerException. There seems to be an issue with that. The problem are actually not the validation errors, which I get too. It nevertheless works as long as you don't use faults.
The validation errors are another problem though. In my case the WSDL is created by xfire anyway. If it were really wrong then xfire would have a serious issue and I would also expect the the stub generation to fail, but it does not. I think it is a problem with the validator.
However, validation issue is a minor problem, since the stub generation still works, but the fault issue is major, since I am not able to generate stubs at all.
Riyad, if you have a fix for that then please let me know. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Sep 19, 2007 - 08:27 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23855
|
|
steppoll,
I don't have a fix at the moment for it, but I've passed this thread off to one of our WS devs to take a look at and see if he can figure out hwat is going on. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|