Web サービスと通信しようとしていますが、次のエラー メッセージが表示され続けます: "Response not of type text/xml: text/html" この問題を解決するにはどうすればよいですか?
以下は、リクエストを生成するクライアント php コードです。
<?php
// Pull in the NuSOAP code
require_once('lib/nusoap.php');
// Create the client instance
$client = new nusoap_client('http://www.atomtel.com/MobileCashPayout.asmx');
// Check for an error $client = new nusoap_client('http://www.atomtel.com/MobileCashPayout.asmx');
$err = $client->getError();
if ($err) {
// Display the error
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
// At this point, you know the call that follows will fail
}
// Call the SOAP method
//$result = $client->call('hello', array('name' => 'Scott'));
//$client = new SoapClient("some.wsdl", array('soap_version' => SOAP_1_1));
$result = $client->call('Payout', array('testmerc', 'testmerc', '256750000005', '256753986532',
'256750000005','100.00','2222', '', 'BETNET'));
// Check for a fault
if ($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>';
}
}
?>
<?php
// Display the request and response
echo '<h2>Request</h2>';
echo '<pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2>';
echo '<pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
?>
次に、エラーメッセージが表示されます:
Error
Response not of type text/xml: text/html
リクエスト ご覧のとおり、リクエストは text/xml 形式で行われますが...
POST /MobileCashPayout.asmx HTTP/1.0
Host: www.atomtel.com
User-Agent: NuSOAP/0.9.5 (1.123)
Content-Type: text/xml; charset=ISO-8859-1
SOAPAction: ""
Content-Length: 971
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns6434:Payout xmlns:ns6434="http://tempuri.org"><__numeric_0 xsi:type="xsd:string">testmerc</__numeric_0><__numeric_1 xsi:type="xsd:string">testmerc</__numeric_1><__numeric_2 xsi:type="xsd:string">256750000005</__numeric_2><__numeric_3 xsi:type="xsd:string">256753986532</__numeric_3><__numeric_4 xsi:type="xsd:string">256750000005</__numeric_4><__numeric_5 xsi:type="xsd:string">100.00</__numeric_5><__numeric_6 xsi:type="xsd:string">2222</__numeric_6><__numeric_7 xsi:type="xsd:string"></__numeric_7><__numeric_8 xsi:type="xsd:string">BETNET</__numeric_8></ns6434:Payout></SOAP-ENV:Body></SOAP-ENV:Envelope>
応答 ....応答は text/html 形式で返されます。これは、クライアントが問題を抱えているものです。どんな提案でも大歓迎です。
HTTP/1.1 200 OK
Date: Mon, 16 Jul 2012 23:40:19 GMT
Server: IBM_HTTP_Server
Last-Modified: Thu, 20 Oct 2011 17:26:13 GMT
Content-Length: 13726
Cache-Control: public
Connection: close
Content-Type: text/html
Content-Language: en
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>atomtel</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<TITLE>atomtel Prepaid mobile plans and hello tunes, atomtel postpaid plans </TITLE>
<META NAME="Description" CONTENT="atomtel offers mobile plans that fits customers necessity, atomtel prepaid and postpaid plans with hello tunes services "/>
<META NAME="Keywords" CONTENT="atomtel prepaid, atomtel postpaid, atomtel mobile plans, atomtel postpaid plans, atomtel postpaid plan, atomtel prepaid plans, atomtel prepaid plan, atomtel hello tunes, hello tunes, atomtel prepaid mobile plans, atomtel prepaid mobile plan, atomtel hello tune, hello tune services"/>
<META NAME="robots" CONTENT="index, follow">
<META name="distribution" content="global">
<meta name="language" content="EN-US">
<meta name="doc-type" content="Public">
<link href="/wps/wcm/404_page/404_page/css/style.css" rel="stylesheet" type="text/css" />
<link href="/wps/wcm/404_page/404_page/css/for_you.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function pre_s()
{
document.getElementById('pre_a').style.display='block';
document.getElementById('pre').style.display='none';
document.getElementById('post').style.display='block';
document.getElementById('post_a').style.display='none';
document.getElementById('content_one').style.display='block';
document.getElementById('content_two').style.display='none';
}
function post_s()
{
document.getElementById('pre_a').style.display='none';
document.getElementById('pre').style.display='block';
document.getElementById('post').style.display='none';
document.getElementById('post_a').style.display='block';
document.getElementById('content_one').style.display='none';
document.getElementById('content_two').style.display='block';
}
</script>
<script type="text/javascript" src="/wps/wcm/404_page/404_page/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" SRC="/wps/wcm/404_page/404_page/js/new_menu.js"></script>
<script type="text/javascript" src="/wps/wcm/404_page/404_page/js/jquery.cycle.all.min.js"></script>
<script type="text/javascript" src="/wps/wcm/404_page/404_page/js/main.js"></script>
<script type="text/javascript" src="/wps/wcm/404_page/404_page/js/common.js"></script>
<link href="/wps/wcm/404_page/404_page/css/menu.css" rel="stylesheet" type="text/css" />
<link href="/wps/wcm/404_page/404_page/css/smenu.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#FFFFFF" class="main_container"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="160" align="left" valign="middle" id="header_logo"><a href="http://www.atomtel.in/"><img src="/wps/wcm/404_page/404_page/images/atomtel_Logo.PNG" alt="" border="0" /></a></td>
<td align="right" valign="middle" class="arial11lightgrey" id="topnav"><a href="http://atomtel.in/wps/wcm/connect/about+bharti+atomtel/Bharti+atomtel/About+bharti+atomtel/?WCM_Page.ResetAll=TRUE&CACHE=NONE&CONTENTCACHE=NONE&CONNECTORCACHE=NONE&SRV=Page" class="arial11lightgrey">About bharti atomtel</a> | <a href="http://atomtel.in/wps/wcm/connect/about+bharti+atomtel/Bharti+atomtel/Investor+Relations/?
WCM_Page.ResetAll=TRUE&CACHE=NONE&CONTENTCACHE=NONE&CONNECTORCACHE=NONE&SRV=Page" class="arial11lightgrey">Investor Relations</a> | <a href="http://www.atomtel.in/wps/wcm/connect/about+bharti+atomtel/Bharti+atomtel/Media+Centre/" class="arial11lightgrey">Media Centre</a> | <a href="http://www.atomtel.in/wps/wcm/connect/about+bharti+atomtel/Bharti+atomtel/Careers/" class="arial11lightgrey">Careers</a> | <a href="http://www.atomtel.in/wps/wcm/connect/about+bharti+atomtel/Bharti+atomtel/Contact+Us/" class="arial11lightgrey">Contact Us</a></td>
<td valign="middle" class="topsearch"><input name="textfield2" type="text" class="search_txtbox" id="textfield2" value="search" onfocus="if (this.value == 'search') { this.value=''; }" onblur="if (this.value == '') { this.value='search'; }" />
<a href="#"><img src="/wps/wcm/404_page/404_page/images/search_button.gif" alt="" width="24" height="20" border="0" align="top" class="search_btn" /></a></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="66" valign="top"><a href="http://www.atomtel.in/wps/wcm/connect/atomtel.in/atomtel.in/home/"><img src="/wps/wcm/404_page/404_page/images/for_me.gif" alt="For Me" width="66" height="21" border="0" /></a></td>
<td width="1" valign="top"><img src="/wps/wcm/404_page/404_page/images/top_separator.gif" width="1" height="21" /></td>
<td width="140" valign="top"><a href="http://www.atomtel.in/wps/wcm/connect/atomtelinAES/AES/Home/"><img src="/wps/wcm/404_page/404_page/images/for_enterprise.gif" alt="For Enterprise Business" width="140" height="21" /></a></td>
<td valign="top"> </td>
<td width="54" valign="top" style="padding-bottom: 5px;"><a href="http://atomtel.in/social/"><img src="/wps/wcm/404_page/404_page/images/social-icon.jpg" width="118" height="27" /></a></td>
<td width="70" valign="top" style="padding-top:5px;"><a href="https://ebpp.atomtelworld.com/cares/wps/myportal"><img src="/wps/wcm/404_page/404_page/images/my_atomtel.gif" alt="My atomtel" width="70" height="21" /></a></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="6" valign="top"><img src="/wps/wcm/404_page/404_page/images/nav_left_corner.gif" width="6" height="36" /></td>
<td align="left" valign="bottom" class="mainmenu" id="sitenav"><ul class="nav-container">
<li id="nav1" class="nav"><a href="http://atomtel.in/wps/wcm/connect/atomtel.in/atomtel.in/home/foryou/mobile/" id="nav_mobile" >Mobile</a>
<div class="nav_menu">
<div class="nav_menu_outer">
<div class="colimg"><img src="/wps/wcm/404_page/404_page/images/mega_mobile.gif" width="28" height="45" alt="Mobile" /></div>
<div class="nav_menu_inner">
<div class="nav_menu_links">
<ul>
<li><a href="http://atomtel.in/wps/wcm/connect/atomtel.in/atomtel.in/home/forme_newuser/mobile/prepaid+services/">Prepaid Plans</a></li>
<li><a href="http://atomtel.in/wps/wcm/connect/atomtel.in/atomtel.in/home/forme_newuser/mobile/postpaid+services/">Postpaid Plans</a></li>
<li class="last"><a href="http://atomtel.in/wps/wcm/connect/atomtel.in/atomtel_Live/Home/">Hello Tunes</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</li>
<li><img src="/wps/wcm/404_page/404_page/images/nav_separator.gif" width="4" height="36" /></li>
<li id="nav2" class="nav"><a href="http://atomtel.in/wps/wcm/connect/atomtel.in/atomtel.in/home/forme_newuser/broadband+and+fixed+line/" id="nav_broadband">Broadband & Fixed Line</a>
<div class="nav_menu">
<div class="nav_menu_outer">
<div class="colimg"><img src="/wps/wcm/404_page/404_page/images/mega_broadband.gif"/></div>
<div class="nav_menu_inner">
<div class="nav_menu_links">
<ul>
<li><a href="http://atomtel.in/wps/wcm/connect/atomtel.in/atomtel.in/home/foryou/broadband+and+fixed+line/broadband/">Broadband Plans</a></li>
<li><a href="http://atomtel.in/wps/wcm/connect/atomtel.in/atomtel.in/home/foryou/broadband+and+fixed+line/fixed+line/tariffs/">Fixed Fine Tariffs</a></li>
<li class="last"><a href="http://atomtel.in/wps/wcm/connect/atomtel.in/atomtel.in/home/forme_newuser/broadband+and+fixed+Line/broadband/coverage/">Coverage</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</li>
<li><img src="/wps/wcm/404_page/404_page/images/nav_separator.gif" width="4" height="36" /></li>
<li id="nav3" class="nav"><a href="http://atomtel.in/wps/wcm/connect/atomtel.in/atomtel.in/home/forme_newuser/dth+services/" id="nav_dth">Broadband & Fixed Line</a>
<div class="nav_menu">
<div class="nav_menu_outer">
<div class="colimg"><img src="/wps/wcm/404_page/404_page/images/mega_digital.gif" /></div>
<div class="nav_menu_inner">
<div class="nav_menu_links">
<ul>
<li><a href="http://atomtel.in/wps/wcm/connect/DTH/Bharti%20DTH/Home">Digital Tv</a></li>
<li class="last"><a href="http://216.205.49.67/iptv/">IPTV</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</li>
<li><img src="/wps/wcm/404_page/404_page/images/nav_separator.gif" width="4" height="36" /></li>
<li id="nav4" class="nav"><a href="http://www.atomtel.in/atomtel3G/" id="nav_3g">3G services</a></li>
</ul></td>
<td width="6" valign="top"><img src="/wps/wcm/404_page/404_page/images/nav_right_corner.gif" width="6" height="36" /></td>
</tr>
</table></td>
</tr>
<tr>
<td height="6" valign="top"></td>
</tr>
<tr>
<td valign="top"><table width="752" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="752" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="407" valign="top" class="page_content_not" style="background:#ed1d24 url(/wps/wcm/404_page/404_page/images/bg_atomtel.jpg) no-repeat right top;"><div class="content">
<img src="/wps/wcm/404_page/404_page/images/404_img.jpg" width="166" height="71" style="padding:0 0 28px 40px;" />
<p><strong style="font-size:13px;">Sorry! The page you are looking for could not be found!</strong></p>
This could be because of the following reasons:
<ul>
<li> A mistyped address</li>
<li> Temporary unavailability of the site</li>
<li> Removal of the link </li>
</ul>
<p>Please try later or go to the <a href="http://www.atomtel.in/">home page.</a></p>
<p>You can also keep browsing through the <br />
rest of the website using the top navigation. </p>
</div></td>
<td align="right" valign="top" style="background:url(/wps/wcm/404_page/404_page/images/img_maginifier.jpg) no-repeat right top"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<table width="770" border="0" align="center" class="footer" cellpadding="0" cellspacing="0">
<tr>
<td height="28" align="left" valign="middle">© atomtel India 2010, All Rights Reserved. </td>
<td align="right" valign="middle"><a href="http://www.atomtel.in/fraudAlert/fraudalert.html" target="_blank">Important Alerts</a> | <a href="http://atomtel.in/wps/wcm/connect/atomtel.in/atomtel.in/home/privacy+statement/" target="_blank">Privacy Statement</a> | <a href="http://atomtel.in/wps/wcm/connect/atomtel.in/atomtel.in/home/do+not+disturb+registry/">Do Not Disturb Registry</a> | <a href="http://atomtel.in/wps/wcm/connect/atomtel.in/atomtel.in/home/telemarketer+registration/" target="_blank">Telemarketer Registration</a> </td>
</tr>
</table>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4570700-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>