我用c#调用一个java写的webservice
java的web服务方法为: int[] getForwardTimes(int[] sid)
c#调用方法为:
int[] request=new int[1]
request[0]=2;
int[] res=getForwardTimes(request)
完成调用后
Response.Write(res[0])在这一步res[0]的值居然为0
我用抓包工具看返回的结构如下:
<soapenv:Body>
<ns1:getForwardTimesResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://ws.smstrans.share_info.net">
<getForwardTimesReturn soapenc:arrayType="xsd:int[1]"
xsi:type="soapenc:Array"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<getForwardTimesReturn href="#id0"/>
</getForwardTimesReturn>
</ns1:getForwardTimesResponse>
<multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
25951
</multiRef>
</soapenv:Body>我看到明明有返回值25951,为什么res[0]的值却是0,希望各位给个合理的解释哈,拜托....
java的web服务方法为: int[] getForwardTimes(int[] sid)
c#调用方法为:
int[] request=new int[1]
request[0]=2;
int[] res=getForwardTimes(request)
完成调用后
Response.Write(res[0])在这一步res[0]的值居然为0
我用抓包工具看返回的结构如下:
<soapenv:Body>
<ns1:getForwardTimesResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://ws.smstrans.share_info.net">
<getForwardTimesReturn soapenc:arrayType="xsd:int[1]"
xsi:type="soapenc:Array"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<getForwardTimesReturn href="#id0"/>
</getForwardTimesReturn>
</ns1:getForwardTimesResponse>
<multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
25951
</multiRef>
</soapenv:Body>我看到明明有返回值25951,为什么res[0]的值却是0,希望各位给个合理的解释哈,拜托....
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货