Any difference between a ?WSDL and ?wsdl parameter?

萝らか妹 提交于 2019-12-12 01:58:34

问题


Is there any difference between suffixing a webservice endpoint with uppercase ?WSDL or lowercase ?wsdl?

I'm using PHP's SoapClient. When I set the URL with uppercase ?WSDL like http://example.com/Foo.asmx?WSDL I reach a memory limit error or a no content error. But when I use lowercase ?wsdl like http://example.com/Foo.asmx?wsdl, it works!

What's the difference? Something on the SOAP server or what?

EDITED

I've got the real problem. It was about cache and storage, the SOAP was unable to store cache files because the server was quite full. Don't know if wsdl cache happens in all languages, but at least in PHP this thread saved me: In PHP how can you clear a WSDL cache?


回答1:


There shouldn't be any difference between ?wsdl and ?WSDL or any combination of case letters. See these examples:

http://www.dneonline.com/calculator.asmx?WSDL
http://www.dneonline.com/calculator.asmx?wsdl
http://www.dneonline.com/calculator.asmx?Wsdl
http://www.dneonline.com/calculator.asmx?WsDl

This particular web service does not care, and should not care, as long as it's clear I'm asking for the WSDL.

But this might not be always the case depending on the technology used to build the web service and what the code does to check for the presence of the parameter. If inside the code there is a case insensitive comparison with the wsdl string then any combination will work. If the compare is case sensitive then only the exact match will be valid (it would be sloppy programming but stuff like that happens).

Yours is a dot.NET service so it should not care. But maybe there is a firewall in front of it, or a reverse proxy, and that is misconfigured to only accept an exact match. Request for the WSDL in you browser using different case combinations and see what status code you get.

Bottom line is it should not matter, but sometimes that's what you have to work with.



来源:https://stackoverflow.com/questions/24961892/any-difference-between-a-wsdl-and-wsdl-parameter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!