Two days ago, the third party company gave us a webservice link, said Java, there is a sendmsg () method, let us in PHP do projects to push messages to them. Our company is a useful. NET WebService, while Java's WebService is useless.
The things they offer:
1. Java Webservice:http//not to see IP:9080/MCCWEB/WEBSERVICE/COMMON/WSMESSAGESERVICE?WSDL
2. Methods in Java WebService:sendmsg (string username, string title, string content, string code)
PHP Calling code:
1 include('./nusoap/lib/nusoap.php ');2 3 $client=NewNusoap_client (' HTTP//not to see ip:9080/mccweb/webservice/common/wsmessageservice?wsdl ', ' WSDL ');4 $err=$client-GetError ();5 if($err) {6 Echo' $err. ' </pre> ';7 }8 9 $param[' username '] = ' andychen ';Ten $param[' title '] = ' test push '; One $param[' content '] = ' Hello world! '; A $param[' code '] = ' @w#wed%d#dkesq#@!! 324skfjsds! '; - - $result=$client->call (' sendmsg ',Array(' Parameters ' =$param)); the Echo $result;
Operation Result:
I see, "http://mccwebhost" What the hell??
The browser opens the "http://not to see ip:9080/mccweb/webservice/common/wsmessageservice?wsdl" look;
The original is here, then, what is this ghost??
I think PHP is through the soap to call WebService, and the error message has the following value, oh, understand. "Http://mccwebhost" This is invalid domain name, was written dead.
Communication half-day each other said that it is generated, ah?? Generated? Ghost Letter. Finally the other said they use Nginx to do the load balance, to the account on the server to see a bit, I see nginx.conf is this:
Once PHP calls Java Webservice