fix:SOAP 네임스페이스 및 SOAPAction URL 수정
- SOAPAction: http://ws.baroservice.com/ 사용 - XML 네임스페이스: http://ws.baroservice.com/ 사용
This commit is contained in:
@@ -595,7 +595,7 @@ private function callSoap(string $method, array $params = []): array
|
||||
])
|
||||
->withHeaders([
|
||||
'Content-Type' => 'text/xml; charset=utf-8',
|
||||
'SOAPAction' => 'https://www.baroservice.com/' . $method,
|
||||
'SOAPAction' => 'http://ws.baroservice.com/' . $method,
|
||||
])
|
||||
->withBody($soapXml, 'text/xml')
|
||||
->timeout(30)
|
||||
@@ -634,7 +634,7 @@ private function buildSoapRequest(string $method, array $params): string
|
||||
}
|
||||
|
||||
return '<?xml version="1.0" encoding="utf-8"?>
|
||||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bar="https://www.baroservice.com/">
|
||||
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bar="http://ws.baroservice.com/">
|
||||
<soap:Body>
|
||||
<bar:' . $method . '>
|
||||
' . $paramsXml . '
|
||||
@@ -660,7 +660,7 @@ private function parseSoapResponse(string $xmlResponse, string $method): array
|
||||
|
||||
// 네임스페이스 등록
|
||||
$xml->registerXPathNamespace('soap', 'http://schemas.xmlsoap.org/soap/envelope/');
|
||||
$xml->registerXPathNamespace('bar', 'https://www.baroservice.com/');
|
||||
$xml->registerXPathNamespace('bar', 'http://ws.baroservice.com/');
|
||||
|
||||
// 결과 노드 찾기
|
||||
$resultNodes = $xml->xpath("//bar:{$method}Response/bar:{$method}Result");
|
||||
|
||||
Reference in New Issue
Block a user