-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect SoapServer output #2878
Comments
Here's a code example: PHP: <?php
class SimpleSoap {
public function TestCall($params) {
return array('success' => true);
}
}
$srv = new SoapServer('simplesoap.wsdl', array(
'cache_wsdl' => WSDL_CACHE_NONE,
'soap_version' => SOAP_1_2,
));
$srv->setClass('SimpleSoap');
$srv->handle(); WSDL: <?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="wso2" targetNamespace="http://localevohhvm" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://localevohhvm">
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://localevohhvm">
<xsd:element name="ParametersForTestCall">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="1" maxOccurs="1" name="integerValue" type="xsd:int" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="TestCallReturnValue">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="1" maxOccurs="1" name="success" type="xsd:boolean" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="TestCallRequest">
<wsdl:part name="TestCallRequest" element="tns:ParametersForTestCall" />
</wsdl:message>
<wsdl:message name="TestCallResponse">
<wsdl:part name="TestCallResponse" element="tns:TestCallReturnValue" />
</wsdl:message>
<wsdl:portType name="EvolutionPortType">
<wsdl:operation name="TestCall">
<wsdl:input message="tns:TestCallRequest" />
<wsdl:output message="tns:TestCallResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="EvolutionSoapBinding" type="tns:EvolutionPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="TestCall">
<soap:operation soapAction="http://localevohhvm/TestCall" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="EvolutionService">
<wsdl:port name="EvolutionPort" binding="tns:EvolutionSoapBinding">
<soap:address location="http://localevohhvm/simplesoap/simplesoap.php" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions> |
@SharkMachine Hi! Did you have an associated client with your sample? The code you gave doesn't do much without a client :) |
I think the simplest way to test this is to use a software called SoapUI (which I used myself). You can easily create a test client with it by loading the WSDL file. Using a PHP client created with SoapClient probably would not work with HHVM as the response from SoapServer is not well-formed. But if you want to try it, here is an example client: <?php
$client = new SoapClient('simplesoap.wsdl', array(
'location' => 'http://localevohhvm/simplesoap/simplesoap.php',
'cache_wsdl' => WSDL_CACHE_NONE,
'soap_version' => SOAP_1_2,
));
$arguments = array('integerValue' => 1);
$response = $client->__soapCall('TestCall', $arguments);
var_dump($response); |
Apparently PHP SoapClient works just fine, but that's not the case for some other implementations. For example SoapUI will just display the raw response as it doesn't recognise it properly and some .NET implementations have problems as well. |
I used a PHP SoapClient which works fine with my HHVM server , but i have a problem with c# soap client; i get empty response : |
This is still a problem with 3.9.0. The dummy The |
Output from PHP:
Output from HHVM:
As you can see, xmlns:ns1 is incorrect and there shouldn't even be xmlns:ns2 at all.
The text was updated successfully, but these errors were encountered: