[
http://issues.apache.org/jira/browse/TUSCANY-394?page=comments#action_12412942
]
Sreelatha S commented on TUSCANY-394:
-------------------------------------
Hi .. I tried the AccountService.wsdl again with the version of the code that I
pulled down from the SVN today (version-408856), i made two modifications in
the wsdl file as below
<xsd:element name="getAccountReportWrapped1">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="customerID" type="anyType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getAccountReportWrapped1Response">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="accountReport" type="xsd:anyType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
The generated output is this
public interface AccountService {
/**
* Auto generated method signatures
* @param param0
*/
public commonj.sdo.DataObject getAccountReportWrapped1(
java.lang.Object param0) throws java.rmi.RemoteException;
There are couple of things to be noted here, "xsd:anyType" in the wsdl is
mapped to "commonj.sdo.DataObject" (This was failing with NPE before applying
the patch) and "anyType" is mapped to java.lang.Object (this was happening even
before the patch was applied)
This is also similar to the way XSD2Java Generator in the tuscany sdo tools is
working.
If you are still facing this problem, please provide some hints on how I could
replicate it... thanks.
> NPE when running wsdl2java tool with "xsd:anyType" in the schema
> ----------------------------------------------------------------
>
> Key: TUSCANY-394
> URL: http://issues.apache.org/jira/browse/TUSCANY-394
> Project: Tuscany
> Type: Bug
> Components: Java SCA Tools
> Versions: Java-Mx
> Reporter: Fuhwei Lwo
> Fix For: Java-Mx
> Attachments: patch.txt
>
> In the <wsdl:types><xsd:schema> section, if there is an element with
> xsd:anyType defined, running wsdl2java to generate the service interface
> would get a null pointer exception as below. Note: The SDO codegen tool is
> running fine with anyType.
> java.lang.NullPointerException
> at
> org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator.genera
> teFromWSDL(WSDL2JavaGenerator.java:194)
> at
> org.apache.tuscany.tools.wsdl2java.plugin.WSDL2JavaGeneratorMojo.exec
> ute(WSDL2JavaGeneratorMojo.java:82)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:432)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:530)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
> fecycle(DefaultLifecycleExecutor.java:472)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:451)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> dleFailures(DefaultLifecycleExecutor.java:303)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> ts(DefaultLifecycleExecutor.java:270)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> fecycleExecutor.java:139)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:64)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:615)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]