2016-10-06 3 views
1

PHP에서 .NET 웹 서비스로 SOAP 호출에 문제가 있습니다. 잘하면 그것은 내가 누락 된 단순한 무언가이지만 누군가가 도울 수 있다면 그것은 위대 할 것입니다.PHP : SOAP - HTTP를 반환하지 않습니다.

// Start client: 
$client = new SoapClient('http://connect7.gardners.com/priceavail.asmx?wsdl', array 
(
    // Options: 
    'trace' => 1 
)); 

// Params: 
$params = array(...) 

// Call: 
$response = $client->__soapCall("PriceAvailabilityRequest", array($params)); 

그리고 그것은 다음과 같은 예외가 트리거 : 비누 호출은 다음과 같습니다 내가 클라이언트에서 __getFunctions()를 호출하면

Fatal error: SOAP Fault: (faultcode: HTTP, faultstring: Not Found) 

, 그것은 반환

array(4) { 
    [0]=> string(65) "Gardners_HelloResponse Gardners_Hello(Gardners_Hello $parameters)" 
    [1]=> string(95) "PriceAvailabilityRequestResponse PriceAvailabilityRequest(PriceAvailabilityRequest $parameters)" 
    [2]=> string(65) "Gardners_HelloResponse Gardners_Hello(Gardners_Hello $parameters)" 
    [3]=> string(95) "PriceAvailabilityRequestResponse PriceAvailabilityRequest(PriceAvailabilityRequest $parameters)" 
} 

여기 내입니다 클라이언트에서 __getLastRequest를 호출하면 생성 된 요청입니다.

<?xml version="1.0" encoding="UTF-8"?> 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.bic.org.uk/webservices" xmlns:ns2="http://connect7.gardners.com/"> 
    <SOAP-ENV:Body> 
     <ns2:PriceAvailabilityRequest> 
      <ns2:PA_Request> 
       <ns1:Header> 
        <ns1:ClientID>XXXXXX</ns1:ClientID> 
        <ns1:ClientPassword>XXXXXX</ns1:ClientPassword> 
        <ns1:AccountIdentifier> 
         <ns1:AccountIDType>02</ns1:AccountIDType> 
        </ns1:AccountIdentifier> 
        <ns1:SupplierIdentifier> 
         <ns1:SupplierIDType>02</ns1:SupplierIDType> 
        </ns1:SupplierIdentifier> 
        <ns1:SupplierRegionsCoded> 
         <ns1:SupplierRegionCodeType>01</ns1:SupplierRegionCodeType> 
        </ns1:SupplierRegionsCoded> 
        <ns1:CurrencyCode>GBP</ns1:CurrencyCode> 
       </ns1:Header> 
       <ns1:Product> 
        <ns1:EAN13>9780007185580</ns1:EAN13> 
        <ns1:ProductIdentifier> 
         <ns1:ProductIDType>15</ns1:ProductIDType> 
        </ns1:ProductIdentifier> 
       </ns1:Product> 
      <ns2:PA_Request> 
     </ns2:PriceAvailabilityRequest> 
    </SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:con="http://connect7.gardners.com/" xmlns:web="http://www.bic.org.uk/webservices"> 
    <soapenv:Header/> 
    <soapenv:Body> 
     <con:PriceAvailabilityRequest> 
      <con:PA_Request version="1.2"> 
       <web:Header> 
        <web:ClientID>XXXXXXX</web:ClientID> 
        <web:ClientPassword>XXXXXX</web:ClientPassword> 
        <web:AccountIdentifier> 
         <web:AccountIDType>02</web:AccountIDType> 
        </web:AccountIdentifier> 
        <web:SupplierIdentifier> 
         <web:SupplierIDType>02</web:SupplierIDType> 
        </web:SupplierIdentifier> 
        <web:SupplierRegionsCoded> 
         <web:SupplierRegionCodeType>01</web:SupplierRegionCodeType> 
        </web:SupplierRegionsCoded> 
        <web:CurrencyCode>GBP</web:CurrencyCode> 
       </web:Header> 
       <web:Product> 
        <web:EAN13>9780762444205</web:EAN13> 
        <web:ProductIdentifier> 
         <web:ProductIDType>15</web:ProductIDType> 
        </web:ProductIdentifier> 
       </web:Product> 
      </con:PA_Request> 
     </con:PriceAvailabilityRequest> 
    </soapenv:Body> 
</soapenv:Envelope> 

나는 오류 '를 찾을 수 없습니다'하지만 구체적인 아무것도 발견하지 않았습니다 원인이 무엇으로보고 시도했다 :

그리고 여기에는 웹 서비스 문서에 들어있는 예제 요청입니다. 내가 봤던 것에서 네임 스페이스의 차이가 문제가되어서는 안된다. 어떤 도움을 주시면 감사하겠습니다.

답변

1

오류 코드 "HTTP"및 오류 문자열 "Not Found"는 클라이언트가 서버 (엔드 포인트)에 도달 할 수 없음을 나타냅니다.

WSDL을 사용할 수 있지만 서비스 끝 점이 http://connect7.gardners.com/PriceAvail/priceavail.asmx 인 것 같습니다.

+0

프로젝트가 보류되었습니다. 따라서 수락을 지연합니다. 그러나 이것이 가장 가능성있는 이유입니다. 답장을 보내 주셔서 감사합니다. –

관련 문제