[Xml-compile] Help with a WSDL declaring multiple operations with the same name

David McMath mcdave at stanford.edu
Mon Aug 27 20:14:42 GMT 2012


On 08/27/2012 04:54 AM, Mark Overmeer wrote:
> * David McMath (mcdave at stanford.edu) [120824 17:55]:
>> On 8/23/12 6:20 PM, David McMath wrote:
>>> I'm supposed to work with the WSDL file at
>>>     http://www1.sabameeting.com/CWS/CWS.asmx?WSDL
>>
>> Any advice is appreciated, but mostly I'm just about ready to accept
>> "no" as an answer and try to fix the WSDL.
>
> I have never encountered this before.  XML::Compile::WSDL builds a
> HASH for fast search... Supporting this would be a serious rewrite
> and slowdown everyone else's runtime.  Gladly, you found that the
> Profile does not allow it, however the profile is not obligatory.
>
> I say "no"  ;-)

It's pretty clear the hash is a good thing.  My only request would be 
that there should be a warning in WSDL11.pm if your file uses this sort 
of overloading.  It's a "feature" that only the first instance of a 
given name under a port will be accessible for calls... might as well 
document it.

It's not so obvious (to me) where that warning should go.  In 
compileCalls() it's obvious when you come across a duplicate, unless of 
course one calls the method twice.  I happened to trip over it in 
compileClient(), where it's not so clear:  Why should the code keep 
looking down the list just in case there's a duplicate to warn about? 
If I come up with a real suggestion, I'll file a bug about it.

>
> Solution?  Hm... rewrite the WSDL first via an XSLT?
> Nothing really simple.

I couldn't do it with straight XSLT (technically didn't try) but I did 
it in Perl.  Since these are just overloaded method names, I can tell 
which is which by the input type, and I just systematically change the 
name to something that includes the input's name.  It seems to have 
worked, but only in the sense that I'm getting errors when I actually 
try to call the methods.  The errors don't seem to be related to the 
WSDL itself, but I won't really know for sure until it's all fixed.

Thanks for the feedback,

dave



More information about the Xml-compile mailing list