| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 4158 人关注过本帖
标题:VB调用JAVA发布的webservice
只看楼主 加入收藏
y782165575
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2011-7-30
结帖率:100%
收藏
 问题点数:0 回复次数:8 
VB调用JAVA发布的webservice
Dim soap As New MSSOAPLib30.SoapClient30
Private Sub Command1_Click()
Dim InsStr As String
Dim a As Boolean
InsStr = "<?xml version='1.0' encoding='utf-8'?><rootMenu><menu><FID>20065</FID><FDate>2011-07-19</FDate><Ftime>15:60</Ftime><FPdtID>p001-001</FPdtID><FPdtBS>prudcut identity</FPdtBS><FPdtBS1>prudcut identity11</FPdtBS1><FPdtBS2>prudcut identity222</FPdtBS2><Fresult>log infomation</Fresult><Fdescription>operator success</Fdescription><Fuser>jonefy</Fuser><FIP>192.168.42.75</FIP><Fcomputer>zhouqiaofei-25684</Fcomputer></menu></rootMenu>"
a = soap.getXMlElmentList(InsStr)
If a = True Then
        Print "true"
    Else
        Print "false" + Err.Description
End If
End Sub

Private Sub Form_Load()
   
  On Error Resume Next
   
  soap.ClientProperty("ServerHTTPRequest") = True
  Call soap.MSSoapInit("http://192.168.72.41:8080/fundacc35/services/docService?wsdl")
  If Err <> 0 Then
  MsgBox "初始化SOAP失败 " + Err.Description
  Else
  MsgBox "初始化成功"
  End If
End Sub

 访问WebService可能出现的错误
        SoapMapper:The schema definition with a targetnamespace of http://schemas. for SoapMapper string could not be found HRESULT=0x80        004005: 未指定的错误
       - SoapMapper:The SoapMapper for element string could not be created HRESULT=0x80004005: 未指定的错误
       - WSDLOperation:Initialization of a SoapMapper for operation queryVioSurveil failed HRESULT=0x80004005: 未指定的错误
       - WSDLOperation:Initializing of the input message failed for operation queryVioSurveil HRESULT=0x80004005: 未指定的错误
       - WSDLPort:An operation for port VioOutAccess could not be initialized HRESULT=0x80004005: 未指定的错误
       - WSDLPort:Analyzing the binding information for port VioOutAccess failed HRESULT=0x80004005: 未指定的错误
       - WSDLService:Initialization of the port for service JaxRpcOutAccessService failed HRESULT=0x80004005: 未指定的错误
       - WSDLReader:Analyzing the WSDL file failed HRESULT=0x80004005: 未指定的错误
       - Client:One of the parameters supplied is invalid. HRESULT=0x80070057: 参数不正确。

大家帮忙分析下错误原因:

搜索更多相关主题的帖子: xml identity success JAVA 
2011-07-30 17:14
y782165575
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2011-7-30
收藏
得分:0 
MSSOAPLib30.SoapClient30  对最新的WSDL版本不支持   可我修改了还是出现这问题。
2011-07-30 17:16
y782165575
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2011-7-30
收藏
得分:0 
大家提提建议帮帮忙啊
2011-07-31 09:40
jiashie
Rank: 8Rank: 8
等 级:贵宾
威 望:10
帖 子:237
专家分:999
注 册:2009-4-30
收藏
得分:0 
1、确认webService可以正常访问;
2、建议用Microsoft Office XP Web Services Toolkit 2.0创建代理类,尤其是用到了一些自定义的数据类型作为参数或返回值的时候。参考http://
3、第二步中创建的代理类的数据类型也有可能是错的,需要酌情调整。(我曾在vb6中调用一个c#写的webService的时候,代理类把c#中的Decimal数据类型给映射成了variant,其实double更合适)
2011-08-01 13:45
jiashie
Rank: 8Rank: 8
等 级:贵宾
威 望:10
帖 子:237
专家分:999
注 册:2009-4-30
收藏
得分:0 
另外:确认你引用的是Microsoft Soap Type Library V3.0,而不是Microsoft Office Soap Type Library V3.0,这两个很相似。
但以前犯过一个错,引用了office的那个,死活都调试不成功,结果才发现引用错了。

PS.换soap.MSSoapInit2试试。

[ 本帖最后由 jiashie 于 2011-8-1 13:53 编辑 ]
2011-08-01 13:49
y782165575
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2011-7-30
收藏
得分:0 
回复 5楼 jiashie
呵呵,谢谢啊,我去试试,现在我们得出的结论是cxf 发布的webservice  好像不支持VB勒,哎!
2011-08-01 17:00
y782165575
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2011-7-30
收藏
得分:0 
换了4个框架终于弄好了
2011-08-04 11:17
ntcdh
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2017-2-17
收藏
得分:0 
换了4个框架终于弄好了?
怎么处理的,我也遇到同样问题。
2017-02-19 09:46
unknowfruit
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2017-3-7
收藏
得分:0 
回复 8楼 ntcdh

问题解决了吗
我也遇到调用出错

2017-03-07 16:08
快速回复:VB调用JAVA发布的webservice
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019100 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved