wsdl2java error. Parameter already exists

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

wsdl2java error. Parameter already exists

ajapan
Hi,

i'm getting the following error when trying to create a client from the wsdl with CXF 2.2.9 (any version newer than 2.2.4).

WSDLToJava Error: Parameter: ctxo already exists for method op86999909 but of type java.util.List<com.ppp.schemas.TOP1> instead of java.util.List<com.ppp.schemas.TSOP1>.  Use a JAXWS/JAXB binding customization to rename the parameter.

The ctxo element exists as input and output element, but of different types (TOP1 for the input and TSOP1 for the output).

I've tried the autoNameResolution flag but still the same error.

What am I doing wrong?

thanks
Reply | Threaded
Open this post in threaded view
|

Re: wsdl2java error. Parameter already exists

Daniel Kulp
Administrator


Hmm.... autoNameResolution should pick that up.   Not good.   Any chance you
can send the wsdl to me (even off list) so I can debug in?

Thanks!
Dan


On Thursday 24 June 2010 3:45:53 pm ajapan wrote:

> Hi,
>
> i'm getting the following error when trying to create a client from the
> wsdl with CXF 2.2.9 (any version newer than 2.2.4).
>
> WSDLToJava Error: Parameter: ctxo already exists for method op86999909 but
> of type java.util.List<com.ppp.schemas.TOP1> instead of
> java.util.List<com.ppp.schemas.TSOP1>.  Use a JAXWS/JAXB binding
> customization to rename the parameter.
>
> The ctxo element exists as input and output element, but of different types
> (TOP1 for the input and TSOP1 for the output).
>
> I've tried the autoNameResolution flag but still the same error.
>
> What am I doing wrong?
>
> thanks

--
Daniel Kulp
[hidden email]
http://dankulp.com/blog
Reply | Threaded
Open this post in threaded view
|

Re: wsdl2java error. Parameter already exists

ajapan
Can anyone help me with this error, please? I've attached the wsdl and the xsd.wsdl.zip

thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: wsdl2java error. Parameter already exists

Daniel Kulp
Administrator
On Tuesday 29 June 2010 11:13:54 am ajapan wrote:
> Can anyone help me with this error, please? I've attached the wsdl and the
> xsd. http://old.nabble.com/file/p29024823/wsdl.zip wsdl.zip
>
> thanks in advance.

I committed a fix for this this afternoon.   Tomorrows snapshots should work
fine.

--
Daniel Kulp
[hidden email]
http://dankulp.com/blog
Reply | Threaded
Open this post in threaded view
|

Re: wsdl2java error. Parameter already exists

ajapan
Thanks Dan, it works now.
dkulp wrote
On Tuesday 29 June 2010 11:13:54 am ajapan wrote:
> Can anyone help me with this error, please? I've attached the wsdl and the
> xsd. http://old.nabble.com/file/p29024823/wsdl.zip wsdl.zip
>
> thanks in advance.

I committed a fix for this this afternoon.   Tomorrows snapshots should work
fine.

--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Reply | Threaded
Open this post in threaded view
|

Re: wsdl2java - creating List return type

Daniel  Kulp
Administrator
In reply to this post by ajapan
On Thursday 01 July 2010 9:49:50 pm nbhatia wrote:
> I just realized that for the simplified example in my last post, the return
> type generated is indeed a List. It is only when OrderCriteria becomes more
> complex (includes a list of enumerations etc.) that the generator starts
> wrapping the List return type. Don't know if there is any workaround for
> this.
>
> Thanks.
> Naresh

You would need to make sure both the request and response object meet the
requirements defined in the jaxws spec: (section 2.3.1.2)

(i) The operation’s input and output messages (if present) each contain only a
single part

(ii) The input message part refers to a global element declaration whose
localname is equal to the operation name

(iii) The output message (if present) part refers to a global element
declaration

(iv) The elements referred to by the input and output message (if present)
parts (henceforth referred to as wrapper elements) are both complex types
defined using the xsd:sequence compositor

(v) The wrapper elements only contain child elements, they MUST not contain
other structures such as wildcards (element or attribute), xsd:choice,
substitution groups (element references are not permitted) or attributes;
furthermore, they MUST not be nillable.





--
Daniel Kulp
[hidden email]
http://dankulp.com/blog