2017-01-31 1 views
1

매개 변수하지만 난 WSDL 파일 느릅 나무 매개 변수가 필요하고에 읽기 알아낼 수 없습니다 구조화하는 방법 : 나는했습니다WSDL 내가이 작업 getCountries을 invoque하기 위해 노력하고있어

http://webservice.nizacars.es/Rentway_WS/getCountries.asmx?WSDL

이미와 시도 :.

$this->soap_client->getCountries(
    array(
    'countriesRequest' => array(
     'companyCode' => $this->login, 
     'allCountries' => true 
    ) 
) 
) 

$this->soap_client->getCountries(
    array(
     'companyCode' => $this->login, 
     'allCountries' => true 
) 
) 


$this->soap_client->getCountries(
     'companyCode' => $this->login, 
     'allCountries' => true 
)  

하지만 나는이 "이 [서버가 요청을 처리 할 수 ​​없습니다지고있어 이후는, 사양과 일치하지있어 보인다 ---> 개체 참조의 인스턴스로 설정되지 않았습니다 개체] "

SoapClient와 마지막 요청 :: __ getLastRequest은 다음과 같습니다

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.jimpisoft.pt/Rentway_Reservations_WS/getCountries"> 
<SOAP-ENV:Body> 
<ns1:getCountries/> 
</SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 

편집 솔루션 :

$data = array(
       'getCountries' => array(
        'objRequest' => array(
         'companyCode' => $this->login, 
         'allCountries' => true 
        ) 
       ) 
      ); 
$result = @$this->_client->__call('getCountries',$data); 

답변

2

느릅 나무 매개 변수가 필요하며, 이는 구조화 방법 :

유효한 비누 요청 및 응답을 생성하기 위해 soapUI 도구를 사용할 수 있습니다.

I가 soapUI에 의해 생성 된 하나 (그것 로그인 한) 사용자의 비누 요청을 비교 제시는

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:get="http://www.jimpisoft.pt/Rentway_Reservations_WS/getCountries"> 
    <soap:Header/> 
    <soap:Body> 
     <get:getCountries> 
     <!--Optional:--> 
     <get:objRequest> 
      <!--Optional:--> 
      <get:companyCode>?</get:companyCode> 
      <get:allCountries>?</get:allCountries> 
     </get:objRequest> 
     </get:getCountries> 
    </soap:Body> 
</soap:Envelope> 
+0

이 SoapClient :: __ getLastRequest 방법의 출력 SOAP -ENV = "http://schemas.xmlsoap.org/soap/envelope/"xmlns : ns1 = "http://www.jimpisoft.pt/Rentway_Reservations_WS/getCountries"> vivoconunxino

+0

출력을 주석 섹션에서 읽을 수 없으므로 원본 질문/OP에 코드 서식 태그를 붙여 붙여보십시오. –

+0

https://www.jimpisoft.pt/Rentway_Reservations_WS/getCountries.asmx?op=getCountries에있는 예제에 따르면 요청에 allCountries 요소가 있어야합니다 (요청한 내용은 wsdl에 따라 유효하지만). –

관련 문제