혹시 xml soap 해보신분 계신가요
아미11
8년 전
조회 4,473
안녕하세요
혹시 xml soap 해보신분 계신가요 접속까지는 성공 했는데 도대체 데이터가 넘어 가질 않네요 ㅠㅠ
Error
HTTP Error: Unsupported HTTP response status 400 Bad Request (soapclient->response has contents of the response)
Response
HTTP/1.1 400 Bad Request
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Tue, 30 May 2017 03:12:59 GMT
Content-Length: 0
Client Debug
원인을 못 찾겠습니다.
2주째 헤메고 있습니다 도와주세요.
</p><p>require_once('../lib/nusoap-0.9.5/lib/nusoap.php');</p><p> </p><p>$xml_code="<?xml version='1.0' encoding='utf-8'?> <soap:Envelope xmlns:soap='<a href="http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>" target="_blank" rel="noopener noreferrer">http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'></a>"; </p><p>$xml_code.="<soap:Body> ";</p><p>$xml_code.=" <SendRequest xmlns='<a href="http://tempuri.org/'>" target="_blank" rel="noopener noreferrer">http://tempuri.org/'></a>";</p><p>$xml_code.=" <request xsi:type='RegisterCheckRequest' Id='7a646d45-ee2f-4b1c-8de8-780c416fbbd0' Service='42' xmlns='<a href="http://paygo24.com/v2/protocol'> <PaymentParameters xmlns=''>" target="_blank" rel="noopener noreferrer">http://paygo24.com/v2/protocol'> <PaymentParameters xmlns=''></a>";</p><p>$xml_code.=" <Parameter Name='account' Value='08374829' /> </PaymentParameters>";</p><p>$xml_code.=" </request> ";</p><p>$xml_code.=" <pointId>46</pointId>"; </p><p>$xml_code.=" <password>password>"; </p><p>$xml_code.=" </SendRequest> ";</p><p>$xml_code.="</soap:Body>";</p><p>$xml_code.="</soap:Envelope>";</p><p> </p><p>//require('nusoap.php');</p><p> </p><p>// Setting the Socket Communications Information</p><p>$method = 'POST';</p><p>$uri = '/paygoservice.asmx';</p><p>$protocol = 'HTTP/1.1';</p><p>$length = strlen($xml_code);</p><p>$action = '"<a href="http://tempuri.org/SendRequest" target="_blank" rel="noopener noreferrer">http://tempuri.org/SendRequest</a>"';</p><p>$client = new nusoap_client("<a href="https://api2.paygo24.com/paygoservice.asmx?WSDL" target="_blank" rel="noopener noreferrer">https://api2.paygo24.com/paygoservice.asmx?WSDL</a>",true);</p><p>$err = $client->getError();</p><p>if ($err) {</p><p> echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';</p><p> exit();</p><p>}</p><p>$client->setHeaders('<soap:Header><AuthenticationSoapHeader xmlns="<a href="http://schemas.xmlsoap.org/soap/envelope" target="_blank" rel="noopener noreferrer">http://schemas.xmlsoap.org/soap/envelope</a>"></soap:Header>');</p><p> </p><p>$client->soap_defencoding = 'utf-8';</p><p>$client->useHTTPPersistentConnection();</p><p>$bsoapaction = "<a href="http://tempuri.org/SendRequest" target="_blank" rel="noopener noreferrer">http://tempuri.org/SendRequest</a>";</p><p>$msg = $client->serializeEnvelope("$xml_code");</p><p> </p><p>$result=$client->send($msg, $bsoapaction);</p><p>// Check for a fault</p><p>if ($client->fault) {</p><p> echo '<h2>Fault</h2><pre>';</p><p> print_r($result);</p><p> echo '</pre>';</p><p>} else {</p><p> // Check for errors</p><p> $err = $client->getError();</p><p> if ($err) {</p><p> // Display the error</p><p> echo '<h2>Error</h2><pre>' . $err . '</pre>';</p><p> } else {</p><p> // Display the result</p><p> echo '<h2>Result</h2><pre>';</p><p> print_r($result);</p><p> echo '</pre>';</p><p> }</p><p>}</p><p>echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';</p><p>echo '<h2>Client Debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';</p><p>echo '<h2>Proxy Debug</h2><pre>' . htmlspecialchars($proxy->debug_str, ENT_QUOTES) . '</pre>';</p><p>?></p><p> </p><p>
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인