您的位置:程序门 -> .net技术 -> web services



visual studio 2005 生成的webservice客户端调用java webservice失败


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


visual studio 2005 生成的webservice客户端调用java webservice失败[已结贴,结贴人:5754]
发表于:2007-12-25 17:18:36 楼主
有一java编写的webservice运行在axis   1.3上,之前用vs2003生成的客户端调用,一切正常。
将解决方案升级至vs2005版本后,调用webservice时,返回值一直提示“包数据不对”。webserivce端程序员的解释是发送的消息格式不对,但无法提供更多细节。
然后删掉该webservice引用,使用vs2005的添加webservice引用向导重新添加(重新生成webservice客户端代理类),结果一样。
然后我尝试分别对客户端代理类应用以下attributes:
[soaprpcservice(routingstyle   =   soapserviceroutingstyle.requestelement,   use   =   soapbindinguse.encoded)]
[soapdocumentservice(routingstyle   =   soapserviceroutingstyle.requestelement,   use   =   soapbindinguse.encoded)]
结果仍然一样。

有任何建议请不吝赐教。
发表于:2007-12-25 17:22:571楼 得分:0
忘说了,该webservice的wsdl:
http://125.76.238.4/services/bscmserve?wsdl
发表于:2007-12-25 18:01:292楼 得分:0
我试了没有问题~~
发表于:2007-12-25 18:16:343楼 得分:0
levenwood,   你试了哪个方法?我在本地试着调用authentication方法,返回值里resultcode=-1001,   resultmsg=包数据不对。
发表于:2007-12-25 18:28:234楼 得分:0
这是我用soap   toolkit   截获的soap请求
xml code
<?xml version="1.0" encoding="utf-8" ?> <soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:serve.bscm.gdcn.com" xmlns:types="urn:serve.bscm.gdcn.com/encodedtypes" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema"> <soap:body soap:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/"> <tns:authentication> <in0 href="#id1" /> </tns:authentication> <q1:authenticationrequesttype id="id1" xsi:type="q1:authenticationrequesttype" xmlns:q1="http://type.serve.bscm.gdcn.com"> <appid xsi:type="xsd:string">0</appid> <enterpriseid xsi:type="xsd:string">0</enterpriseid> <sessiontoken xsi:type="xsd:string">adfafd</sessiontoken> <timestamp xsi:type="xsd:string">13412431243</timestamp> <transactid xsi:type="xsd:string">fcaf0cb6e2d242e99e78dafbc1524d57</transactid> <userid xsi:type="xsd:string">1</userid> </q1:authenticationrequesttype> </soap:body> </soap:envelope>
发表于:2007-12-25 18:35:185楼 得分:100
没有调用方法,只用了属性
发表于:2007-12-25 18:37:596楼 得分:0
我手上没有vs2003,哪位能用2003生成一个客户端去调用一下authentication方法,并提供客户端发出的soap请求吗?也许比较一下能找出问题所在。
发表于:2007-12-25 19:27:257楼 得分:0
可能被服务端程序员误导了,我刚刚用vs2003生成的客户端调用,结果也一样了。毕竟响应是正常的,并没有异常抛出来。
发表于:2007-12-26 12:32:348楼 得分:0
已经证实生成的客户端没问题,具体原因进一步调查中,感谢levenwood的热心,就此结贴。


快速检索

最新资讯
热门点击