I'm getting an InvalidOperationException calling Invoke with a method
parameter object array that contains a two dimentional string array. More
stack trace output below:
// Create two dimentional array.
System::String* tda[,] = new System::String*[2,2];
tda[0,0] = "lastName";
tda[0,1] = "Power";
tda[1,0] = "firstName";
tda[1,1] = "Max";
// Create web method parameters including two dimentional array.
System::Object* setParams = {"TestApp", "abc123", tda};
// The next line causes a System.InvalidOperationException generating the
XML document. The specified cast was not valid. at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlS erializationWriter1.Write5_set(Object[]p)
SoapHttpClientProtocol->Invoke(S"set", setParams);
I'm using the two dimentional array because I'm trying to generate a SOAP
request body that includes an array:
<SOAP-ENV:Body>
<m:set xmlns:m="urn:SpecialStation"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<timeValue xsi:type="xsd:string">1919192929</timeValue>
<spaceNumber
xsi:type="xsd:string">{87AB126q-B19E-4F3B-9784-3F5D6k3D4F9E}</spaceNumber>
<ns2:submittedProperties
xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Array"
ns2:arrayType="xsd:ur-type[6]">
<item xmlns:ns3="urn:xml-soap-demo" xsi:type="ns3:property">
<attribute xsi:type="xsd:string">First.Value</attribute>
<value xsi:type="xsd:string">Value123</value>
</item>
<item xmlns:ns3="urn:xml-soap-demo" xsi:type="ns3:property">
<attribute xsi:type="xsd:string">Second.Value</attribute>
<value xsi:type="xsd:string">Value456</value>
</item>
<item xmlns:ns3="urn:xml-soap-demo" xsi:type="ns3:property">
<attribute xsi:type="xsd:string">Third.Value</attribute>
<value xsi:type="xsd:string">Value789</value>
</item>
<item xmlns:ns3="urn:xml-soap-demo" xsi:type="ns3:property">
<attribute xsi:type="xsd:string">Forth.Value</attribute>
<value xsi:type="xsd:string">Value012</value>
</item>
<item xmlns:ns3="urn:xml-soap-demo" xsi:type="ns3:property">
<attribute xsi:type="xsd:string">Fifth.Value</attribute>
<value xsi:type="xsd:string">Value345</value>
</item>
<item xmlns:ns3="urn:xml-soap-demo" xsi:type="ns3:property">
<attribute xsi:type="xsd:string">Sixth.Value</attribute>
<value xsi:type="xsd:string">Value678</value>
</item>
</ns2:submittedProperties>
</m:set>
</SOAP-ENV:Body>