Php calls c # soap --- nooperationsdefinedintheWSDLdocument!

Source: Internet
Author: User
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

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.