Issue Details (XML | Word | Printable)

Key: XFIRE-332
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dan Diephouse
Reporter: Dmitry Kiriy
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XFire

NPE in WSDL-2-Java generation with XMLBeans binding

Created: 05/Apr/06 05:12 AM   Updated: 06/Apr/06 04:44 AM
Component/s: Generator, XMLBeans
Affects Version/s: 1.0
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive schemas.zip (14 kB)

Environment: Java 1.5.0._03, IDEA 5.1, ANT 1.6.5


 Description  « Hide
Run the following command:

<wsgen outputDirectory="${GENERATED_SOURCE_DIR}"
wsdl="${WSDL_SRC}\AssetService.wsdl"
package="my.package.impl"
binding="xmlbeans"/>

All jars from your distribution.jar

Got:
java.lang.NullPointerException
at org.apache.xmlbeans.impl.common.QNameHelper.hexsafedir(QNameHelper.java:178)
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:343)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generate(AbstractServiceGenerator.java:77)
at org.codehaus.xfire.gen.jsr181.ServiceInterfaceGenerator.generate(ServiceInterfaceGenerator.java:43)
at org.codehaus.xfire.gen.jsr181.AbstractServiceGenerator.generate(AbstractServiceGenerator.java:50)
at org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java:73)
at org.codehaus.xfire.gen.WsGenTask.execute(WsGenTask.java:37)
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)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Dmitry Kiriy added a comment - 05/Apr/06 07:59 AM
also happens with 1.1-beta.

Anybody here?


Dan Diephouse added a comment - 05/Apr/06 08:02 AM
Try cleaning your build - i.e. removing the xmlbeans generated classes and regenerating them. That should help.

Dmitry Kiriy added a comment - 05/Apr/06 08:08 AM
Dan, I HAVE NO classes generated but XMLBeans. I double check it. XMLBeans created some funny directories. I have no such directories. BTW, I suppose, XMLBeans bindings should be generated by wsden?

Dmitry Kiriy added a comment - 05/Apr/06 09:14 AM
Aloso, stand alone XMLBeans codegeneration works perfectly:

<xmlbean classgendir="${GENERATED_SOURCE_DIR}" classpathref="classpath"
failonerror="true" memoryMaximumSize="256m">
<fileset dir="${WSDL_SRC}" includes="*.wsdl"/>
</xmlbean>

<taskdef name="xmlbean"
classname="org.apache.xmlbeans.impl.tool.XMLBean"
classpathref="classpath" />


Dan Diephouse added a comment - 05/Apr/06 10:10 AM
Are you including the classpath of the generated xmlbeans on the wsgen classpath?

Dmitry Kiriy added a comment - 05/Apr/06 10:14 AM
XMLBeans not generating at all by wsgen

Dan Diephouse added a comment - 05/Apr/06 10:40 AM
Yes, with XMLBeans you need to generate the classes yourself then WSGen picks them up off the classpath.

Dmitry Kiriy added a comment - 05/Apr/06 12:54 PM
Ok, got your point. May be it should be documented...

Dmitry Kiriy added a comment - 06/Apr/06 04:44 AM
Everything fine, just probably need to improve documentation.