You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "jmi (JIRA)" <ji...@apache.org> on 2007/08/17 16:54:31 UTC

[jira] Created: (CXF-918) wsdl2java renegares incorrect java code if wsdl uses wrapped style and both complex datatypes for request + response elements contains neste

wsdl2java renegares incorrect java code if wsdl uses wrapped style and both complex datatypes for request + response elements contains neste
--------------------------------------------------------------------------------------------------------------------------------------------

                 Key: CXF-918
                 URL: https://issues.apache.org/jira/browse/CXF-918
             Project: CXF
          Issue Type: Bug
          Components: Tooling
    Affects Versions: 2.0.1, 2.1
         Environment: java 1.5.0_09
            Reporter: jmi


wsdl2java renegares incorrect java code for some wsdls:

wsdl uses "wrapped style" - request and response messages for operation, both have only one message-part. Each element referenced from message-part has different compex type, where both have multiple elements. 
Problem is if there are two elements, one in request, one in response datatype, where both have the same name, but they have different datatype. In such situation a Holder is generated, which holds dataype from response. Request parameter is lost.

maybe reason is common with bug 907

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


[jira] Resolved: (CXF-918) java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes

Posted by "maomaode (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

maomaode resolved CXF-918.
--------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.2

> java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-918
>                 URL: https://issues.apache.org/jira/browse/CXF-918
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.0.1, 2.1
>         Environment: java 1.5.0_09
>            Reporter: jmi
>            Assignee: maomaode
>             Fix For: 2.0.2
>
>         Attachments: bug.wsdl
>
>
> wsdl2java renegares incorrect java code for some wsdls:
> wsdl uses "wrapped style" - request and response messages for operation, both have only one message-part. Each element referenced from message-part has different compex type, where both have multiple elements. 
> Problem is if there are two elements, one in request, one in response datatype, where both have the same name, but they have different datatype. In such situation a Holder is generated, which holds dataype from response. Request parameter is lost.
> maybe reason is common with bug 907

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


[jira] Commented: (CXF-918) java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes

Posted by "maomaode (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521302 ] 

maomaode commented on CXF-918:
------------------------------

Oh, i see the difference now, it's the same name but different type.

Seems a problem in wsdl2java, however i checked with the jaxws ri, but said the wsdl is "error: uniqueness constraint violation", means the same name but different type is not allowed, but i can not find any reason for it. have sent a mail to jaxws, let see what the answer is, if that is the case, then I'll check the schema and report the same error, otherwise, I'll fix it like what you said.

> java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-918
>                 URL: https://issues.apache.org/jira/browse/CXF-918
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.0.1, 2.1
>         Environment: java 1.5.0_09
>            Reporter: jmi
>         Attachments: bug.wsdl
>
>
> wsdl2java renegares incorrect java code for some wsdls:
> wsdl uses "wrapped style" - request and response messages for operation, both have only one message-part. Each element referenced from message-part has different compex type, where both have multiple elements. 
> Problem is if there are two elements, one in request, one in response datatype, where both have the same name, but they have different datatype. In such situation a Holder is generated, which holds dataype from response. Request parameter is lost.
> maybe reason is common with bug 907

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


[jira] Issue Comment Edited: (CXF-918) java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes

Posted by "jmi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520578 ] 

jmi edited comment on CXF-918 at 8/17/07 8:17 AM:
--------------------------------------------------

I have question. I prefer solution, if generated code contains also wrapped classes - only one input parameter for input and return type for output.
What should configure to have such output?

ok .. i found an anwer:
add 
	  <jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
	      <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>
  	</jaxws:bindings>
to wsdl:porttype.


Is it ok, that the same block of configuration doesn't have effect when it's directly in wsdl:definitions  ?

      was (Author: jmi):
    I have question. I prefer solution, if generated code contains also wrapped classes - only one input parameter for input and return type for output.
What should configure to have such output?

thanks
regards
jmi
  
> java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-918
>                 URL: https://issues.apache.org/jira/browse/CXF-918
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.0.1, 2.1
>         Environment: java 1.5.0_09
>            Reporter: jmi
>         Attachments: bug.wsdl
>
>
> wsdl2java renegares incorrect java code for some wsdls:
> wsdl uses "wrapped style" - request and response messages for operation, both have only one message-part. Each element referenced from message-part has different compex type, where both have multiple elements. 
> Problem is if there are two elements, one in request, one in response datatype, where both have the same name, but they have different datatype. In such situation a Holder is generated, which holds dataype from response. Request parameter is lost.
> maybe reason is common with bug 907

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


[jira] Updated: (CXF-918) java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes

Posted by "jmi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jmi updated CXF-918:
--------------------

    Summary: java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes  (was: wsdl2java renegares incorrect java code if wsdl uses wrapped style and both complex datatypes for request + response elements contains neste)

> java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-918
>                 URL: https://issues.apache.org/jira/browse/CXF-918
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.0.1, 2.1
>         Environment: java 1.5.0_09
>            Reporter: jmi
>         Attachments: bug.wsdl
>
>
> wsdl2java renegares incorrect java code for some wsdls:
> wsdl uses "wrapped style" - request and response messages for operation, both have only one message-part. Each element referenced from message-part has different compex type, where both have multiple elements. 
> Problem is if there are two elements, one in request, one in response datatype, where both have the same name, but they have different datatype. In such situation a Holder is generated, which holds dataype from response. Request parameter is lost.
> maybe reason is common with bug 907

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


[jira] Reopened: (CXF-918) java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes

Posted by "jmi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jmi reopened CXF-918:
---------------------


after fix it's not usable anymore.

check next attachment.
CXF-2.0.1 was able to generate code from it.
Generated code was invalid if     <enableWrapperStyle>false</enableWrapperStyle> wasn't used.
But generated code was valid if it was used.

With newer versions nothing can be generated.
But it should be possible when   <enableWrapperStyle>false</enableWrapperStyle>  is used.
Only if it's not used current error message should appear. 

Current error is: 
WSDLToJava Error: Element {http://customer.crm.tmobile.at/datatypes/manage/getcustomers}data has Having the same name wi
th different types[{http://customer.crm.tmobile.at/datatypes/manage/getcustomers}getCustomersRequestData -- {http://cust
omer.crm.tmobile.at/datatypes/manage/getcustomers}getCustomersResponseData],  In wrapper style, there is a collision as
per the spec.

> java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-918
>                 URL: https://issues.apache.org/jira/browse/CXF-918
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.0.1, 2.1
>         Environment: java 1.5.0_09
>            Reporter: jmi
>            Assignee: maomaode
>             Fix For: 2.0.2
>
>         Attachments: bug.wsdl
>
>
> wsdl2java renegares incorrect java code for some wsdls:
> wsdl uses "wrapped style" - request and response messages for operation, both have only one message-part. Each element referenced from message-part has different compex type, where both have multiple elements. 
> Problem is if there are two elements, one in request, one in response datatype, where both have the same name, but they have different datatype. In such situation a Holder is generated, which holds dataype from response. Request parameter is lost.
> maybe reason is common with bug 907

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


[jira] Resolved: (CXF-918) java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-918.
-----------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.0.2)
                   2.0.6

> java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-918
>                 URL: https://issues.apache.org/jira/browse/CXF-918
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.0.1, 2.1
>         Environment: java 1.5.0_09
>            Reporter: jmi
>            Assignee: maomaode
>             Fix For: 2.0.6
>
>         Attachments: bug.wsdl, test.zip
>
>
> wsdl2java renegares incorrect java code for some wsdls:
> wsdl uses "wrapped style" - request and response messages for operation, both have only one message-part. Each element referenced from message-part has different compex type, where both have multiple elements. 
> Problem is if there are two elements, one in request, one in response datatype, where both have the same name, but they have different datatype. In such situation a Holder is generated, which holds dataype from response. Request parameter is lost.
> maybe reason is common with bug 907

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


[jira] Commented: (CXF-918) java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes

Posted by "maomaode (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521309 ] 

maomaode commented on CXF-918:
------------------------------

So, the fix in wsdl2java is report an error, and you must find another way out. thanks for reporting this.

> java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-918
>                 URL: https://issues.apache.org/jira/browse/CXF-918
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.0.1, 2.1
>         Environment: java 1.5.0_09
>            Reporter: jmi
>         Attachments: bug.wsdl
>
>
> wsdl2java renegares incorrect java code for some wsdls:
> wsdl uses "wrapped style" - request and response messages for operation, both have only one message-part. Each element referenced from message-part has different compex type, where both have multiple elements. 
> Problem is if there are two elements, one in request, one in response datatype, where both have the same name, but they have different datatype. In such situation a Holder is generated, which holds dataype from response. Request parameter is lost.
> maybe reason is common with bug 907

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


[jira] Commented: (CXF-918) java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes

Posted by "jmi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521084 ] 

jmi commented on CXF-918:
-------------------------

Instead of incorrect (because dataytype of  "theSameNameFieldDifferentDataType" element in wsdl is different for request and for response complex type, and that's why it cannot by hold by one common Holder)
        @WebParam(targetNamespace = "http://bugs.cxf/services/bug1", mode = Mode.INOUT, name = "theSameNameFieldDifferentDataType") 
        javax.xml.ws.Holder<java.lang.Integer> theSameNameFieldDifferentDataType, 

there should be something like (field names can be different (instead of "Request" and "Response" suffix it can be something else)), 
        @WebParam(targetNamespace = "http://bugs.cxf/services/bug1", name = "theSameNameFieldDifferentDataType") 
        java.lang.String theSameNameFieldDifferentDataTypeRequest, 
        @WebParam(targetNamespace = "http://bugs.cxf/services/bug1", mode = Mode.OUT, name = "theSameNameFieldDifferentDataType") 
        javax.xml.ws.Holder<java.lang.Integer> theSameNameFieldDifferentDataTypeResponse, 

i hope i have written it correctly, according to wsdl.

> java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-918
>                 URL: https://issues.apache.org/jira/browse/CXF-918
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.0.1, 2.1
>         Environment: java 1.5.0_09
>            Reporter: jmi
>         Attachments: bug.wsdl
>
>
> wsdl2java renegares incorrect java code for some wsdls:
> wsdl uses "wrapped style" - request and response messages for operation, both have only one message-part. Each element referenced from message-part has different compex type, where both have multiple elements. 
> Problem is if there are two elements, one in request, one in response datatype, where both have the same name, but they have different datatype. In such situation a Holder is generated, which holds dataype from response. Request parameter is lost.
> maybe reason is common with bug 907

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


[jira] Updated: (CXF-918) wsdl2java renegares incorrect java code if wsdl uses wrapped style and both complex datatypes for request + response elements contains neste

Posted by "jmi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jmi updated CXF-918:
--------------------

    Attachment: bug.wsdl

This code was generated.

I don't understand several more points:
why did it generate Holder for myString2?

    @ResponseWrapper(targetNamespace = "http://bugs.cxf/services/bug1", className = "cxf.bugs.services.bug1.ResponseDataType", localName = "myBug1Response")
    @RequestWrapper(targetNamespace = "http://bugs.cxf/services/bug1", className = "cxf.bugs.services.bug1.RequestDataType", localName = "myBug1")
    @WebMethod
    public void myBug1(
        @WebParam(targetNamespace = "http://bugs.cxf/services/bug1", name = "myString1")
        java.lang.String myString1,
        @WebParam(targetNamespace = "http://bugs.cxf/services/bug1", mode = Mode.INOUT, name = "theSameNameFieldTheSameDataType")
        javax.xml.ws.Holder<java.lang.String> theSameNameFieldTheSameDataType,
        @WebParam(targetNamespace = "http://bugs.cxf/services/bug1", mode = Mode.INOUT, name = "theSameNameFieldDifferentDataType")
        javax.xml.ws.Holder<java.lang.Integer> theSameNameFieldDifferentDataType,
        @WebParam(targetNamespace = "http://bugs.cxf/services/bug1", mode = Mode.OUT, name = "myString2")
        javax.xml.ws.Holder<java.lang.String> myString2
    );

> wsdl2java renegares incorrect java code if wsdl uses wrapped style and both complex datatypes for request + response elements contains neste
> --------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-918
>                 URL: https://issues.apache.org/jira/browse/CXF-918
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.0.1, 2.1
>         Environment: java 1.5.0_09
>            Reporter: jmi
>         Attachments: bug.wsdl
>
>
> wsdl2java renegares incorrect java code for some wsdls:
> wsdl uses "wrapped style" - request and response messages for operation, both have only one message-part. Each element referenced from message-part has different compex type, where both have multiple elements. 
> Problem is if there are two elements, one in request, one in response datatype, where both have the same name, but they have different datatype. In such situation a Holder is generated, which holds dataype from response. Request parameter is lost.
> maybe reason is common with bug 907

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


[jira] Commented: (CXF-918) wsdl2java renegares incorrect java code if wsdl uses wrapped style and both complex datatypes for request + response elements contains neste

Posted by "jmi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520578 ] 

jmi commented on CXF-918:
-------------------------

I have question. I prefer solution, if generated code contains also wrapped classes - only one input parameter for input and return type for output.
What should configure to have such output?

thanks
regards
jmi

> wsdl2java renegares incorrect java code if wsdl uses wrapped style and both complex datatypes for request + response elements contains neste
> --------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-918
>                 URL: https://issues.apache.org/jira/browse/CXF-918
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.0.1, 2.1
>         Environment: java 1.5.0_09
>            Reporter: jmi
>         Attachments: bug.wsdl
>
>
> wsdl2java renegares incorrect java code for some wsdls:
> wsdl uses "wrapped style" - request and response messages for operation, both have only one message-part. Each element referenced from message-part has different compex type, where both have multiple elements. 
> Problem is if there are two elements, one in request, one in response datatype, where both have the same name, but they have different datatype. In such situation a Holder is generated, which holds dataype from response. Request parameter is lost.
> maybe reason is common with bug 907

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


[jira] Assigned: (CXF-918) java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes

Posted by "maomaode (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

maomaode reassigned CXF-918:
----------------------------

    Assignee: maomaode

> java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-918
>                 URL: https://issues.apache.org/jira/browse/CXF-918
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.0.1, 2.1
>         Environment: java 1.5.0_09
>            Reporter: jmi
>            Assignee: maomaode
>         Attachments: bug.wsdl
>
>
> wsdl2java renegares incorrect java code for some wsdls:
> wsdl uses "wrapped style" - request and response messages for operation, both have only one message-part. Each element referenced from message-part has different compex type, where both have multiple elements. 
> Problem is if there are two elements, one in request, one in response datatype, where both have the same name, but they have different datatype. In such situation a Holder is generated, which holds dataype from response. Request parameter is lost.
> maybe reason is common with bug 907

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


[jira] Commented: (CXF-918) java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes

Posted by "maomaode (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521006 ] 

maomaode commented on CXF-918:
------------------------------

I can not see any wrong in the generated code, what's your expectation here?
If you want some wrapper child as a return type, then you have to name it as 'return', e.g if you want to the string2 as a return type, you can name it 'return' instead of the 'string2' in your schema. 

> java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-918
>                 URL: https://issues.apache.org/jira/browse/CXF-918
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.0.1, 2.1
>         Environment: java 1.5.0_09
>            Reporter: jmi
>         Attachments: bug.wsdl
>
>
> wsdl2java renegares incorrect java code for some wsdls:
> wsdl uses "wrapped style" - request and response messages for operation, both have only one message-part. Each element referenced from message-part has different compex type, where both have multiple elements. 
> Problem is if there are two elements, one in request, one in response datatype, where both have the same name, but they have different datatype. In such situation a Holder is generated, which holds dataype from response. Request parameter is lost.
> maybe reason is common with bug 907

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


[jira] Commented: (CXF-918) java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes

Posted by "maomaode (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521307 ] 

maomaode commented on CXF-918:
------------------------------

Got this response from the JAX-WS mail list, just paste here:

The schema is correct. Having the same name with different types in wrapper style, there is a collision. It cannot generate a java signature as per the spec.

for e.g:
op(..., String  theSameNameFieldDifferentDataType, int theSameNameFieldDifferentDataType, ...) which would be incorrect in java. Having the same type would generate a Holder for this.
op(..., Holder<String> theSameNameFieldDifferentDataType, ...)

There are many ways to get around this:
1. Use customization to change the name of the child elements
2. Disable wrapper style using customization. I hope there will be simple command line option on wsimport in future versions.
3. Otherwise change the name of the child elements in schema

But, we should enhance the error message. Can you file a bug on this.

Jitu 

> java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-918
>                 URL: https://issues.apache.org/jira/browse/CXF-918
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.0.1, 2.1
>         Environment: java 1.5.0_09
>            Reporter: jmi
>         Attachments: bug.wsdl
>
>
> wsdl2java renegares incorrect java code for some wsdls:
> wsdl uses "wrapped style" - request and response messages for operation, both have only one message-part. Each element referenced from message-part has different compex type, where both have multiple elements. 
> Problem is if there are two elements, one in request, one in response datatype, where both have the same name, but they have different datatype. In such situation a Holder is generated, which holds dataype from response. Request parameter is lost.
> maybe reason is common with bug 907

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


[jira] Updated: (CXF-918) java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes

Posted by "jmi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jmi updated CXF-918:
--------------------

    Attachment: test.zip

> java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-918
>                 URL: https://issues.apache.org/jira/browse/CXF-918
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.0.1, 2.1
>         Environment: java 1.5.0_09
>            Reporter: jmi
>            Assignee: maomaode
>             Fix For: 2.0.2
>
>         Attachments: bug.wsdl, test.zip
>
>
> wsdl2java renegares incorrect java code for some wsdls:
> wsdl uses "wrapped style" - request and response messages for operation, both have only one message-part. Each element referenced from message-part has different compex type, where both have multiple elements. 
> Problem is if there are two elements, one in request, one in response datatype, where both have the same name, but they have different datatype. In such situation a Holder is generated, which holds dataype from response. Request parameter is lost.
> maybe reason is common with bug 907

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


[jira] Issue Comment Edited: (CXF-918) java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes

Posted by "jmi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520576 ] 

jmi edited comment on CXF-918 at 8/17/07 8:03 AM:
--------------------------------------------------

This code was generated.

    @ResponseWrapper(targetNamespace = "http://bugs.cxf/services/bug1", className = "cxf.bugs.services.bug1.ResponseDataType", localName = "myBug1Response")
    @RequestWrapper(targetNamespace = "http://bugs.cxf/services/bug1", className = "cxf.bugs.services.bug1.RequestDataType", localName = "myBug1")
    @WebMethod
    public void myBug1(
        @WebParam(targetNamespace = "http://bugs.cxf/services/bug1", name = "myString1")
        java.lang.String myString1,
        @WebParam(targetNamespace = "http://bugs.cxf/services/bug1", mode = Mode.INOUT, name = "theSameNameFieldTheSameDataType")
        javax.xml.ws.Holder<java.lang.String> theSameNameFieldTheSameDataType,
        @WebParam(targetNamespace = "http://bugs.cxf/services/bug1", mode = Mode.INOUT, name = "theSameNameFieldDifferentDataType")
        javax.xml.ws.Holder<java.lang.Integer> theSameNameFieldDifferentDataType,
        @WebParam(targetNamespace = "http://bugs.cxf/services/bug1", mode = Mode.OUT, name = "myString2")
        javax.xml.ws.Holder<java.lang.String> myString2
    );

      was (Author: jmi):
    This code was generated.

I don't understand several more points:
why did it generate Holder for myString2?

    @ResponseWrapper(targetNamespace = "http://bugs.cxf/services/bug1", className = "cxf.bugs.services.bug1.ResponseDataType", localName = "myBug1Response")
    @RequestWrapper(targetNamespace = "http://bugs.cxf/services/bug1", className = "cxf.bugs.services.bug1.RequestDataType", localName = "myBug1")
    @WebMethod
    public void myBug1(
        @WebParam(targetNamespace = "http://bugs.cxf/services/bug1", name = "myString1")
        java.lang.String myString1,
        @WebParam(targetNamespace = "http://bugs.cxf/services/bug1", mode = Mode.INOUT, name = "theSameNameFieldTheSameDataType")
        javax.xml.ws.Holder<java.lang.String> theSameNameFieldTheSameDataType,
        @WebParam(targetNamespace = "http://bugs.cxf/services/bug1", mode = Mode.INOUT, name = "theSameNameFieldDifferentDataType")
        javax.xml.ws.Holder<java.lang.Integer> theSameNameFieldDifferentDataType,
        @WebParam(targetNamespace = "http://bugs.cxf/services/bug1", mode = Mode.OUT, name = "myString2")
        javax.xml.ws.Holder<java.lang.String> myString2
    );
  
> java code from wsdl2java for wrapped style if request and response have elements with the same names and different datatypes
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-918
>                 URL: https://issues.apache.org/jira/browse/CXF-918
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.0.1, 2.1
>         Environment: java 1.5.0_09
>            Reporter: jmi
>         Attachments: bug.wsdl
>
>
> wsdl2java renegares incorrect java code for some wsdls:
> wsdl uses "wrapped style" - request and response messages for operation, both have only one message-part. Each element referenced from message-part has different compex type, where both have multiple elements. 
> Problem is if there are two elements, one in request, one in response datatype, where both have the same name, but they have different datatype. In such situation a Holder is generated, which holds dataype from response. Request parameter is lost.
> maybe reason is common with bug 907

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