Pisze aplikacje w C# w której łącze się ze sklepem opartym na silniku ClickShop, poprzez protokół SOAP. Wywołując metodę „order.save” http://tech.sklep-pomoc.home.pl/webapi:order.save jako parametry podajemy tablice asocjacyjną.

W php wygenerowany XML

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://qls.pl/webapi/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://xml.apache.org/xml-soap" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:call>
<session xsi:type="xsd:string">e7c55854aeb67820c836ec9c363de483</session>
<function xsi:type="xsd:string">order.save</function><arguments SOAP-ENC:arrayType="xsd:ur-type[3]" xsi:type="SOAP-ENC:Array">
	<item xsi:type="xsd:int">145</item>
	<item xsi:type="ns2:Map"><item><key xsi:type="xsd:string">status_id</key><value xsi:type="xsd:int">1</value></item>
	</item>
<item xsi:type="xsd:boolean">true</item></arguments></ns1:call></SOAP-ENV:Body></SOAP-ENV:Envelope>

 

Jak to zrobić w C# aby dodać do zapytania pary key -> value