Hell All.
I have a WSDL that uses overloaded operations at a few
places. My application provieds a bridge between an
existing J2EE application and a .NET GUI client.
In my WSDL, my TestInterface has two operations:
"TestMethod" that takes two strings
"TestMethod" that takes three strings
<message name="TestInterface.TestMethod"> ...
</message>
<message name="TestInterface.TestMethodResponse"> ...
</message>
<message name="TestInterface.TestMethod_"> ...
</message>
<message name="TestInterface.TestMethod_Response"> ...
</message>
... ...
... ...
<operation name="TestMethod">
<input message="tns:TestInterface.TestMethod"
name="TestMethod" />
<output
message="tns:TestInterface.TestMethodResponse"
name="TestMethodResponse" />
</operation>
<operation name="TestMethod">
<input message="tns:TestInterface.TestMethod_"
name="TestMethod_" />
<output
message="tns:TestInterface.TestMethod_Response"
name="TestMethod_Response" />
</operation>
Please note that to make the message names unique, I
am using an underscore at the end of the message name.
Also, I am using unique element names and part names
in the messages.
When I generate Java code, the generated methods look
alright (as shown below)
public org.apache.ka.TestObject testMethod(
String a, String b
) throws ...;
public org.apache.ka.TestObject testMethod(
String aa, Stirng bb, String cc
) throws ...;
I could build, deploy and run the application as
expected.
Now, here is the question. I read somewhere that WSI
basic profile is going to prohibit use of overloaded
operations (in general more than one operations with
the same operation name - regarless of equality of the
number of arguments they take)! Can someone confirm
that for Axis and if that's the case, does anyone know
the reason? I am planning to use WebServices for
three major languages - Java, C# and C++. And all the
three languages support overloaded methods. Why would
WSI not allow it?
Thanks.
Kartik
__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html