在本地测试web服务


testing a webservice locally

我正在尝试从本地机器连接到web服务…我使用wamp作为本地服务器和web服务所有者提供的WSDL连接器加上一个php文件来获取数据和一个XML testclient .exe文件我试图在CMD中运行。exe文件,但出现此错误

Testclient started ...
upload URL: http://localhost/upload/php_server_2015-10-08/server.php
filename:   4485ae5f-4f9e-4ad6-bab3-44cdc57c09d5.xml
An error occured: The content type text/html of the response message does not 
match the content type of the binding (text/xml; charset=utf-8). If using a 
custom encoder, be sure that the IsContentTypeSupported method is implemented 
properly. The first 1005 bytes of the response were: '<br />
<font size='1'><table class='xdebug-error xe-fatal-error' dir='ltr' border='1' 
cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-
color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Fatal error: 
Class 'SoapServer' not found in C:'wamp'www'upload'php_server_2015-10-
08'server.php on line <i>3</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left'    
bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th 
align='left' bgcolor='#eeeeec'>Function</th><th align='left' 
bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' 
align='center'>0.0010</td><td bgcolor='#eeeeec' align='right'>874344</td><td 
bgcolor='#eeeeec'>{main}(  )</td><td 
title='C:'wamp'www'upload'php_server_2015-10-08'server.php' 
bgcolor='#eeeeec'>..'server.php<b>:</b>0</td></tr>
</table></font>
'.
Testclient done ... press key

有人能帮我吗

您得到的响应告诉您Class 'SoapServer' not found,这表明Soap扩展未启用。

检查php.ini中的extension=php_soap.dll行,并确保它没有被禁用(以;为前缀)。如果是,请删除行前的;并重新启动Apache。

要找到php.ini,您应该查看C:'wamp'bin'apache'Apache2.x.x'bin(相应替换x;)或编写包含

的脚本。
<?php phpinfo();

在浏览器中打开(http://localhost/.../yourscript.php)并查找"已加载的配置文件"