Consuming .NET web services with complex types in PHP
Can i consume .NET web service and use it complex types in PHP?
Example:
[WebMethod]开发者_如何学编程
public DataSet GetData()
{
return new DataSet();
}
Can i consume this method and use DataSet class methods in PHP?
Unlikely. .NET web services return serialized representations of .NET objects - and you can't use .NET objects in PHP because that's just not how it works.
You'd be better off exposing each of the methods you need as a separate web service call that just returns data, configure .NET to serialize the data as XML or JSON, and then use a PHP library to deserialize the results into a format your PHP code can work with.
精彩评论