- This topic has 2 replies, 3 voices, and was last updated 18 years, 5 months ago by Brian Fernandes.
-
AuthorPosts
-
toconnorMemberI have been trying the web services tools in m2. I am using a clean install of Eclipse 3.2. I am using a fairly simple WSDL for a web service we recently implemented using Apache Axis. I am attempting to do a “top down” implementation which is the way we would normally develop our web services.
Per instructions created web service project. I selected the following Xfire libraries: Core, Http Client, JAXB2, XMLBeans, Security, Miscellaneous (probably more than I needed.) My compiler compliance level is 5. Using java 1.5.0_06
I then used the wizard to add a web service. I indicated “top down”, pointed to my WSDL and indicated JAXB2 for the java binding. When I use JAXB2 for binding, it seems to generate OK. I get my “impl”, along with a java class representing each complex type specified in the WSDL.
I then repeated the process using a new web service project, but this time using XMLBeans for binding. (We would prefer to use XMLBeans) This fails and nothing generates. I get the following on the log:
!ENTRY com.genuitec.eclipse.ws.xfire 4 0 2006-07-09 14:36:27.875
!MESSAGE Error generating services
!STACK 0
java.lang.NullPointerException
at org.apache.xmlbeans.impl.common.QNameHelper.hexsafedir(QNameHelper.java:176)
at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl.typeSystemForComponent(SchemaTypeLoaderImpl.java:249)
at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl.findDocumentTypeRef(SchemaTypeLoaderImpl.java:430)
at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.findDocumentType(SchemaTypeLoaderBase.java:129)
at org.codehaus.xfire.gen.xmlbeans.XmlBeansSchemaSupport.getType(XmlBeansSchemaSupport.java:50)
at org.codehaus.xfire.gen.xmlbeans.XmlBeansSchemaSupport.getType(XmlBeansSchemaSupport.java:24)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.getReturnType(AbstractServiceGenerator.java:362)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generate(AbstractServiceGenerator.java:87)
at org.codehaus.xfire.gen.jsr181.ServiceInterfaceGenerator.generate(ServiceInterfaceGenerator.java:43)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generate(AbstractServiceGenerator.java:53)
at org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java:125)
at com.genuitec.eclipse.ws.xfire.generator.WSGenJob.run(WSGenJob.java:59)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)Below find my configuration and a copy of the WSDL. Thanks……
*** Date: Sun Jul 09 15:07:37 CDT 2006
*** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.5.0_06*** MyEclipse details:
MyEclipse Enterprise WorkbenchVersion: 5.0 Milestone 2
Build id: 20060703-5.0-M2*** Eclipse details:
Eclipse SDKVersion: 3.2.0
Build id: M20060629-1905Eclipse Graphical Editing Framework
Version: 3.2.0.v20060626
Build id: 20060627-0816Eclipse Platform
Version: 3.2.0.v20060609m-AgOexn6hlEUsvBO
Build id: M20060629-1905Eclipse RCP
Version: 3.2.0.v20060609m-SVDNgVrNoh-MeGG
Build id: M20060629-1905Eclipse Java Development Tools
Version: 3.2.0.v20060609m-F7snq1fxia-Z4XP
Build id: M20060629-1905Eclipse Plug-in Development Environment
Version: 3.2.0.v20060609m——6zXJJzJzJq
Build id: M20060629-1905Eclipse Project SDK
Version: 3.2.0.v20060609m-GNq6oQq-7es-Y81
Build id: M20060629-1905Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
C:\Eclipse32myEclipse\eclipse\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
9f0_84
-vm
C:\WINDOWS\system32\javaw.exeMy WSDL file follows (Note I alos tried this with a verson of the WSDL that “imports” the XSD. Same relsult. Works for JAXB not XMLBeans):
<?xml version=”1.0″ encoding=”UTF-8″?>
<wsdl:definitions targetNamespace=”http://xmlschemas.sentry.com/Pricing/Services/Scorecard/2006/05/23″ xmlns:apachesoap=”http://xml.apache.org/xml-soap” xmlns:impl=”http://xmlschemas.sentry.com/Pricing/Services/Scorecard/2006/05/23″ xmlns:intf=”http://xmlschemas.sentry.com/Pricing/Services/Scorecard/2006/05/23″ xmlns:wsdl=”http://schemas.xmlsoap.org/wsdl/” xmlns:wsdlsoap=”http://schemas.xmlsoap.org/wsdl/soap/” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>
<!–WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)–>
<wsdl:types>
<schema elementFormDefault=”qualified” targetNamespace=”http://xmlschemas.sentry.com/Pricing/Services/Scorecard/2006/05/23″ xmlns=”http://www.w3.org/2001/XMLSchema”>
<complexType name=”HomePolicyType”>
<sequence>
<element name=”PolicyNbr” nillable=”true” type=”xsd:string”/>
<element name=”NewRewnewInd” nillable=”true” type=”xsd:string”/>
<element name=”CompanyCde” nillable=”true” type=”xsd:string”/>
<element name=”LOBCde” type=”xsd:string”/>
<element name=”WrittenDte” nillable=”true” type=”xsd:string”/>
<element name=”EffDte” nillable=”true” type=”xsd:string”/>
<element name=”StateCde” nillable=”true” type=”xsd:string”/>
<element name=”HouseholdRiskScoreNbr” nillable=”true” type=”xsd:string”/>
<element name=”TenureYearsNbr” nillable=”true” type=”xsd:string”/>
<element name=”Claims0_1Nbr” nillable=”true” type=”xsd:string”/>
<element name=”Claims1_2Nbr” nillable=”true” type=”xsd:string”/>
<element name=”Claims2_3Nbr” nillable=”true” type=”xsd:string”/>
</sequence>
</complexType>
<element name=”HomePolicy” type=”impl:HomePolicyType”/>
<complexType name=”HomePolicyScoreType”>
<sequence>
<element name=”TotalPointsNbr” nillable=”true” type=”xsd:string”/>
<element name=”HouseHoldRiskPointsNbr” nillable=”true” type=”xsd:string”/>
<element name=”TenurePointsNbr” nillable=”true” type=”xsd:string”/>
<element name=”ClaimPointsNbr” nillable=”true” type=”xsd:string”/>
<element name=”RatingDiscountPct” nillable=”true” type=”xsd:string”/>
<element name=”DiscountFactorPct” nillable=”true” type=”xsd:string”/>
<element name=”ErrorCde” nillable=”true” type=”xsd:string”/>
<element name=”ErrorDsc” nillable=”true” type=”xsd:string”/>
</sequence>
</complexType>
<element name=”HomePolicyScore” type=”impl:HomePolicyScoreType”/>
</schema>
</wsdl:types><wsdl:message name=”GetHomeScoreResponse”>
<wsdl:part element=”impl:HomePolicyScore” name=”HomePolicyScore”/>
</wsdl:message>
<wsdl:message name=”GetHomeScoreRequest”>
<wsdl:part element=”impl:HomePolicy” name=”HomePolicy”/>
</wsdl:message>
<wsdl:portType name=”ScorecardInterface”>
<wsdl:operation name=”GetHomeScore” parameterOrder=”HomePolicy”>
<wsdl:input message=”impl:GetHomeScoreRequest” name=”GetHomeScoreRequest”/>
<wsdl:output message=”impl:GetHomeScoreResponse” name=”GetHomeScoreResponse”/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name=”ScorecardSoapBinding” type=”impl:ScorecardInterface”>
<wsdlsoap:binding style=”document” transport=”http://schemas.xmlsoap.org/soap/http”/>
<wsdl:operation name=”GetHomeScore”>
<wsdlsoap:operation soapAction=”http://xmlschemas.sentry.com/Pricing/Services/Scorecard/2006/05/23:getHomeScoreIn”/>
<wsdl:input name=”GetHomeScoreRequest”>
<wsdlsoap:body use=”literal”/>
</wsdl:input>
<wsdl:output name=”GetHomeScoreResponse”>
<wsdlsoap:body use=”literal”/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name=”Scorecard”>
<wsdl:port binding=”impl:ScorecardSoapBinding” name=”Scorecard”>
<wsdlsoap:address location=”http://localhost/ScorecardWS/services/Scorecard”/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Riyad KallaMemberWe are looking into this, thank you for the report.
Brian FernandesModeratortoconnor,
I apologize for the delay. We checked out the XMLBeans generation and while it works for our test WSDL files, it failed just as you stated with your example.
I have filed an internal bug report to investigate this issue further and we will do our best to have it fixed in 5.0GA.Sorry for the inconvenience caused,
Best,
Brian. -
AuthorPosts