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

[jira] Created: (TUSCANY-544) WSDL2Java should support WSDLs with schema imports

WSDL2Java should support WSDLs with schema imports
--------------------------------------------------

         Key: TUSCANY-544
         URL: http://issues.apache.org/jira/browse/TUSCANY-544
     Project: Tuscany
        Type: Bug

  Components: Java SCA Tools  
    Versions: Java-M1    
    Reporter: Ron Gavlin


Many WSDLs choose to import schemas rather than embedding types inline. The tuscany WSDL2JavaGenerator does not currently support this type of usage.

-- 
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-544) WSDL2Java should support WSDLs with schema imports

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

ant elder updated TUSCANY-544:
------------------------------

        Fix Version/s: Java-M2
    Affects Version/s: Java-M2
                           (was: Java-M1)

> WSDL2Java should support WSDLs with schema imports
> --------------------------------------------------
>
>                 Key: TUSCANY-544
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-544
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Tools
>    Affects Versions: Java-M2
>            Reporter: Ron Gavlin
>             Fix For: Java-M2
>
>
> Many WSDLs choose to import schemas rather than embedding types inline. The tuscany WSDL2JavaGenerator does not currently support this type of usage.

-- 
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-544) WSDL2Java should support WSDLs with schema imports

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

Jean-Sebastien Delfino updated TUSCANY-544:
-------------------------------------------

    Fix Version/s:     (was: Java-M2)
                   Java-M3

> WSDL2Java should support WSDLs with schema imports
> --------------------------------------------------
>
>                 Key: TUSCANY-544
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-544
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Tools
>    Affects Versions: Java-M2
>            Reporter: Ron Gavlin
>             Fix For: Java-M3
>
>
> Many WSDLs choose to import schemas rather than embedding types inline. The tuscany WSDL2JavaGenerator does not currently support this type of usage.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://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-544) WSDL2Java should support WSDLs with schema imports

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

Scott Kurz commented on TUSCANY-544:
------------------------------------

I think it would help to add some specific detail on what you want WSDL2JavaGenerator  to support that it doesn't currently .. or to cancel this JIRA.  

I have been looking at the tools and am planning on opening one or two new JIRAs myself.    I wouldn't say that WSDL2JavaGenerator  flat-out doesn't support importing schemas; there are issues but certain things work the way I expect them to.   

I have had success running WSDL2Java against WSDLs with this type of pattern:

<wsdl:definitions ..
    <wsdl:types>... 
       <xsd:schema> ..
            <xsd:import  ... schemaLocation="MySchema.xsd"/>

> WSDL2Java should support WSDLs with schema imports
> --------------------------------------------------
>
>                 Key: TUSCANY-544
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-544
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Tools
>    Affects Versions: Java-M2
>            Reporter: Ron Gavlin
>             Fix For: Java-SCA-M3
>
>
> Many WSDLs choose to import schemas rather than embedding types inline. The tuscany WSDL2JavaGenerator does not currently support this type of usage.

-- 
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] Assigned: (TUSCANY-544) WSDL2Java should support WSDLs with schema imports

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

Luciano Resende reassigned TUSCANY-544:
---------------------------------------

    Assignee: Luciano Resende

> WSDL2Java should support WSDLs with schema imports
> --------------------------------------------------
>
>                 Key: TUSCANY-544
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-544
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Tools
>    Affects Versions: Java-SCA-M2
>            Reporter: Ron Gavlin
>            Assignee: Luciano Resende
>             Fix For: Java-SCA-Next
>
>
> Many WSDLs choose to import schemas rather than embedding types inline. The tuscany WSDL2JavaGenerator does not currently support this type of usage.

-- 
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] Resolved: (TUSCANY-544) WSDL2Java should support WSDLs with schema imports

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

Luciano Resende resolved TUSCANY-544.
-------------------------------------

    Resolution: Cannot Reproduce

In general, WSDL2Java is supporting WSDLs with schema imports. There are special scenarios that might have bugs, as the one mentioned by Sean Zhou, but I'd recommend using specific JIRA for the specific scenarios. In the case of Sean Zhou scenario, looks like FuhWei opened TUSCANY-1645 and he is taking care of the issue in the XSD2JavaGenerator code.

> WSDL2Java should support WSDLs with schema imports
> --------------------------------------------------
>
>                 Key: TUSCANY-544
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-544
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Tools
>    Affects Versions: Java-SCA-M2
>            Reporter: Ron Gavlin
>            Assignee: Luciano Resende
>             Fix For: Java-SCA-Next
>
>
> Many WSDLs choose to import schemas rather than embedding types inline. The tuscany WSDL2JavaGenerator does not currently support this type of usage.

-- 
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-544) WSDL2Java should support WSDLs with schema imports

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

Sean Zhou commented on TUSCANY-544:
-----------------------------------

I encountered the same problem with schema imports. Please see the exception stack and the WSDL and imported schema below:

D:\Tuscany>WSDL2Java.bat -targetDirectory d:\temp\t d:\temp\EchoServ
ice.wsdl
java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:632)
        at org.apache.tuscany.sdo.generate.XSD2JavaGenerator.createPackageInfoTable(XSD2JavaGenerato
r.java:320)
        at org.apache.tuscany.sdo.generate.XSD2JavaGenerator.generateFromXMLSchema(XSD2JavaGenerator
.java:270)
        at org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator.generateFromWSDL(WSDL2Java
Generator.java:217)
        at org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator.main(WSDL2JavaGenerator.ja
va:172)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:615)
        at com.ibm.ws.soa.sca.bootstrap.SCALauncher.main(SCALauncher.java:74)
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:615)
        at com.ibm.ws.soa.sca.bootstrap.SCALauncher.main(SCALauncher.java:74)
Caused by: java.lang.IllegalArgumentException: java.lang.NullPointerException
        at org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator.generateFromWSDL(WSDL2Java
Generator.java:252)
        at org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator.main(WSDL2JavaGenerator.ja
va:172)
        ... 5 more
Caused by: java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:632)
        at org.apache.tuscany.sdo.generate.XSD2JavaGenerator.createPackageInfoTable(XSD2JavaGenerato
r.java:320)
        at org.apache.tuscany.sdo.generate.XSD2JavaGenerator.generateFromXMLSchema(XSD2JavaGenerator
.java:270)
        at org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator.generateFromWSDL(WSDL2Java
Generator.java:217)
        ... 6 more




-----------------
EchoService.wsdl
-----------------
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://test/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="EchoService" targetNamespace="http://test/">
  <types>
    <xsd:schema>
      <xsd:import namespace="http://test/" schemaLocation="EchoService_schema1.xsd"/>
    </xsd:schema>
  </types>
  <message name="echo">
    <part element="tns:echo" name="parameters"/>
  </message>
  <message name="echoResponse">
    <part element="tns:echoResponse" name="parameters"/>
  </message>
  <portType name="Echo">
    <operation name="echo">
      <input message="tns:echo"/>
      <output message="tns:echoResponse"/>
    </operation>
  </portType>
  <binding name="EchoPortBinding" type="tns:Echo">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="echo">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal"/>
      </input>
      <output>
        <soap:body use="literal"/>
      </output>
    </operation>
  </binding>
  <service name="EchoService">
    <port binding="tns:EchoPortBinding" name="EchoPort">
      <soap:address location="http://localhost:9080/w1/EchoService"/>
    </port>
  </service>
</definitions>






-----------------------
EchoService_schema1.xsd
-----------------------
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://test/" targetNamespace="http://test/" version="1.0">

  <xs:element name="echo" type="tns:echo"/>

  <xs:element name="echoResponse" type="tns:echoResponse"/>

  <xs:complexType name="echo">
    <xs:sequence>
      <xs:element minOccurs="0" name="arg0" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="echoResponse">
    <xs:sequence>
      <xs:element minOccurs="0" name="return" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
</xs:schema>


> WSDL2Java should support WSDLs with schema imports
> --------------------------------------------------
>
>                 Key: TUSCANY-544
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-544
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Tools
>    Affects Versions: Java-SCA-M2
>            Reporter: Ron Gavlin
>             Fix For: Java-SCA-Next
>
>
> Many WSDLs choose to import schemas rather than embedding types inline. The tuscany WSDL2JavaGenerator does not currently support this type of usage.

-- 
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-544) WSDL2Java should support WSDLs with schema imports

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

Jim Marino updated TUSCANY-544:
-------------------------------

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

> WSDL2Java should support WSDLs with schema imports
> --------------------------------------------------
>
>                 Key: TUSCANY-544
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-544
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Tools
>    Affects Versions: Java-M2
>            Reporter: Ron Gavlin
>             Fix For: Tooling-Next
>
>
> Many WSDLs choose to import schemas rather than embedding types inline. The tuscany WSDL2JavaGenerator does not currently support this type of usage.

-- 
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-544) WSDL2Java should support WSDLs with schema imports

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

Scott Kurz commented on TUSCANY-544:
------------------------------------

In my experience (admittedly not on the absolute latest version of the code), it's not importing XSD per-se which is the problem.   

In my experience, there are three issues with the WSDL/XSD pair here...  

1) failed to put a targetNamespace on the <schema> element in WSDL types
2) You do an import into the same TNS as the WSDL TNS... the SDO-based WSDL2Java tooling assumes you are going to do an include if you're referencing an external XSD with the same TNS.   The XSD2Java code I believe has the same restriction.  

But the BasicProfile says the style Sean pasted is legal.. and in fact wsgen.bat will generate using this type of pattern in my experience.

3) Your element and types use the same QName.      

I don't know which standard defines the behavior here...


------------------------------------------------------------------------------

So hopefuilly this clears up and narrows down where the problems lies a bit.  (not that I'm adding any code with these comments ;)  

> WSDL2Java should support WSDLs with schema imports
> --------------------------------------------------
>
>                 Key: TUSCANY-544
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-544
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Tools
>    Affects Versions: Java-SCA-M2
>            Reporter: Ron Gavlin
>            Assignee: Luciano Resende
>             Fix For: Java-SCA-Next
>
>
> Many WSDLs choose to import schemas rather than embedding types inline. The tuscany WSDL2JavaGenerator does not currently support this type of usage.

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