zgqasd 2014年01月21日
webservice可以自己调用自己么?
一、在web提供者创建了test1,
代码如下:
Dim s As NotesSession

Class WebServiceOne

Sub NEW
'Print "kaishi..."
'Set s = New NotesSession
'Print s.EffectiveUserName
'Print "jieshu"
End Sub

Function operation1(input1 As String, input2 As String) As String
operation1 = "hello,My Dear!"
End Function

Function operation2(input1 As String, input2 As String) As String
operation2 = "hello,Jason!"
End Function

End Class

二、在web使用者创建了usews。
%INCLUDE "lsxsd.lss"
Class WebServiceOne As PortTypeBase

Sub NEW
Call Service.Initialize ("UrnDefaultNamespaceWebServiceOneService", _
"WebServiceOneService.Domino", "http://xxxxx:8090/ttt.nsf/test1?OpenWebService", _
"WebServiceOne")
Print "rrrruuuu"
End Sub

Function OPERATION1(INPUT1 As String, INPUT2 As String) As String
Let OPERATION1 = Service.Invoke("OPERATION1", INPUT1, INPUT2)
End Function

Function OPERATION2(INPUT1 As String, INPUT2 As String) As String
Let OPERATION2 = Service.Invoke("OPERATION2", INPUT1, INPUT2)
End Function

End Class
三、然后新建代理,调usews,
Sub Initialize
Dim s As New notessession

Dim ws As WebServiceOne

Print "123456"

Set ws = New WebServiceOne

If ws Is Nothing Then
Print "aaaa"
Else
Print "bbbbb"
End If

Print ws.OPERATION1(" "," ")
End Sub
执行代理,输出“123456 rrrruuuu bbbbb ”

我想输出“hello,My Dear!”这句话,但是系统控制台说调用超时。前面的判断说明,ws变量没实例化,我这种调用是否有问题,有经验的大虾指导指导,谢谢!
...全文
69 点赞 收藏 1
写回复
1 条回复

还没有回复,快来抢沙发~

发动态
发帖子
消息协作
创建于2007-08-27

282

社区成员

3.9w+

社区内容

企业开发 Exchange Server
社区公告
暂无公告