Data transmission from php to java through WebService

Source: Internet
Author: User
Php uses WebService to transmit data to java. the error Message part {urn: bbs} myfunc was not recognized. (Does it exist in service WSDL?) is returned ?). Which of the following experts can help solve this problem. Urgent! Urgent! Urgent!


Reply to discussion (solution)

Method myfunc is not defined in WSDL

However, I have defined it, and in $ client = new SoapClient ("http: // 127.0.0.1/bbs/home_page/html/hello. wsdl ");
Try {
$ Demo =" ";
$ Result = $ client-> myfunc (" ");
Var_dump ($ result );
// Echo "The answer isresult ";
}
Catch (SoapFault $ f ){
Echo "Error Message: {$ f-> getMessage ()}";
}
?>
In this case, you can find the new SoapClient ("http: // 198.162.1.111: 8080/leanproc/ws/bbs? Wsdl ") an error is returned when the address of this java interface is changed

How can I upload data to java? do I need to configure the link of the interface of the other party in the wsdl file.

If php is called, add? Why is it not required to add wsdl but Java? Otherwise, an error is reported.

Also, when you upload data, it is a SOAP package, so you must pay attention to the php echo or something. Otherwise, he will treat echo or other output content as the transmitted data packet and then process it. error

I have done something similar to this, but php interacts with Android. php provides webservice Android request data.

I transfer data to the java end. now I can connect to the other end. the error is: {urn: bbs} myfunc was not recognized. (Does it exist in service WSDL ?). I'm a Cainiao. do you have any tips! What else do I need to change!

Look at your WSDL

The error message clearly indicates:
Myfunc was not recognized method myfunc not recognized
Does it exist in service WSDL? Does it exist in WSDL?



































































This is my wsdl content. myfunc exists!

The problem lies here.


You use http: // 127.0.0.1: 80/bbs/home_page/html/server. php? Wsdl should be accessible
Http: // 198.162.1.111: 8080/leanproc/ws/bbs? Wsdl won't work.
Is that true?

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.