You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Scott Kurz (JIRA)" <de...@tuscany.apache.org> on 2008/07/17 20:53:33 UTC

[jira] Created: (TUSCANY-2481) NPE when WSDL types has minus @targetNamespace with an xsd:import

NPE when WSDL types has <schema> minus @targetNamespace with an xsd:import
--------------------------------------------------------------------------

                 Key: TUSCANY-2481
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2481
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Data Binding Runtime
         Environment: r673392
            Reporter: Scott Kurz


WIth a WSDL types with no @targetNamespace, like the following:  

       <schema xmlns="http://www.w3.org/2001/XMLSchema">
           <import namespace="http://helloworld" schemaLocation="Hello.xsd"/>
       </schema>

we get:

 java.lang.NullPointerException
        at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.updateSchemaRefs(Axis2ServiceProvider.java:519)
        at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.addSchemas(Axis2ServiceProvider.java:511)
        at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.createWSDLAxisService(Axis2ServiceProvider.java:478)
        at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.createAxisService(Axis2ServiceProvider.java:369)
        at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.start(Axis2ServiceProvider.java:256)
        at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceBindingProvider.start(Axis2ServiceBindingProvider.java:65)
        at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl$3.run(CompositeActivatorImpl.java:618)
        at java.security.AccessController.doPrivileged(AccessController.java:193)
        at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(CompositeActivatorImpl.java:616)
        at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:258)

The problem seems to be the fact that our wsdlDefinition ends up with an XSDefinition corresponding to the null NS.  This XSDefinition, then, has no XMLSchema object associated with it, producing the NPE above.    I can see in the debugger that we have an XSDefinition with empty ("") NS, which has no problem;  we have an XMLSchema for empty NS.

But apparently this style of authoring <types> presents a problem.  

Note that BP1.1 R2105 says this is valid, and also that wsgen produces WSDL in this style. 
 


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TUSCANY-2481) NPE when WSDL types has minus @targetNamespace with an xsd:import

Posted by "Scott Kurz (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Kurz updated TUSCANY-2481:
--------------------------------

    Attachment: 2481.recreate.diff

> NPE when WSDL types has <schema> minus @targetNamespace with an xsd:import
> --------------------------------------------------------------------------
>
>                 Key: TUSCANY-2481
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2481
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Data Binding Runtime
>         Environment: r673392
>            Reporter: Scott Kurz
>         Attachments: 2481.recreate.diff
>
>
> WIth a WSDL types with no @targetNamespace, like the following:  
>        <schema xmlns="http://www.w3.org/2001/XMLSchema">
>            <import namespace="http://helloworld" schemaLocation="Hello.xsd"/>
>        </schema>
> we get:
>  java.lang.NullPointerException
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.updateSchemaRefs(Axis2ServiceProvider.java:519)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.addSchemas(Axis2ServiceProvider.java:511)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.createWSDLAxisService(Axis2ServiceProvider.java:478)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.createAxisService(Axis2ServiceProvider.java:369)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.start(Axis2ServiceProvider.java:256)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceBindingProvider.start(Axis2ServiceBindingProvider.java:65)
>         at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl$3.run(CompositeActivatorImpl.java:618)
>         at java.security.AccessController.doPrivileged(AccessController.java:193)
>         at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(CompositeActivatorImpl.java:616)
>         at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:258)
> The problem seems to be the fact that our wsdlDefinition ends up with an XSDefinition corresponding to the null NS.  This XSDefinition, then, has no XMLSchema object associated with it, producing the NPE above.    I can see in the debugger that we have an XSDefinition with empty ("") NS, which has no problem;  we have an XMLSchema for empty NS.
> But apparently this style of authoring <types> presents a problem.  
> Note that BP1.1 R2105 says this is valid, and also that wsgen produces WSDL in this style. 
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TUSCANY-2481) NPE when WSDL types has minus @targetNamespace with an xsd:import

Posted by "Simon Nash (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12616720#action_12616720 ] 

Simon Nash commented on TUSCANY-2481:
-------------------------------------

Fix and test case checked into the 1.3 branch under r679623 and into trunk under r679629 and r679631.

> NPE when WSDL types has <schema> minus @targetNamespace with an xsd:import
> --------------------------------------------------------------------------
>
>                 Key: TUSCANY-2481
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2481
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Data Binding Runtime
>         Environment: r673392
>            Reporter: Scott Kurz
>            Assignee: Simon Nash
>         Attachments: 2481.recreate.diff
>
>
> WIth a WSDL types with no @targetNamespace, like the following:  
>        <schema xmlns="http://www.w3.org/2001/XMLSchema">
>            <import namespace="http://helloworld" schemaLocation="Hello.xsd"/>
>        </schema>
> we get:
>  java.lang.NullPointerException
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.updateSchemaRefs(Axis2ServiceProvider.java:519)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.addSchemas(Axis2ServiceProvider.java:511)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.createWSDLAxisService(Axis2ServiceProvider.java:478)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.createAxisService(Axis2ServiceProvider.java:369)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.start(Axis2ServiceProvider.java:256)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceBindingProvider.start(Axis2ServiceBindingProvider.java:65)
>         at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl$3.run(CompositeActivatorImpl.java:618)
>         at java.security.AccessController.doPrivileged(AccessController.java:193)
>         at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(CompositeActivatorImpl.java:616)
>         at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:258)
> The problem seems to be the fact that our wsdlDefinition ends up with an XSDefinition corresponding to the null NS.  This XSDefinition, then, has no XMLSchema object associated with it, producing the NPE above.    I can see in the debugger that we have an XSDefinition with empty ("") NS, which has no problem;  we have an XMLSchema for empty NS.
> But apparently this style of authoring <types> presents a problem.  
> Note that BP1.1 R2105 says this is valid, and also that wsgen produces WSDL in this style. 
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TUSCANY-2481) NPE when WSDL types has minus @targetNamespace with an xsd:import

Posted by "Simon Nash (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Nash updated TUSCANY-2481:
--------------------------------

    Affects Version/s: Java-SCA-1.3
        Fix Version/s: Java-SCA-1.3

> NPE when WSDL types has <schema> minus @targetNamespace with an xsd:import
> --------------------------------------------------------------------------
>
>                 Key: TUSCANY-2481
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2481
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Data Binding Runtime
>    Affects Versions: Java-SCA-1.3
>         Environment: r673392
>            Reporter: Scott Kurz
>            Assignee: Simon Nash
>             Fix For: Java-SCA-1.3
>
>         Attachments: 2481.recreate.diff
>
>
> WIth a WSDL types with no @targetNamespace, like the following:  
>        <schema xmlns="http://www.w3.org/2001/XMLSchema">
>            <import namespace="http://helloworld" schemaLocation="Hello.xsd"/>
>        </schema>
> we get:
>  java.lang.NullPointerException
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.updateSchemaRefs(Axis2ServiceProvider.java:519)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.addSchemas(Axis2ServiceProvider.java:511)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.createWSDLAxisService(Axis2ServiceProvider.java:478)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.createAxisService(Axis2ServiceProvider.java:369)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.start(Axis2ServiceProvider.java:256)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceBindingProvider.start(Axis2ServiceBindingProvider.java:65)
>         at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl$3.run(CompositeActivatorImpl.java:618)
>         at java.security.AccessController.doPrivileged(AccessController.java:193)
>         at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(CompositeActivatorImpl.java:616)
>         at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:258)
> The problem seems to be the fact that our wsdlDefinition ends up with an XSDefinition corresponding to the null NS.  This XSDefinition, then, has no XMLSchema object associated with it, producing the NPE above.    I can see in the debugger that we have an XSDefinition with empty ("") NS, which has no problem;  we have an XMLSchema for empty NS.
> But apparently this style of authoring <types> presents a problem.  
> Note that BP1.1 R2105 says this is valid, and also that wsgen produces WSDL in this style. 
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (TUSCANY-2481) NPE when WSDL types has minus @targetNamespace with an xsd:import

Posted by "Simon Nash (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Nash reassigned TUSCANY-2481:
-----------------------------------

    Assignee: Simon Nash

> NPE when WSDL types has <schema> minus @targetNamespace with an xsd:import
> --------------------------------------------------------------------------
>
>                 Key: TUSCANY-2481
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2481
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Data Binding Runtime
>         Environment: r673392
>            Reporter: Scott Kurz
>            Assignee: Simon Nash
>         Attachments: 2481.recreate.diff
>
>
> WIth a WSDL types with no @targetNamespace, like the following:  
>        <schema xmlns="http://www.w3.org/2001/XMLSchema">
>            <import namespace="http://helloworld" schemaLocation="Hello.xsd"/>
>        </schema>
> we get:
>  java.lang.NullPointerException
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.updateSchemaRefs(Axis2ServiceProvider.java:519)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.addSchemas(Axis2ServiceProvider.java:511)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.createWSDLAxisService(Axis2ServiceProvider.java:478)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.createAxisService(Axis2ServiceProvider.java:369)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.start(Axis2ServiceProvider.java:256)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceBindingProvider.start(Axis2ServiceBindingProvider.java:65)
>         at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl$3.run(CompositeActivatorImpl.java:618)
>         at java.security.AccessController.doPrivileged(AccessController.java:193)
>         at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(CompositeActivatorImpl.java:616)
>         at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:258)
> The problem seems to be the fact that our wsdlDefinition ends up with an XSDefinition corresponding to the null NS.  This XSDefinition, then, has no XMLSchema object associated with it, producing the NPE above.    I can see in the debugger that we have an XSDefinition with empty ("") NS, which has no problem;  we have an XMLSchema for empty NS.
> But apparently this style of authoring <types> presents a problem.  
> Note that BP1.1 R2105 says this is valid, and also that wsgen produces WSDL in this style. 
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (TUSCANY-2481) NPE when WSDL types has minus @targetNamespace with an xsd:import

Posted by "Scott Kurz (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Kurz resolved TUSCANY-2481.
---------------------------------

    Resolution: Fixed

Thanks Simon, my original test is working now as well.

> NPE when WSDL types has <schema> minus @targetNamespace with an xsd:import
> --------------------------------------------------------------------------
>
>                 Key: TUSCANY-2481
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2481
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Data Binding Runtime
>         Environment: r673392
>            Reporter: Scott Kurz
>            Assignee: Simon Nash
>         Attachments: 2481.recreate.diff
>
>
> WIth a WSDL types with no @targetNamespace, like the following:  
>        <schema xmlns="http://www.w3.org/2001/XMLSchema">
>            <import namespace="http://helloworld" schemaLocation="Hello.xsd"/>
>        </schema>
> we get:
>  java.lang.NullPointerException
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.updateSchemaRefs(Axis2ServiceProvider.java:519)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.addSchemas(Axis2ServiceProvider.java:511)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.createWSDLAxisService(Axis2ServiceProvider.java:478)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.createAxisService(Axis2ServiceProvider.java:369)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.start(Axis2ServiceProvider.java:256)
>         at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceBindingProvider.start(Axis2ServiceBindingProvider.java:65)
>         at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl$3.run(CompositeActivatorImpl.java:618)
>         at java.security.AccessController.doPrivileged(AccessController.java:193)
>         at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(CompositeActivatorImpl.java:616)
>         at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:258)
> The problem seems to be the fact that our wsdlDefinition ends up with an XSDefinition corresponding to the null NS.  This XSDefinition, then, has no XMLSchema object associated with it, producing the NPE above.    I can see in the debugger that we have an XSDefinition with empty ("") NS, which has no problem;  we have an XMLSchema for empty NS.
> But apparently this style of authoring <types> presents a problem.  
> Note that BP1.1 R2105 says this is valid, and also that wsgen produces WSDL in this style. 
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.