Interface-php How to invoke a WCF service, the invocation parameter is an object parameter.

Source: Internet
Author: User
Keywords interface PHP Parameters
interface PHP Parameters

. NET does the WCF interface, deploying IIS on Access is possible

I use the PHP soap call test, whether it can pass, it is also possible:
Header (' Content-type:text/plain ');
$client = new SoapClient (' http://testu.sh.jinri.com/Flight.User.SOA/SuggestService.svc?wsdl ');
Echo '

';
echo "provided method \ n";
Print_r ($client getfunctions ());
echo "Related data structure \ n";
Print_r ($client
GetTypes ());
Echo ';
?>
Results seen on the browser

Call this method in WCF: Getsuggestlist
This method is inside the interface:
Public Getsuggestlistresponse getsuggestlist (getsuggestlistrequest request)
So the argument is an object
I use PHP to invoke the following:
$client = new SoapClient (' http://testu.sh.jinri.com/Flight.User.SOA/SuggestService.svc?wsdl ');
$param = Array (' UserId ' = ' ' 1920x1080 ', ' PageIndex ' = ' 1 ', ' PageSize ' = ' 5 ');
Print_r ($client->getsuggestlist ($param));
But throw such an error:
Fatal error:uncaught SoapFault exception: [A:internalservicefault] object reference not set to an instance of the object. In d:\apmserv5.2.6\www\htdocs\wsdltest\index.php:22 Stack trace: #0 [internal function]: Soapclient->__call (' Getsuggestlist ', array) #1 D:\APMServ5.2.6\www\htdocs\wsdltest\index.php: soapclient->getsuggestlist (Array) #2 {main} thrown ind:\apmserv5.2.6\www\htdocs\wsdltest\index.php on line 22

Ask the great God to help, the whole day, do not know what reason.

  • Related Article

    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.