在用php5自带扩展SOAP调用C#.NET提供的webservice的时候接口中的方法要求传递的是一个对象,如果按array去传报错,又该怎么传呢???请教!!!php5 soap asp.net C#.NET webservice

解决方案 »

  1.   

    webservice soap协议 是可以传递数组类型的数据的啊
      

  2.   

    错误类型:( ! ) Fatal error: Uncaught SoapFault exception: [a:DeserializationFailed] The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'GenerateCard'. End element 'Body' from namespace 'http://schemas.xmlsoap.org/soap/envelope/' expected. Found element 'param1' from namespace ''. Line 2, position 153. in E:\php-sof\baole\index.php:32 Stack trace: #0 E:\php-sof\baole\index.php(32): SoapClient->__call('GenerateCard', Array) #1 E:\php-sof\baole\index.php(32): SoapClient->GenerateCard(Array, Array, Array) #2 {main} thrown in E:\php-sof\baole\index.php on line 32以下是php的代码:<?php
    $client=new SoapClient("http://222.66.142.19:9001/mc/?wsdl");$m502OperateInfo = array(
      'CardSource'=>"MOB",
      'operatorID'=>"YEK",
      'hotelCode' =>"000000",
      ''
      );
    $m501MemberCodeInfo = array(
     'card_no'=>'100000897121',
     'name'   =>'mmm',
     'card_sj'=>'15920118592',
     'zjno'   =>'310115198811138040',
     'sex'    =>true,
     'nation' =>'44',
     'zjkind' =>1,
     'password'=>'6253456',
     'yx'     =>true,
     'card_kind'=>10,
     'Card_Zk'=>0.95,
     'publishkind' => "1",
     'czy' => 1,
     'CanDebt' => false,
     'hotelcode' => "000000",
     'UploadDate'=>date('Y-m-d H:i:s',time()),
     'operate_ID' => "YEK"
     );
     $operType = array(
     'NewCardRegister'=>14
     );
    $result=$client->GenerateCard($m502OperateInfo,$m501MemberCodeInfo,$operType);
    print_r($result);
    exit;
    ?>
      

  3.   

    无效的枚举值的数组???你的参数写错了吧?
    从 wsdl 看,operType 是一个串,而你却是数组
      

  4.   

    "从 wsdl 看,operType 是一个串,而你却是数组","串"是什么概念,愿请教