You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Simon Nash (JIRA)" <de...@tuscany.apache.org> on 2008/08/06 19:50:44 UTC

[jira] Commented: (TUSCANY-2531) Problems with generated wsdl when using non service package.

    [ https://issues.apache.org/jira/browse/TUSCANY-2531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620344#action_12620344 ] 

Simon Nash commented on TUSCANY-2531:
-------------------------------------

I have spent some time looking into this.  Here are my findings so far.  The generated WSDL has the following errors:

1) The <complexType> definition for wsServicePOJO should say WSServicePOJO
2) The wrapper element with type="ns0:WSServicePOJO" should say type="WSServicePOJO"

Fixing both of these these allows the WSDL to be processed by wsimport, but there is still a warning about a missing import.  To remove this warning, the following change is needed:

3) An empty <xs:import/> element should be added to the schema definition with targetNamespace="http://ws.example.com/"

I don't know what's causing error 1).  It's possible that the introspection of the Java interface is converting "WS" to "ws" (unlikely), or the JAXB schema generation is converting "WS" to "ws" (also unlikely).

I don't know what's causing error 2).  Somewhere in the introspection of the Java interface and generation of the wrapper class, it seems that a namespace is incorrectly being added to this DataType, which should have no namespace according to JAXB rules.

Error 3) is easy to fix, but the fix is dependent on first fixing error 2), as without this fix the generated <import> element would specify an incorrect namespace.


> Problems with generated wsdl when using non service package.
> ------------------------------------------------------------
>
>                 Key: TUSCANY-2531
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2531
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>         Environment: Windows Weblogic 9.2 and Websphere 6.1
>            Reporter: Dave Sowerby
>         Attachments: ws.zip
>
>
> I'm using wsdl2java to generate a proxy to a Tuscany webservice - this
> is working well in most cases, however I've found a situation where it
> does not....
> When I have defined a parameter to an operation which does not reside
> in the same package as the service itself, then the wsdl generated
> does not respect the appropriate namespace required for such clients
> to be able to process the wsdl appropriately.
> I've attached an example scenario which demonstrates this:
> o ws-common and ws-webapp being the service which generates the wsdl
> through ?wsdl
> o ws-client uses the axistools-maven-plugin:wsdl2java goal to process the wsdl
> So the client fails with the following error:
> Embedded error: WSDL2Java execution failed
> Type {http://vo.ws.example.com/}WSServicePOJO is referenced but not defined.

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