Строковые значения, возвращаемые PHP SoapServer, не полученные клиентом .Net

Я использую документ WSDL, автоматически созданный Visual Studio 2010 (т. Е. Из приложения HelloWorld, которое создается при создании нового приложения веб-службы в Visual Studio). Но мне нужно разработать веб-службу на PHP, поэтому Я использую этот документ WSDL с PHP SoapServer. Я скопирую документ WSDL здесь:

<?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <wsdl:types> <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/"> <s:element name="HelloWorld"> <s:complexType /> </s:element> <s:element name="HelloWorldResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" /> </s:sequence> </s:complexType> </s:element> </s:schema> </wsdl:types> <wsdl:message name="HelloWorldSoapIn"> <wsdl:part name="parameters" element="tns:HelloWorld" /> </wsdl:message> <wsdl:message name="HelloWorldSoapOut"> <wsdl:part name="parameters" element="tns:HelloWorldResponse" /> </wsdl:message> <wsdl:portType name="Service1Soap"> <wsdl:operation name="HelloWorld"> <wsdl:input message="tns:HelloWorldSoapIn" /> <wsdl:output message="tns:HelloWorldSoapOut" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="Service1Soap" type="tns:Service1Soap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="HelloWorld"> <soap:operation soapAction="http://tempuri.org/HelloWorld" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="Service1Soap12" type="tns:Service1Soap"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="HelloWorld"> <soap12:operation soapAction="http://tempuri.org/HelloWorld" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="Service1"> <wsdl:port name="Service1Soap" binding="tns:Service1Soap"> <soap:address location="helloworld_server.php" /> </wsdl:port> <wsdl:port name="Service1Soap12" binding="tns:Service1Soap12"> <soap12:address location="helloworld_server.php" /> </wsdl:port> </wsdl:service> </wsdl:definitions> 

Мой код PHP SoapServer выглядит следующим образом:

 function HelloWorld() { return "Hello world!"; } $server = new SoapServer( 'helloworld.wsdl' ); $server->addFunction('HelloWorld'); try { $server->handle(); } catch (Exception $e) { $server->fault('Sender', $e->getMessage()); } 

Когда я пытаюсь вызвать эту мыльную службу с клиентом .Net, я получаю пустую строку. Кто-нибудь знает, что происходит с этим простым примером?

ОБНОВИТЬ:

Это, по-видимому, проблема с общением с клиентом .Net с сервера PHP. Я проверил с PHP-клиентом, и я получаю сообщение, возвращенное сервером в PHP-клиенте. Но по какой-то причине клиент .Net получает пустую строку. Для клиента .Net я создал простое приложение WinForms, добавил веб-ссылку на php soap-сервер. Веб-ссылка добавляется правильно и показывает API. Я поместил одну кнопку в форму с помощью следующего дескриптора клика:

 private void button1_Click(object sender, EventArgs e) { WebReference.Service1 srv = new WebReference.Service1(); string result = srv.HelloWorld(); MessageBox.Show(result); }