PB98836调用别人的webservice接口,在测试他们的方法,有些通过,有些PB直接报错,“ERROR calling method of a PBNI Object”这句话,想问下怎么回事了?不懂PBNI是什么,我就是按照对方给的方法给参数啊,有些在报错,有些又对的,搞了很久了,希望大大们帮忙看看.
long rVal, lLog
long amount
conn = create SoapConnection; //Instantiated connection
lLog = conn.SetOptions("xinnonhe.log");
// Set trace file to record soap interchange data,
// if string is "", disables the feature
rVal = Conn.CreateInstance(proxy_obj,"fservicesoutpaysoap");
if rVal <> 0 then
messagebox("连接失败","错误代码"+string(rVal))
return
end if;
// Create proxy object
try
amount = proxy_obj.getversion() //调用获取返回值
messagebox("返回信息",string(amount))
catch(soapexception e1) //soapexception定义的异常
messagebox("sop异常",e1.text)
catch (runtimeerror re1) //
Messagebox("web连接错误",re1.text)
end try
destroy conn
这个可以正确的获取到
//////////////
////出院通知
//////////////
boolean is_ok;
long rVal, lLog
conn = create SoapConnection; //Instantiated connection
lLog = conn.SetOptions("");
rVal = Conn.CreateInstance(proxy_obj,"fservicesoutpaysoap");
if rVal <> 0 then
messagebox("连接失败","错误代码"+string(rVal))
return
end if;
try
is_ok = proxy_obj.outhospital( 1, "a7ffd874-d2e3-4700-9d65-e4ebf3abb0da", "80482e6dbebf40298e15c312ca1c265d","111", datetime(date("2010-8-1"),time("09:09:34")), "牙出血", "康复")
if is_ok = true then
messagebox("","出院成功")
else
messagebox("","出院失败")
end if
catch(soapexception e1) //soapexception定义的异常
messagebox("sop异常",e1.text)
catch (runtimeerror re1) //
Messagebox("web连接错误",re1.text)
end try
destroy conn
这个就不行了 直接报错ERROR calling method of a PBNI Object”
------解决方案--------------------
那就别用SoapConnection,直接通过Inet object获得xml文档自己解析
------解决方案--------------------
11好像也没有这个数据类型。转换一下试试看。
------解决方案--------------------