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)" <tu...@ws.apache.org> on 2007/02/24 00:13:05 UTC

[jira] Created: (TUSCANY-1137) WSDL2Java tool should be able to handle imports of other WSDL files into the original WSDL

WSDL2Java tool should be able to handle imports of other WSDL files into the original WSDL
------------------------------------------------------------------------------------------

                 Key: TUSCANY-1137
                 URL: https://issues.apache.org/jira/browse/TUSCANY-1137
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Tools
    Affects Versions: Java-M2
            Reporter: Scott Kurz
            Priority: Minor
             Fix For: Java-SCA-M3
         Attachments: PortType.wsdl

If I, for example, define my portType in one WSDL and then import that into another WSDL where I define my Service/Port, I will have problems, like the following when running WSDL2Java against the latter WSDL:

Caused by: java.lang.NullPointerException
        at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.isWrapped(JavaInterfaceEmitter.java:136)
        at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.getInputElement(JavaInterfaceEmitter.java:171)
        at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:1926)
        at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.loadOperations(AxisServiceBasedMultiLanguageEmitter.java:1841)
        at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMDocumentForInterface(AxisServiceBasedMultiLanguageEmitter.java:993)
        at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.writeInterface(JavaInterfaceEmitter.java:196)
        at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceGenerator.generate(JavaInterfaceGenerator.java:200)


I believe a key to the problem is the line in WSDL2JavaGenerator.generateFromWSDL():
    xsdHelper.define(inputStream, inputFile.toURI().toString());

Though this method is called the EMF 'packageRegistry' field is essentially empty.   I assume this is because XSDHelper.define(...)  will not handle a WSDL import.    (It does seem to be handling an XSD schema import, however).    I don't know enough of the SDO APIs to suggest a better method than the xsdHelper.define(..) we're invoking, however.

I'll attach an example



-- 
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-1137) WSDL2Java tool should be able to handle imports of other WSDL files into the original WSDL

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

Scott Kurz updated TUSCANY-1137:
--------------------------------

    Attachment: PortType.wsdl

> WSDL2Java tool should be able to handle imports of other WSDL files into the original WSDL
> ------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1137
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1137
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Tools
>    Affects Versions: Java-M2
>            Reporter: Scott Kurz
>            Priority: Minor
>             Fix For: Java-SCA-M3
>
>         Attachments: PortType.wsdl
>
>
> If I, for example, define my portType in one WSDL and then import that into another WSDL where I define my Service/Port, I will have problems, like the following when running WSDL2Java against the latter WSDL:
> Caused by: java.lang.NullPointerException
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.isWrapped(JavaInterfaceEmitter.java:136)
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.getInputElement(JavaInterfaceEmitter.java:171)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:1926)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.loadOperations(AxisServiceBasedMultiLanguageEmitter.java:1841)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMDocumentForInterface(AxisServiceBasedMultiLanguageEmitter.java:993)
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.writeInterface(JavaInterfaceEmitter.java:196)
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceGenerator.generate(JavaInterfaceGenerator.java:200)
> I believe a key to the problem is the line in WSDL2JavaGenerator.generateFromWSDL():
>     xsdHelper.define(inputStream, inputFile.toURI().toString());
> Though this method is called the EMF 'packageRegistry' field is essentially empty.   I assume this is because XSDHelper.define(...)  will not handle a WSDL import.    (It does seem to be handling an XSD schema import, however).    I don't know enough of the SDO APIs to suggest a better method than the xsdHelper.define(..) we're invoking, however.
> I'll attach an example

-- 
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-1137) WSDL2Java tool should be able to handle imports of other WSDL files into the original WSDL

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

Yang ZHONG commented on TUSCANY-1137:
-------------------------------------

A WSDL has two parts: types and others. When PortType.wsdl is imported, types are *not* imported, while others are imported.
To load types in PortType.wsdl, xsdHelper.define is supposed applied to PortType.wsdl, *not* Service.wsdl.

On the other hand, SDO spec 2.1 isn't clear about WSDL support for xsdHelper.define, especially when one types portion has more than one schemas and they forward and backward reference(import without location) each other.

Are you interested in taking a look at inputFile.toURI() when xsdHelper.define is invoked? If not PortType.wsdl, any interest to fix that?

> WSDL2Java tool should be able to handle imports of other WSDL files into the original WSDL
> ------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1137
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1137
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Tools
>    Affects Versions: Java-M2
>            Reporter: Scott Kurz
>            Priority: Minor
>             Fix For: Java-SCA-M3
>
>         Attachments: PortType.wsdl, Service.wsdl
>
>
> If I, for example, define my portType in one WSDL and then import that into another WSDL where I define my Service/Port, I will have problems, like the following when running WSDL2Java against the latter WSDL:
> Caused by: java.lang.NullPointerException
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.isWrapped(JavaInterfaceEmitter.java:136)
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.getInputElement(JavaInterfaceEmitter.java:171)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:1926)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.loadOperations(AxisServiceBasedMultiLanguageEmitter.java:1841)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMDocumentForInterface(AxisServiceBasedMultiLanguageEmitter.java:993)
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.writeInterface(JavaInterfaceEmitter.java:196)
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceGenerator.generate(JavaInterfaceGenerator.java:200)
> I believe a key to the problem is the line in WSDL2JavaGenerator.generateFromWSDL():
>     xsdHelper.define(inputStream, inputFile.toURI().toString());
> Though this method is called the EMF 'packageRegistry' field is essentially empty.   I assume this is because XSDHelper.define(...)  will not handle a WSDL import.    (It does seem to be handling an XSD schema import, however).    I don't know enough of the SDO APIs to suggest a better method than the xsdHelper.define(..) we're invoking, however.
> I'll attach an example

-- 
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-1137) WSDL2Java tool should be able to handle imports of other WSDL files into the original WSDL

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

Scott Kurz updated TUSCANY-1137:
--------------------------------

    Attachment: Service.wsdl

> WSDL2Java tool should be able to handle imports of other WSDL files into the original WSDL
> ------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1137
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1137
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Tools
>    Affects Versions: Java-M2
>            Reporter: Scott Kurz
>            Priority: Minor
>             Fix For: Java-SCA-M3
>
>         Attachments: PortType.wsdl, Service.wsdl
>
>
> If I, for example, define my portType in one WSDL and then import that into another WSDL where I define my Service/Port, I will have problems, like the following when running WSDL2Java against the latter WSDL:
> Caused by: java.lang.NullPointerException
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.isWrapped(JavaInterfaceEmitter.java:136)
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.getInputElement(JavaInterfaceEmitter.java:171)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:1926)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.loadOperations(AxisServiceBasedMultiLanguageEmitter.java:1841)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMDocumentForInterface(AxisServiceBasedMultiLanguageEmitter.java:993)
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.writeInterface(JavaInterfaceEmitter.java:196)
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceGenerator.generate(JavaInterfaceGenerator.java:200)
> I believe a key to the problem is the line in WSDL2JavaGenerator.generateFromWSDL():
>     xsdHelper.define(inputStream, inputFile.toURI().toString());
> Though this method is called the EMF 'packageRegistry' field is essentially empty.   I assume this is because XSDHelper.define(...)  will not handle a WSDL import.    (It does seem to be handling an XSD schema import, however).    I don't know enough of the SDO APIs to suggest a better method than the xsdHelper.define(..) we're invoking, however.
> I'll attach an example

-- 
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-1137) WSDL2Java tool should be able to handle imports of other WSDL files into the original WSDL

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

Scott Kurz commented on TUSCANY-1137:
-------------------------------------

So in the above example if Service.wsdl imports PortType.wsdl, we hit the problem I mentioned when I run Tuscany WSDL2Java against Service.wsdl.    BTW, when running a version of wsimport against the same I have no problem.

> WSDL2Java tool should be able to handle imports of other WSDL files into the original WSDL
> ------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1137
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1137
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Tools
>    Affects Versions: Java-M2
>            Reporter: Scott Kurz
>            Priority: Minor
>             Fix For: Java-SCA-M3
>
>         Attachments: PortType.wsdl, Service.wsdl
>
>
> If I, for example, define my portType in one WSDL and then import that into another WSDL where I define my Service/Port, I will have problems, like the following when running WSDL2Java against the latter WSDL:
> Caused by: java.lang.NullPointerException
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.isWrapped(JavaInterfaceEmitter.java:136)
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.getInputElement(JavaInterfaceEmitter.java:171)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:1926)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.loadOperations(AxisServiceBasedMultiLanguageEmitter.java:1841)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMDocumentForInterface(AxisServiceBasedMultiLanguageEmitter.java:993)
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.writeInterface(JavaInterfaceEmitter.java:196)
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceGenerator.generate(JavaInterfaceGenerator.java:200)
> I believe a key to the problem is the line in WSDL2JavaGenerator.generateFromWSDL():
>     xsdHelper.define(inputStream, inputFile.toURI().toString());
> Though this method is called the EMF 'packageRegistry' field is essentially empty.   I assume this is because XSDHelper.define(...)  will not handle a WSDL import.    (It does seem to be handling an XSD schema import, however).    I don't know enough of the SDO APIs to suggest a better method than the xsdHelper.define(..) we're invoking, however.
> I'll attach an example

-- 
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-1137) WSDL2Java tool should be able to handle imports of other WSDL files into the original WSDL

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

Jean-Sebastien Delfino updated TUSCANY-1137:
--------------------------------------------

    Patch Info: [Patch Available]

The attached WSDL can be used in a test case to validate a fix for this issue.

> WSDL2Java tool should be able to handle imports of other WSDL files into the original WSDL
> ------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1137
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1137
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Tools
>    Affects Versions: Java-M2
>            Reporter: Scott Kurz
>            Priority: Minor
>             Fix For: Java-SCA-M3
>
>         Attachments: PortType.wsdl, Service.wsdl
>
>
> If I, for example, define my portType in one WSDL and then import that into another WSDL where I define my Service/Port, I will have problems, like the following when running WSDL2Java against the latter WSDL:
> Caused by: java.lang.NullPointerException
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.isWrapped(JavaInterfaceEmitter.java:136)
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.getInputElement(JavaInterfaceEmitter.java:171)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:1926)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.loadOperations(AxisServiceBasedMultiLanguageEmitter.java:1841)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMDocumentForInterface(AxisServiceBasedMultiLanguageEmitter.java:993)
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.writeInterface(JavaInterfaceEmitter.java:196)
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceGenerator.generate(JavaInterfaceGenerator.java:200)
> I believe a key to the problem is the line in WSDL2JavaGenerator.generateFromWSDL():
>     xsdHelper.define(inputStream, inputFile.toURI().toString());
> Though this method is called the EMF 'packageRegistry' field is essentially empty.   I assume this is because XSDHelper.define(...)  will not handle a WSDL import.    (It does seem to be handling an XSD schema import, however).    I don't know enough of the SDO APIs to suggest a better method than the xsdHelper.define(..) we're invoking, however.
> I'll attach an example

-- 
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-1137) WSDL2Java tool should be able to handle imports of other WSDL files into the original WSDL

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

Jim Marino updated TUSCANY-1137:
--------------------------------

    Fix Version/s:     (was: Java-SCA-Future)
                   Tooling-Next

> WSDL2Java tool should be able to handle imports of other WSDL files into the original WSDL
> ------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1137
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1137
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Tools
>    Affects Versions: Java-M2
>            Reporter: Scott Kurz
>            Priority: Minor
>             Fix For: Tooling-Future
>
>         Attachments: PortType.wsdl, Service.wsdl
>
>
> If I, for example, define my portType in one WSDL and then import that into another WSDL where I define my Service/Port, I will have problems, like the following when running WSDL2Java against the latter WSDL:
> Caused by: java.lang.NullPointerException
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.isWrapped(JavaInterfaceEmitter.java:136)
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.getInputElement(JavaInterfaceEmitter.java:171)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:1926)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.loadOperations(AxisServiceBasedMultiLanguageEmitter.java:1841)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMDocumentForInterface(AxisServiceBasedMultiLanguageEmitter.java:993)
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.writeInterface(JavaInterfaceEmitter.java:196)
>         at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceGenerator.generate(JavaInterfaceGenerator.java:200)
> I believe a key to the problem is the line in WSDL2JavaGenerator.generateFromWSDL():
>     xsdHelper.define(inputStream, inputFile.toURI().toString());
> Though this method is called the EMF 'packageRegistry' field is essentially empty.   I assume this is because XSDHelper.define(...)  will not handle a WSDL import.    (It does seem to be handling an XSD schema import, however).    I don't know enough of the SDO APIs to suggest a better method than the xsdHelper.define(..) we're invoking, however.
> I'll attach an example

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