开发者

asp.net webservice how to make compatible with PHP and other languages

I am currently creating a web service in vb.net and I would like to ask the community what is the best way to make this compatible for PHP users and other languages.

An example of my code is as follows:

Public Shared Function GetBasketInfo(ByVal sessionid As String, ByRef ds As DataSet, ByVal attributes     

As String) As DataRow

If String.IsNullOrEmpty(attributes) Then
  Throw New ArgumentNullException("Please supply a manufacturer")
End If

Dim l As New List(Of String)

l = _serializer.SplitAttributes(attributes)


Dim s As String
Dim p(1) As SqlParameter
Dim dt As DataTable

's = "exec MSLStore1_GetOrderInfo @userid, @orderid"


dt = ExecuteDataTableDT("MSLStore1_GetOrderInfo", _
                     New SqlParameter("@userid", StoI(l(0))), _
                       New SqlParameter("@orderid", StoI(l(1)))
                     )开发者_开发百科



  Return dt.Rows(0)

   End Function 

My question is will this method be compatible with PHP consumption. If not can someone point me to the right direction.


The answer to this can be found here:

http://forums.asp.net/t/887892.aspx/1

More importantly the last posting, you would consume your ASP.NET web service by saving the .wdsl file (web service) and doing the following in PHP:

$client = new SoapClient("http://localhost/csharp/web_service.asmx?wsdl");

print_r( $client->Add(array("a" => "5", "b" =>"2")));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜