肥皂服务器:找到了元素arg0,但找不到匹配的RPC /文字部分

时间:2018-07-30 06:02:57

标签: php soap joomla wsdl idempiere

JOOMLA与SOAP Web服务(IDEMPIERE ERP)集成

WSDL:

 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:_0="http://idempiere.org/ADInterface/1_0">
 <soapenv:Header/>
 <soapenv:Body>
  <_0:readData>
     <_0:ModelCRUDRequest>
        <_0:ModelCRUD>
           <_0:serviceType>queryBPartner</_0:serviceType>
           <_0:TableName>C_BPartner</_0:TableName>
           <_0:RecordID>120</_0:RecordID>
           <!--Optional:-->
           <_0:recordIDVariable>120</_0:recordIDVariable>
           <!--Optional:-->
           <_0:Filter/>
           <_0:Action>Read</_0:Action>
           <!--Optional:-->
           <_0:Offset>3</_0:Offset>
           <!--Optional:-->
           <_0:Limit>1</_0:Limit>
           <!--Optional:-->
           <_0:DataRow>
              <!--Zero or more repetitions:-->
              <_0:field type="?" column="C_BPartner_ID" lval="?" disp="?" edit="?" error="?" errorVal="?">
                 <_0:val>120</_0:val>
                 <!--Optional:-->
                 <_0:lookup>
                    <!--Zero or more repetitions:-->
                    <_0:lv val="" key=""/>
                 </_0:lookup>
              </_0:field>
           </_0:DataRow>
        </_0:ModelCRUD>
        <_0:ADLoginRequest>
           <_0:user>SuperUser</_0:user>
           <_0:pass>System</_0:pass>
           <_0:lang>en_US</_0:lang>
           <_0:ClientID>11</_0:ClientID>
           <_0:RoleID>102</_0:RoleID>
           <_0:OrgID>11</_0:OrgID>
           <_0:WarehouseID>0</_0:WarehouseID>
           <_0:stage>0</_0:stage>
        </_0:ADLoginRequest>
     </_0:ModelCRUDRequest>
  </_0:readData>

PHP代码:

$client = new SoapClient($url,array(
    "uri" => "http://3e.pl/ADInterface",
    'use'      => SOAP_LITERAL,
    "encoding"=> "UTF-8",
  //  "Content-Type"=> 'text/xml',
    "trace"      => 1,      // enable trace to view what is happening
    "exceptions" => 0,      // disable exceptions
    "cache_wsdl" => 0) );

$dataxml='';
$dataxml.="<ns1:field column='C_BPartner_ID'>";
$dataxml.="<ns1:val>";
$dataxml.=120;
$dataxml.="</ns1:val>";
$dataxml.="</ns1:field>";

$dataRow=new DataRow;
$dataRow->field=new SoapVar($dataxml,XSD_ANYXML, NULL, NULL,NULL,$nsHeader);

$responsexml = $client->readData(new SoapVar($modelCrudReq,SOAP_ENC_OBJECT,NULL,$nsHeader1,NULL,$nsHeader1));

Web服务可以成功地从SOAPUI工具读取。与Joomla集成时,出现以下错误

Response:SoapFault异常:[soap:Server]找到了元素{http://3e.pl/ADInterface} arg0,但在C:\ xampp \ htdocs \ joomla \ administrator \ components \ com_users \ controller中找不到匹配的RPC /文字部分。 php:252

堆栈跟踪:#0    C:\ xampp \ htdocs \ joomla \ administrator \ components \ com_users \ controller.php(252):SoapClient-> __ call('readData',Array)

我已通过编码'utf-8',但仍然出现错误。 请任何人帮助我解决此问题。

0 个答案:

没有答案