I have a web service writen by .NET:
[WebMethod]
[SoapRpcMethod]
public string[] Greetings(string[] names)
{
string[] gs = new string[names.Length];
for (int i = 0; i < gs.Length; i++)
gs[i] = string.Format("Hello, {0}", names[i]);
return gs;
}
It will be consumed by a Apache SOAP client (SOAPConnect for Lotus
Notes). Apache can send the string array (names) to .NET; but fail to
deserialize the return array (GreetingsResult).
Here is the web request (from Apache to .net)
<SOAP-ENV:Body>
<ns1:Greetings xmlns:ns1="urn:ws-jlta-com"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<names xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:Array" ns2:arrayType="xsd:string[2]">
<item xsi:type="xsd:string">biao</item>
<item xsi:type="xsd:string">yuan</item>
</names>
</ns1:Greetings>
</SOAP-ENV:Body>
This is the web response (from .net to Apache)
<soap:Body
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<types:GreetingsResponse>
<GreetingsResult href="#id1" />
</types:GreetingsResponse>
<soapenc:Array id="id1" soapenc:arrayType="xsd:string[2]">
<Item>Hello, biao</Item>
<Item>Hello, yuan</Item>
</soapenc:Array>
</soap:Body>
As Apache SOAP BeanSerializer only can accept camel casing properties.
So I guess the problem is caused by .net return <Item> which is pascal
casing.
I tested by using SoapFormatter to serialize string array, its result
is <item>, so I am quite confused why .net web serivce returns <Item>.
Any solution for this?
Thanks in advance.