Once PHP calls Java Webservice

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.