dpsfay2510 2018-11-28 08:07
浏览 57

来自Laravel的SOAP客户端,使用JAVA消费Web服务

I want to use SOAP client from Laravel with Java consuming web service. but I cannot get the response from my web service even I testing that web service via SOAP UI is ok. Please help me to solve this problem I almost stuck here for a week. Any mistake from my writing or not clear information can ask me. Please, everyone, I need your help.

My XML request from SOAP UI and can get the result

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cds="http://cdss.ofss.com/service/cdsSCustomerService">
   <soapenv:Header/>
   <soapenv:Body>
      <cds:QUERYCUSTOMER_IOFS_REQ>
         <cds:cdsS_HEADER>
            <cds:SOURCE>JSFT</cds:SOURCE>
            <cds:UBSCOMP>cdsS</cds:UBSCOMP>
            <cds:USERID>JSFT</cds:USERID>
            <cds:BRANCH>002</cds:BRANCH>
            <cds:SERVICE>cdsSCustomerService</cds:SERVICE>
            <cds:OPERATION>QueryCustomer</cds:OPERATION>
         </cds:cdsS_HEADER>
         <cds:cdsS_BODY>
            <cds:Customer-IO>
               <cds:CUSTID>00001882</cds:CUSTNO>
            </cds:Customer-IO>
         </cds:cdsS_BODY>
      </cds:QUERYCUSTOMER_IOFS_REQ>
   </soapenv:Body>
</soapenv:Envelope>

My Scrip in Controller

$this->soapWrapper->add('cds', function ($service) {
      $service
        ->wsdl('http://192.168.100.40/findustomerService/findustomerService?wsdl');
    });

    $source='JSFT';
    $ubscomp='cdsS';
    $userid='JSFT';
    $branch='002';
    $service='cdsSCustomerService';
    $operation='QueryCustomer';
    $custno='00001882';
    $param=array(
               'SOURCE'=>$source,
               'UBSCOMP'=>$ubscomp,
               'USERID'=>$userid,
               'BRANCH'=>$branch,
               'SERVICE'=>$service,
               'OPERATION'=>$operation,
               'CUSTID'=>$custno);
    $response = $this->soapWrapper->call('cds.QueryCustomerIO',array($param));
    dd($response);

I got an error

SOAP-ERROR: Encoding: object has no 'cdsS_HEADER' property
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 基于卷积神经网络的声纹识别
    • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
    • ¥100 为什么这个恒流源电路不能恒流?
    • ¥15 有偿求跨组件数据流路径图
    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
    • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
    • ¥15 CSAPPattacklab
    • ¥15 一直显示正在等待HID—ISP
    • ¥15 Python turtle 画图
    • ¥15 stm32开发clion时遇到的编译问题