将.NET SOAP调用转换为PHP

时间:2011-10-05 19:43:12

标签: php .net soap

我正在尝试创建一个脚本来提取由供应商使用SOAP创建的XML文件。他们唯一的文档是在VB.NET中,但我试图在PHP中使用它 - 到目前为止无济于事。下面是.NET示例:

Private Sub GetData()
‘ Proxy is an arbitrary name I used to point to the City of Virginia Beach Web Reference URL.  
‘ You may call it something else in your code.
        Dim soapHeader As Proxy.UserCredentials = New Proxy.UserCredentials
        soapHeader.Email = "YourEmailAddress@Domain.com"
        soapHeader.Password = "password"

        Dim ws As Proxy.Service = New Proxy.Service
        ws.UserCredentialsValue = soapHeader

        Dim forDate As DateTime = "1/1/2011"
        Dim result As String = ws.GetIncidentData(forDate)
    End Sub

对此的任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:1)

我会从这里开始:http://php.net/manual/en/book.soap.php
Curl也可以用于这样的事情:http://php.net/manual/en/book.curl.php