[
http://issues.apache.org/jira/browse/TUSCANY-394?page=comments#action_12412514
]
Fuhwei Lwo commented on TUSCANY-394:
------------------------------------
Although your patch would get rid of NPE, it won't generate the right interface
method. Take AccountService.wsdl under
Tuscany/java/sca/tools/src/test/resources for example, if you changed
accountReport element's type to "xsd:anyType", with your patch the return type
of the generated interface method would become "void" which is wrong.
<xsd:element name="getAccountReportResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="accountReport" type="xsd:anyType"/>
<<==
</xsd:sequence>
</xsd:complexType>
</xsd:element>
Generated result:
public interface AccountService {
/**
* Auto generated method signatures
* @param param0
*/
public void getAccountReport(
java.lang.String param0) throws java.rmi.RemoteException;
//
}
> 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]