혹시 xml soap 해보신분 계신가요

2017-06-02 (금) 11:32:03 4,641

안녕하세요 

혹시 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주째 헤메고 있습니다 도와주세요.

Copy
require_once('../lib/nusoap-0.9.5/lib/nusoap.php'); $xml_code="<?xml version='1.0' encoding='utf-8'?> <soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>"; $xml_code.="<soap:Body> ";$xml_code.="  <SendRequest xmlns='http://tempuri.org/'>";$xml_code.="    <request xsi:type='RegisterCheckRequest' Id='7a646d45-ee2f-4b1c-8de8-780c416fbbd0' Service='42' xmlns='http://paygo24.com/v2/protocol'> <PaymentParameters xmlns=''>";$xml_code.="      <Parameter Name='account' Value='08374829' /> </PaymentParameters>";$xml_code.="    </request> ";$xml_code.="    <pointId>46</pointId>"; $xml_code.="    <password>password>"; $xml_code.="  </SendRequest> ";$xml_code.="</soap:Body>";$xml_code.="</soap:Envelope>"; //require('nusoap.php'); // Setting the Socket Communications Information$method = 'POST';$uri = '/paygoservice.asmx';$protocol = 'HTTP/1.1';$length = strlen($xml_code);$action = '"http://tempuri.org/SendRequest"';$client = new nusoap_client("https://api2.paygo24.com/paygoservice.asmx?WSDL",true);$err = $client->getError();if ($err) { echo '<h2>Constructor error</h2><pre>' . $err . '</pre>'; exit();}$client->setHeaders('<soap:Header><AuthenticationSoapHeader xmlns="http://schemas.xmlsoap.org/soap/envelope"></soap:Header>'); $client->soap_defencoding = 'utf-8';$client->useHTTPPersistentConnection();$bsoapaction = "http://tempuri.org/SendRequest";$msg = $client->serializeEnvelope("$xml_code"); $result=$client->send($msg, $bsoapaction);// Check for a faultif ($client->fault) { echo '<h2>Fault</h2><pre>'; print_r($result); echo '</pre>';} else { // Check for errors $err = $client->getError(); if ($err) {  // Display the error  echo '<h2>Error</h2><pre>' . $err . '</pre>'; } else {  // Display the result  echo '<h2>Result</h2><pre>';  print_r($result);  echo '</pre>'; }}echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';echo '<h2>Client Debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';echo '<h2>Proxy Debug</h2><pre>' . htmlspecialchars($proxy->debug_str, ENT_QUOTES) . '</pre>';?>
|

답변 1개

Request 부분 잘못된 정보나 코드가 없는지 확인해보세요

답변을 작성하려면 로그인이 필요합니다.