Php calls c # soap --- nooperationsdefinedintheWSDLdocument! PHP soap
Service definition of function ns__SendMessage
Service definition of function ns__QuerySendHist
Service definition of function ns__RecvMessage
Service definition of function ns__SendMessageExt
gSOAP 2.7.8c generated service definition
Include_once ('soap/nusoap. php '); $ client = new nusoap_client ('http: // 127.0.0.1: 10000', 'wsdl '); $ client-> soap_defencoding = 'utf-8 '; $ client-> decode_utf8 = false; $ client-> xml_encoding = 'utf-8'; $ sContent = SetToHexString ('test sends data '); // convert the string to hexadecimal format $ param = array ("sUserName" => 'XX', "sSender" => '123 ', 'srecvs '=> '20140901', 'nrecvcount' => 1, 'scontent' => $ sContent, 'nfeetype' => 0 )); $ result = $ client-> call ('NS _ sendmessage', $ param); print_r ($ client-> getError ())."
"; Print_r ($ result );
The score is missing. Forgive me
Appears after running
No operations defined in the WSDL document!
Reply to discussion (solution)
Up by yourself
Your WSDL only provides these methods
[0] => string SendMessage (string $ sUserName, string $ sSender, string $ sRecvs, int $ nRecvCount, string $ sContent, int $ nFeeType)
[1] => string QuerySendHist (string $ sUserName, int $ nInMsgId)
[2] => string RecvMessage (string $ sUserName, string $ sRecv)
[3] => string SendMessageExt (string $ sUserName, string $ sSender, string $ sRecvs, int $ nRecvCount, string $ sContent, int $ nFeeType)
Even if you need to write
$ Result = $ client-> call ('NS _ sendmessage', $ param );
Then $ param should be a one-dimensional array.
Because the SendMessage parameter is not a structure
Use Nusoap