开发者

SOAP url in browser

When you enter soap servers url in browser, normally it produces blank page. But if memory serves me I saw somewhere something like

Hello, this is our soap service. For documentation please follow this link. To get an account, please follow this link. Blahblah.

How can I do that? (Using PHP SoapServer, if that matters).

I did try to just print everything at the bottom of soap-server-hand开发者_StackOverflow社区ling php code but in that case soap server doesnt work when called from proper soap client.


The example you saw doing that was probably checking for one or more things in the headers and acting upon what it saw. For example, it could inspect

USER_AGENT
ACCEPT
ACCEPT_ENCODING

etc, etc, etc.

For you to do this in PHP, you will need your check to be run before your SoapServer gets the request. You can access the header values by inspecting $SERVER. Most of them will start with HTTP. To get started just

print_r($_SERVER);


What you want to do is look into WSDL (Web Service Description Language). Languages like .NET produce them for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜