Re: [SOAP] PHP Soap Client with .Net
| From: | Johann-Peter Hartmann | Date: | Tue, 18 Jan 2005 09:24:50 +0000 |
| Subject: | Re: [SOAP] PHP Soap Client with .Net | ||
| References: | 1 2 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-1704@lists.php.net to get a copy of this message | ||
Hi Mat,
On Di, 18.01.2005, 09:35, Matt K sagte:
> Didn't think PHP5 SOAP gave any way to do document/literal (seen it
> asked on this list a few times without response, anyway). Do you have
> any examples of making that work?
We (Mayflower/ThinkPHP) got several dotnet or delphi-soap <-> ext/soap
solutions up and running, including complex types and binary data.
Mainly we ended up reverse engineering googles wsdl.
Our ruleset for soap:
a) use rpc/encoded
b) always use a hand written wsdl
c) array of array won't work, use array of complex type including an array
d) Array definition example, within complex types, filled with complex types
<xsd:complexContent>
<xsd:restriction base="soapenc:Array">
<xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:User[]"/>
</xsd:restriction>
</xsd:complexContent>
with the namespaces
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
typens is the wsdls own namespace.
e) for complex types, use SoapVar($myobjectstruct, SOAP_ENC_OBJECT,
"name_of_the_complex_type", "my_wsdl_namespace");
f) use new SoapServer(...,array('uri' => 'my_wsdl_namespace',
'encoding'=>SOAP_ENCODED ));
Best regards
Johann
--
Johann-Peter Hartmann Mayflower GmbH
hartmann@mayflower.de sendlinger strasse 42a
http://mayflower.de 80331 münchen
tel 089 24 20 54 13 fax 089 23 24 97 15