PHP Call C#SOAP---No operations defined in the WSDL document!

Source: Internet
Author: User
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 send data ');//String to 16 binary $param=array ("susername" = ' xx ', "ssender" = ' 051000000000 ', ' srecvs ' = ') 13851400500 ', ' Nrecvcount ' =>1, ' scontent ' = = $sContent, ' Nfeetype ' =>0); $result = $client->call (' ns__ SendMessage ', $param);p Rint_r ($client->geterror ()). "
";p Rint_r ($result);


The score is not much. Please forgive me.
Appears after running
No operations defined in the WSDL document!


Reply to discussion (solution)

Up a bit yourself

Your WSDL only provides these methods.
[0] = = String SendMessage (string $sUserName, String $sSender, string $sRecvs, int $nRecvCount, string $sContent, int $n Feetype)
[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 it is necessary to write
$result = $client->call (' Ns__sendmessage ', $param);
Then $param should also be a one-dimensional array
Because the parameters of SendMessage are not structures

can be solved with 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.