aspose file tools*
The moose likes Web Services and the fly likes Name of the input/output element must be unique Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Name of the input/output element must be unique" Watch "Name of the input/output element must be unique" New topic
Author

Name of the input/output element must be unique

Meghana Reddy
Ranch Hand

Joined: Jan 29, 2002
Posts: 76
Hi - I've a question on the WSDL.

I've a WSDL that has two methods as below:



As you can see, both the operations add and subtract have input & output messages with the same names "InputNums" and "Result" respectively.

When I try to validate this WSDL, I get the following error:
The name 'InputNums' specified for this input element is not unique.
The name of an input element must be unique from the names of all other input and output elements defined in the 'TestService' port type.


I've read the WSDL spec here which doesn't give the reasons clearly(at least to me). It says:

The name attribute of the input and output elements provides a unique name among all input and output elements within the enclosing port type.
In order to avoid having to name each input and output element within an operation, WSDL provides some default values based on the operation name.


In order to avoid naming each input/output elements, WSDL provides defaults. But why is that a RULE? Shouldn't it be a warning?
Can't the developer provide the names by him/herself if he/she wants to?

Further, I don't understand why this is a problem, since when the clients invoke the web service, they invoke with specific operation names called 'add' or 'subtract'.
My question finally is - As long as the operation names are different why should the parameter names matter?
Can some one please explain the consequences of having the WSDL like this, if any ?

Thanks in advance
Meghana


Meghana Reddy
Meghana Reddy
Ranch Hand

Joined: Jan 29, 2002
Posts: 76
For those who are interested, this post has been answered here
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Name of the input/output element must be unique