Php 我如何解决这个问题;响应类型不是text/xml:text/html;错误

Php 我如何解决这个问题;响应类型不是text/xml:text/html;错误,php,web-services,nusoap,Php,Web Services,Nusoap,我正在尝试与web服务通信,但不断收到以下错误消息: “不是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.asm

我正在尝试与web服务通信,但不断收到以下错误消息: “不是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>';
?>
请求 正如您所看到的,请求是以text/xml格式完成的,但是

POST/MobileCashPayout.asmx HTTP/1.0
主持人:www.atomtel.com
用户代理:NuSOAP/0.9.5(1.123)
内容类型:text/xml;字符集=ISO-8859-1
SOAPAction:“
内容长度:971
TestMercTestMerc2567500000052567539865322567500005100.002222BETNET
回应 ..响应以文本/html格式返回。这就是客户的问题所在。 欢迎提出任何建议

HTTP/1.1200正常
日期:2012年7月16日星期一23:40:19 GMT
服务器:IBM_HTTP_服务器
最后修改:2011年10月20日星期四格林威治标准时间17:26:13
内容长度:13726
缓存控制:公共
连接:关闭
内容类型:text/html
内容语言:英语
阿托姆特尔
atomtel预付费移动计划和hello tunes、atomtel后付费计划
函数MM_preload images(){//v3.0
var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();
变量i,j=d.MM\u p.length,a=MM\u.arguments;for(i=0;i
|     |     |    |   
抱歉!找不到您要查找的页面!

这可能是因为以下原因:
  • 输入错误的地址
  • 现场暂时不可用
  • 移除链接
请稍后再试或转到

您还可以继续浏览
网站的其余部分使用顶部导航

&副本;atomtel India 2010,版权所有。 | | | var gaJsHost=((“https:==document.location.protocol)?”https://ssl." : "http://www."); write(unescape(“%3Cscript src=”+gaJsHost+“google analytics.com/ga.js”type='text/javascript'%3E%3C/script%3E”); var pageTracker=_gat._getTracker(“UA-4570700-1”); 页面跟踪器。_initData(); 页面跟踪器。_trackPageview();
返回的响应甚至不是一条SOAP消息,而是一个404错误页面(奇怪的是,它附带了一个200响应)。您需要先解决您的请求中的问题。您具体建议我需要解决什么问题?我没有任何建议,因为我对您尝试使用的web服务一无所知。错误消息表明路径
/MobileCashPayout.asmx
不存在。请与网站管理员联系。@cdhowie thank你会检查出来,返回的响应甚至不是SOAP消息,而是404错误页面(奇怪的是,返回的响应是200)。您需要先解决您的请求中的问题。您具体建议我需要解决什么问题?我没有任何建议,因为我对您尝试使用的web服务一无所知。错误消息表明路径
/MobileCashPayout.asmx
不存在。请与网站管理员联系。@cdhowie t汉克,你去看看
Response not of type text/xml: text/html
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>
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>&nbsp;&nbsp;| &nbsp;&nbsp;<a href="http://atomtel.in/wps/wcm/connect/about+bharti+atomtel/Bharti+atomtel/Investor+Relations/?

WCM_Page.ResetAll=TRUE&amp;CACHE=NONE&amp;CONTENTCACHE=NONE&amp;CONNECTORCACHE=NONE&amp;SRV=Page" class="arial11lightgrey">Investor Relations</a>&nbsp;&nbsp;| &nbsp;&nbsp;<a href="http://www.atomtel.in/wps/wcm/connect/about+bharti+atomtel/Bharti+atomtel/Media+Centre/" class="arial11lightgrey">Media Centre</a>&nbsp;&nbsp;| &nbsp;<a href="http://www.atomtel.in/wps/wcm/connect/about+bharti+atomtel/Bharti+atomtel/Careers/" class="arial11lightgrey">Careers</a>&nbsp;&nbsp;| &nbsp;&nbsp;<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">&nbsp;</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 &amp; 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 &amp; 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">&nbsp;</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">&copy; atomtel India 2010, All Rights Reserved. &nbsp;&nbsp;&nbsp;</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> &nbsp;&nbsp;</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>