No开发者_如何学编程rmally using SOAP over port 80 is simple:
$client = new SoapClient('http://domain.com/webservice?wsdl');
How would you consume the web service over another tcp port? (Not 80 or 443)
Try :
http://domain.com:808/webservice?wsdl
=>
$client = new SoapClient('http://domain.com:808/webservice?wsdl');
Term :808
indicates port number of an URI, if you omit it, it will use default port number for specified protocol. (80: for HTTP)
RFC 3986:
In general, a URI that uses the generic syntax for authority with an empty path should be normalized to a path of "/". Likewise, an explicit ":port", for which the port is empty or the default for the
scheme, is equivalent to one where the port and its ":" delimiter are elided and thus should be removed by scheme-based normalization. For example, the second URI above is the normal form for the "http"
scheme.
A good overview for URI is here.
精彩评论