[ http://jira.codehaus.org/browse/XFIRE-235?page=comments#action_64853 ] 

Rickard ?berg commented on XFIRE-235:
-------------------------------------

I am still unable to use wsgen with the WSRP files. Here's my Ant file:
<taskdef name="wsgen" classname="org.codehaus.xfire.gen.WsGenTask" 
classpathref="build.classpath"/>

                <wsgen outputDirectory="${src.dir}"
               wsdl="src/resources/wsrp_service.wsdl"
               package="org.openwsrp"/>

And this is the error I get when I run it:
taskdef
wsgen
Retrieving document at 
'file:/home/rickard/projects/openwsrp/wsrpv1/src/resources/wsrp_v1_bindings.wsdl',
 relative to 'src/resources'.
Retrieving document at 'wsrp_v1_interfaces.wsdl', relative to 
'file:/home/rickard/projects/openwsrp/wsrpv1/src/resources/wsrp_v1_bindings.wsdl'.
Retrieving schema at 'wsrp_v1_types.xsd', relative to 
'file:/home/rickard/projects/openwsrp/wsrpv1/src/resources/wsrp_v1_interfaces.wsdl'.
Retrieving schema at 'http://www.w3.org/2001/xml.xsd', relative to 
'file:/home/rickard/projects/openwsrp/wsrpv1/src/resources/wsrp_v1_types.xsd'.
May 6, 2006 3:40:56 PM org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder 
processImports
INFO: Adding wsdl definition 
file:/home/rickard/projects/openwsrp/wsrpv1/src/resources/wsrp_v1_bindings.wsdl 
with baseURI of src/resources
May 6, 2006 3:40:56 PM org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder 
processImports
INFO: Adding wsdl definition wsrp_v1_interfaces.wsdl with baseURI of 
file:/home/rickard/projects/openwsrp/wsrpv1/src/resources/wsrp_v1_bindings.wsdl
adding schema urn:oasis:names:tc:wsrp:v1:intf
/home/rickard/projects/openwsrp/wsrpv1/build.xml:25: 
java.lang.NullPointerException
        at org.codehaus.xfire.gen.WsGenTask.execute(WsGenTask.java:41)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.Main.runBuild(Main.java:668)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
Caused by: java.lang.NullPointerException
        at java.net.URI$Parser.parse(URI.java:3003)
        at java.net.URI.<init>(URI.java:578)
        at 
com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl.startElement(AbstractReferenceFinderImpl.java:74)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown 
Source)
        at 
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
        at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown 
Source)
        at 
com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:366)
        at 
com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:273)
        at 
com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl.startElement(AbstractReferenceFinderImpl.java:78)
        at 
org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
        at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:224)
        at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:261)
        at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:230)
        at com.sun.xml.bind.unmarshaller.DOMScanner.scan(DOMScanner.java:107)
        at 
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.parseSchema(SchemaCompilerImpl.java:112)
        at 
org.codehaus.xfire.gen.jaxb.JAXBSchemaSupport.initialize(JAXBSchemaSupport.java:65)
        at 
org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java:81)
        at org.codehaus.xfire.gen.WsGenTask.execute(WsGenTask.java:37)
        ... 17 more
---

I have NO idea what is wrong, and what to do with it. Even if I am doing 
something wrong and it is possible to use wsgen with WSRP better error handling 
in this stuff would still be appreciated.



> "Couldn't find schema for part:" exception when generating client code from 
> BookService wsdl
> --------------------------------------------------------------------------------------------
>
>          Key: XFIRE-235
>          URL: http://jira.codehaus.org/browse/XFIRE-235
>      Project: XFire
>         Type: Bug

>   Components: Generator
>     Versions: 1.0-M6
>  Environment: Windows XP
> JDK 1.5.0_04
> ANT 1.6.5 compiled on June 2 2005
>     Reporter: Joseph Culjak
>     Assignee: Mika Goeckel
>      Fix For: 1.0-RC
>  Attachments: BookService.wsdl
>
>
> An org.codehaus,xfire.XFireRuntimeException _: Couldn't find schema for part: 
> {http://xfire.codehaus.org/BookService}getBooks is throw when executing the 
> wsgen task in an ant build file.  Moreover, using xfire-all-1.0-SNAPSHOT.jar 
> (downloaded on Jan 16th) and also 
> http://dist.codehaus.org/xfire/jars/xfire-all-1.0-20060110.191103.jar 
> produced the same stacktrace.
> The wsdl used is attached.  It was created by saving 
> http://localhost:8080/sandbox/services/BookService.wsdl to a file and naming 
> it BookService.wsdl.  This is for the demo book service that comes with the 
> distribution.  When I run the WsGenTask the follow error happens:
> org.codehaus.xfire.XFireRuntimeException: Couldn't find schema for part: 
> {http://xfire.codehaus.org/BookService}getBooks
>         at 
> org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.isWrapped(WSDLServiceBuilder.java:412)
>         at 
> org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.visit(WSDLServiceBuilder.java:265)
>         at 
> org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.walkTree(WSDLServiceBuilder.java:160)
>         at 
> org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java:52)
>         at org.codehaus.xfire.gen.WsGenTask.execute(WsGenTask.java:29)
>         at 
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.tools.ant.Target.performTasks(Target.java:369)
>         at 
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
>         at 
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>         at org.apache.tools.ant.Main.runBuild(Main.java:668)
>         at org.apache.tools.ant.Main.startAnt(Main.java:187)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
> Here is the ant task snippet.
> <path id="wsgen.classpath">
> <fileset id="lib.xfire" dir="lib">
> <patternset>
>       <include name="xfire/1.0-M6a/xfire-all-1.0-M6a.jar" />
>       <include name="sun/jaf/jaf-1.0.2/activation.jar"/>
>       <include name="jakarta/commons/codec/1.3/commons-codec-1.3.jar" />
>       <include 
> name="xfire/1.0-M6a/libs/runtime/commons-httpclient-3.0-rc3.jar" />
>       <include name="jakarta/commons/logging/1.0.4/commons-logging.jar" />
>       <include name="jdom/1.0/jdom.jar" />
>       <include name="logging/log4j/1.2.9/dist/lib/log4j-1.2.9.jar" />
>       <include name="spring/1.2.6/dist/spring.jar" />
>       <include name="xfire/1.0-M6a/libs/runtime/stax-api-1.0.jar" />
>       <include name="webservices/wsdl4j-1_5_2/lib/wsdl4j.jar" />
>       <include name="jakarta/velocity/1.4/velocity-1.4.jar" />
>       <include name="xfire/1.0-M6a/libs/runtime/xbean-2.0.0-beta1.jar" />
>       <include name="xml/stax/woodstock/2.0.4/wstx-asl-2.0.4.jar" />
>       <include name="xfire/1.0-M6a/xfire-generator-1.0-M6a.jar" />
> </patternset>
> </fileset>
> </path>
> <taskdef name="wsgen" classname="org.codehaus.xfire.gen.WsGenTask" 
> classpathref="wsgen.classpath" />
> <target name="genclient">
>       <wsgen outputdirectory="src-client" 
> wsdl="${build.dir}/BookService.wsdl" binding="xmlbeans"/>
> </target>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to