web services - SOAP PHP - SimpleType error response -
i've problem response of soap webservice.
i've structure:
<xsd:element minoccurs="0" name="sesso"> <xsd:simpletype> <xsd:restriction base="xsd:string"> <xsd:enumeration value="m" /> <xsd:enumeration value="f" /> </xsd:restriction> </xsd:simpletype> </xsd:element>
and need response is:
<sesso xsi:type="xsd:string">m</sesso>
but ns1:sesso type:
<sesso xsi:type="ns1:sesso">m</sesso>
why this?
my php code one:
$server = new soapserver("assistiti.wsdl", array('soap_version' => soap_1_2)); $server->addfunction("aggiornaassistiti"); $server->handle(); function aggiornaassistiti() { $assistito = new stdclass(); $assistito->sesso = "m"; return $assistito; }
(i'm using soapui tests)
try using soapvar. third parameter specifies type.
Comments
Post a Comment