Hi,

I am new to xFire. I was trying to generate client stubs for a webservice
using the latest version of xFire (1.2.3) but keep getting the following
error: I appreciate your help.

Jan 5, 2007 12:36:53 PM org.codehaus.xfire.gen.Wsdl11Generator generate
INFO: Generating code for WSDL at
http://localhost:6080/PolymorphicWsdl/GeometricArt.wsdl with a base URI of
http://hostname:6080/PolymorphicWsdl/GeometricArt.wsdl
java.lang.NoSuchFieldException: NO_CORRECTNESS_CHECK
   at java.lang.Class.getDeclaredField(Unknown Source)
   at org.codehaus.xfire.gen.jaxb.JAXBSchemaSupport.initialize(
JAXBSchemaSupport.java:60)
   at org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java
:143)
   at org.codehaus.xfire.gen.WsGen.main(WsGen.java:132)
Exception in thread "main" java.lang.NoSuchFieldException:
NO_CORRECTNESS_CHECK
   at org.codehaus.xfire.gen.WsGen.main(WsGen.java:136)
Caused by: java.lang.NoSuchFieldException: NO_CORRECTNESS_CHECK
   at java.lang.Class.getDeclaredField(Unknown Source)
   at org.codehaus.xfire.gen.jaxb.JAXBSchemaSupport.initialize(
JAXBSchemaSupport.java:60)
   at org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java
:143)
   at org.codehaus.xfire.gen.WsGen.main(WsGen.java:132)
--- Nested Exception ---
java.lang.NoSuchFieldException: NO_CORRECTNESS_CHECK
   at java.lang.Class.getDeclaredField(Unknown Source)
   at org.codehaus.xfire.gen.jaxb.JAXBSchemaSupport.initialize(
JAXBSchemaSupport.java:60)
   at org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java
:143)
   at org.codehaus.xfire.gen.WsGen.main(WsGen.java:132)



I am not sure is this error has anything to do with the WSDL itself..may
just be a version mismatch of various jars. I have following jars in my
classpath:

activation-1.1.jar
ant-1.6.5,jar
codemodel-2.0-SNAPSHOT.jar
commons-codec-1.3.jar
commons-httpclient-3.0-rc2.jar
commons-logging-1.0.4.jar
jax-api-2.0EA3.jar
jax-impl-2.0.EA3.jar
jaxb-xjc-2.0.EA3.jar
jaxen-1.1.jar
jdom-1.0.jar
servlet-api-2.3.jar
stax-api-1.0.1.jar
wsdl4j-1.5.2.jar
wstx-lgpl-3.0.1.jar
xfire-all-1.2.3.jar
xfire-jsr181-api-1.0-M1.jar
XmlSchema-1.1.jar


And this is the WSDL :


<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="GeometricArt"
   targetNamespace="http://www.example.org/GeometricArt/";
   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
   xmlns:tns="http://www.example.org/GeometricArt/";
   xmlns:xsd="http://www.w3.org/2001/XMLSchema";
   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";>
   <wsdl:types>
       <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
           targetNamespace="http://www.example.org/GeometricArt/";>
           <xsd:element name="DrawRequest">
               <xsd:complexType>
                   <xsd:sequence>
                       <xsd:element name="shape" type="tns:Shape">
                       </xsd:element>
                   </xsd:sequence>
               </xsd:complexType>
           </xsd:element>
           <xsd:element name="DrawResponse">
               <xsd:complexType>
                   <xsd:sequence>
                       <xsd:element name="NewOperationResponse"
                           type="xsd:string">
                       </xsd:element>
                   </xsd:sequence>
               </xsd:complexType>
           </xsd:element>

           <xsd:complexType name="Shape">
               <xsd:sequence>
                   <xsd:element name="Name"
type="xsd:string"></xsd:element>
               </xsd:sequence>
           </xsd:complexType>

           <xsd:complexType name="Circle">
               <xsd:complexContent>
                   <xsd:extension base="tns:Shape">
                       <xsd:sequence>
                           <xsd:sequence>
                               <xsd:element name="radius"
                                   type="xsd:int">
                               </xsd:element>
                           </xsd:sequence>
                       </xsd:sequence>
                   </xsd:extension>
               </xsd:complexContent>
           </xsd:complexType>

           <xsd:complexType name="Rectangle">
               <xsd:complexContent>
                   <xsd:extension base="tns:Shape">
                       <xsd:sequence>
                           <xsd:sequence>
                               <xsd:element name="length"
                                   type="xsd:int">
                               </xsd:element>
                               <xsd:element name="width"
                                   type="xsd:int">
                               </xsd:element>
                           </xsd:sequence>
                       </xsd:sequence>
                   </xsd:extension>
               </xsd:complexContent>
           </xsd:complexType>
       </xsd:schema>
   </wsdl:types>
   <wsdl:message name="DrawRequest">
       <wsdl:part name="DrawRequest"
           element="tns:DrawRequest">
       </wsdl:part>
   </wsdl:message>
   <wsdl:message name="DrawResponse">
       <wsdl:part name="DrawResponse"
           element="tns:DrawResponse">
       </wsdl:part>
   </wsdl:message>
   <wsdl:portType name="GAPortType">
       <wsdl:operation name="Draw">
           <wsdl:input message="tns:DrawRequest"></wsdl:input>
           <wsdl:output message="tns:DrawResponse"></wsdl:output>
       </wsdl:operation>
   </wsdl:portType>
   <wsdl:binding name="GeometricArtBinding" type="tns:GAPortType">
       <soap:binding style="document"
           transport="http://schemas.xmlsoap.org/soap/http"; />
       <wsdl:operation name="Draw">
           <soap:operation
               soapAction="http://www.example.org/GeometricArt/NewOperation";
/>
           <wsdl:input>
               <soap:body use="literal" />
           </wsdl:input>
           <wsdl:output>
               <soap:body use="literal" />
           </wsdl:output>
       </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="GeometrciArt">
       <wsdl:port name="GeometricArtPort"
           binding="tns:GeometricArtBinding">
           <soap:address location="http://host:1111/";></soap:address>
       </wsdl:port>
   </wsdl:service>
</wsdl:definitions>

Thanks,
Delta

Reply via email to