You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Fuhwei Lwo (JIRA)" <tu...@ws.apache.org> on 2006/05/17 15:04:05 UTC

[jira] Created: (TUSCANY-394) NPE when running wsdl2java tool with "xsd:anyType" in the schema

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  
    Reporter: Fuhwei Lwo


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


Re: [jira] Commented: (TUSCANY-394) NPE when running wsdl2java tool with "xsd:anyType" in the schema

Posted by Frank Budinsky <fr...@ca.ibm.com>.
The correct type is "xsd:anyType" and that should map to 
commonj.sdo.DataObject, according to the spec. Note that "anyType" 
(without the xsd:) is really an error, because it is referring to a 
nonexistent type in the current namespace (vs. the standard schema 
anyType). If you run a validator over the wsdl file, I think it will show 
it as a reference to an unresolved type. I think the generator is just 
mapping it to java.lang.Object, because it doesn't know the proper type.

Frank

"Sreelatha S" <sr...@gmail.com> wrote on 05/23/2006 08:12:15 AM:

> Hi .. I tried the AccountService.wsdl again with the version of the code
> that I pulled down from the SVN today, 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.
> 
> On 5/22/06, Sreelatha S <sr...@gmail.com> wrote:
> 
> >  Hi... I tried the AccountService.wsdl and here is what I get for ...
> >
> > <xsd:element name="getAccountReportWrapped1Response">
> >   <xsd:complexType>
> >     <xsd:sequence>
> >       <xsd:element name="accountReport" type="anyType"/>
> >
> >     </xsd:sequence>
> >   </xsd:complexType>
> > </xsd:element>
> >
> > The generated output:
> >
> > public interface AccountService {
> >
> > /**
> > * Auto generated method signatures
> > * @param param0
> > */
> >
> > public java.lang.Object getAccountReportWrapped1(
> >
> > java.lang.String param0) throws java.rmi.RemoteException;
> >
> > If you note the return type is java.lang.Object and not 'void'.
> >
> > This test was done over the version of the code that I pulled down 
from
> > the SVN on Friday 19th May 2006. I shall give it one more try with the
> > latest codebase and post the findings. Thanks.
> >
> > On 5/19/06, Fuhwei Lwo (JIRA) < tuscany-dev@ws.apache.org> wrote:
> >
> > >    [ 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" whichis 
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: tuscany-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> > >
> > >
> >
> >
> > --
> > ____________________________________________________
> > God always gives His best to those who leave the choice with Him.
> >
> 
> 
> 
> -- 
> ____________________________________________________
> God always gives His best to those who leave the choice with Him.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Commented: (TUSCANY-394) NPE when running wsdl2java tool with "xsd:anyType" in the schema

Posted by Sreelatha S <sr...@gmail.com>.
Hi .. I tried the AccountService.wsdl again with the version of the code
that I pulled down from the SVN today, 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.

On 5/22/06, Sreelatha S <sr...@gmail.com> wrote:

>  Hi... I tried the AccountService.wsdl and here is what I get for ...
>
> <xsd:element name="getAccountReportWrapped1Response">
>   <xsd:complexType>
>     <xsd:sequence>
>       <xsd:element name="accountReport" type="anyType"/>
>
>     </xsd:sequence>
>   </xsd:complexType>
> </xsd:element>
>
> The generated output:
>
> public interface AccountService {
>
> /**
> * Auto generated method signatures
> * @param param0
> */
>
> public java.lang.Object getAccountReportWrapped1(
>
> java.lang.String param0) throws java.rmi.RemoteException;
>
> If you note the return type is java.lang.Object and not 'void'.
>
> This test was done over the version of the code that I pulled down from
> the SVN on Friday 19th May 2006. I shall give it one more try with the
> latest codebase and post the findings. Thanks.
>
> On 5/19/06, Fuhwei Lwo (JIRA) < tuscany-dev@ws.apache.org> wrote:
>
> >    [ 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: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
> >
>
>
> --
> ____________________________________________________
> God always gives His best to those who leave the choice with Him.
>



-- 
____________________________________________________
God always gives His best to those who leave the choice with Him.

Re: [jira] Commented: (TUSCANY-394) NPE when running wsdl2java tool with "xsd:anyType" in the schema

Posted by Sreelatha S <sr...@gmail.com>.
Hi... I tried the AccountService.wsdl and here is what I get for ...

<xsd:element name="getAccountReportWrapped1Response">
  <xsd:complexType>
    <xsd:sequence>
      <xsd:element name="accountReport" type="anyType"/>
    </xsd:sequence>
  </xsd:complexType>
</xsd:element>

The generated output:

public interface AccountService {

/**
* Auto generated method signatures
* @param param0
*/

public java.lang.Object getAccountReportWrapped1(
java.lang.String param0) throws java.rmi.RemoteException;

If you note the return type is java.lang.Object and not 'void'.

This test was done over the version of the code that I pulled down from the
SVN on Friday 19th May 2006. I shall give it one more try with the latest
codebase and post the findings. Thanks.

On 5/19/06, Fuhwei Lwo (JIRA) <tu...@ws.apache.org> wrote:

>    [ 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: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>


-- 
____________________________________________________
God always gives His best to those who leave the choice with Him.

[jira] Commented: (TUSCANY-394) NPE when running wsdl2java tool with "xsd:anyType" in the schema

Posted by "Fuhwei Lwo (JIRA)" <tu...@ws.apache.org>.
    [ 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-394) NPE when running wsdl2java tool with "xsd:anyType" in the schema

Posted by "Sreelatha S (JIRA)" <tu...@ws.apache.org>.
    [ 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Resolved: (TUSCANY-394) NPE when running wsdl2java tool with "xsd:anyType" in the schema

Posted by "ant elder (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ant elder resolved TUSCANY-394.
-------------------------------

    Resolution: Fixed

Thanks Scott, closing as resolved.

> NPE when running wsdl2java tool with "xsd:anyType" in the schema
> ----------------------------------------------------------------
>
>                 Key: TUSCANY-394
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-394
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Tools
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SCA-Next
>
>         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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-394) NPE when running wsdl2java tool with "xsd:anyType" in the schema

Posted by "Scott Kurz (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487580 ] 

Scott Kurz commented on TUSCANY-394:
------------------------------------

To me it looks like this is no longer a problem.   I'm not sure in what sense this might be still a problem.   I used any anyType as an input parm w/ the doc-lit-wrapped style and it the W2J gen'd a DataObject input parm....and there was no problem at runtime over the Axis2 binding.

> NPE when running wsdl2java tool with "xsd:anyType" in the schema
> ----------------------------------------------------------------
>
>                 Key: TUSCANY-394
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-394
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Tools
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SCA-Next
>
>         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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-394) NPE when running wsdl2java tool with "xsd:anyType" in the schema

Posted by "Anonymous (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-394?page=all ]

 updated TUSCANY-394:
---------------------

    Attachment: patch.txt

> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-394) NPE when running wsdl2java tool with "xsd:anyType" in the schema

Posted by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Sebastien Delfino updated TUSCANY-394:
-------------------------------------------

    Patch Info: [Patch Available]

> NPE when running wsdl2java tool with "xsd:anyType" in the schema
> ----------------------------------------------------------------
>
>                 Key: TUSCANY-394
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-394
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Tools
>    Affects Versions: Java-SCA-Mx
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SCA-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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-394) NPE when running wsdl2java tool with "xsd:anyType" in the schema

Posted by "Sreelatha S (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-394?page=comments#action_12412506 ] 

Sreelatha S commented on TUSCANY-394:
-------------------------------------

I have attached a patch with a fix for the TUSCANY issue #394. Could someone please review it and commit it , if the fix is found to be applicable.

> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-394) NPE when running wsdl2java tool with "xsd:anyType" in the schema

Posted by "ant elder (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-394?page=all ]

ant elder updated TUSCANY-394:
------------------------------

    Fix Version: Java-M1-tentative
        Version: Java-M1-tentative

Is this sometihng we need to fix? Probably too late now

> 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-M1-tentative
>     Reporter: Fuhwei Lwo
>      Fix For: Java-M1-tentative

>
> 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


[jira] Updated: (TUSCANY-394) NPE when running wsdl2java tool with "xsd:anyType" in the schema

Posted by "ant elder (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-394?page=all ]

ant elder updated TUSCANY-394:
------------------------------

    Fix Version: Java-Mx
                     (was: Java-M1-tentative)
        Version: Java-Mx
                     (was: Java-M1-tentative)

Code changes out out now for M1 so moving this to Mx

> 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

>
> 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