English 中文(简体)
如何读。 PHP网上服务网
原标题:How to read .Net web service in PHP?

I have successfully read WSDL form SoapClient. I tried following to pass value to web method and read results:

 $client = new SoapClient("restaurant.asmx?wsdl");
 $param = array( search_keywords =>$search_text); 
 $result =  $client->__soapCall( getRestaurantsASP ,$param);
 print_r($result);

我得出这一错误:

Fatal error: Uncaught SoapFault exception: [soap:Server]
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> 
System.Data.SqlClient.SqlException: Invalid object name  basic_info_table . at 
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean   
breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException 
exception, Boolean breakConnection) at 
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at 
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, 
SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject 
stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at 
System.Data.SqlClient.SqlDataReader.get_MetaData() at 
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior 
runBehavior, String resetOptionsString) at 
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, 
RunBehavior runBehavior in E:webareasgs937aspservice.php on line 73

我如何将参数发送到网络方法和检索价值?

最佳回答

我必须补充:

<webServices>
<protocols>
  <add name="HttpGet"/>
  <add name="HttpPost"/>
  <add name="HttpSoap"/>
</protocols>
</webServices>

查阅网页:

问题回答

正如DaveRandom所建议的那样,在服务中,问题本身似乎是一个问题,而是在供职时使用的Q.中。

使用SapUI(可下载)并使用该软件。

Soap 制图协会是测试网络服务的中立客户。

希望会提供帮助。





相关问题
Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How do I compare two decimals to 10 decimal places?

I m using decimal type (.net), and I want to see if two numbers are equal. But I only want to be accurate to 10 decimal places. For example take these three numbers. I want them all to be equal. 0....

Exception practices when creating a SynchronizationContext?

I m creating an STA version of the SynchronizationContext for use in Windows Workflow 4.0. I m wondering what to do about exceptions when Post-ing callbacks. The SynchronizationContext can be used ...

Show running instance in single instance application

I am building an application with C#. I managed to turn this into a single instance application by checking if the same process is already running. Process[] pname = Process.GetProcessesByName("...

How to combine DataTrigger and EventTrigger?

NOTE I have asked the related question (with an accepted answer): How to combine DataTrigger and Trigger? I think I need to combine an EventTrigger and a DataTrigger to achieve what I m after: when ...

热门标签