Home > database >  Consult, pb8.0 invoke the web service returns the parameters of the problem, be urgent!!!!!!
Consult, pb8.0 invoke the web service returns the parameters of the problem, be urgent!!!!!!

Time:10-18

Ole pb8.0 by calling webservice
Into the ginseng, ginseng as json format, coding format for utf-8,
Call methods: int Interface (String Code, String InputJson, out String OutputJson)
Seems to call succeeds (the function return value=0), but no return parameter (ls_OutputJson no value), the web this didn't contact, a typical rookie, please masters stretched out a helping hand, you help me advice, thank you,

//test
String ls_wsdl=', ls_input
String ls_OutputJson=space (1024)
Int I, r

Ls_input="{"
Ls_input +='" body "' + ', '+' {'
Ls_input +='" medicalType "' + ', '+' "01" '+', '
Ls_input +='" name "' + ', '+' "zhang SAN" '+', '
Ls_input +='}
Ls_input +='}

Oleobject ws

IF not isvalid (ws) THEN
Ws=Create oleobject
I=ws. ConnectToNewObject (" MSSOAP. SoapClient30 ")
Ls_wsdl='http://192.168.1.1:8000/Messageapi.asmx? WSDL: '
Ws. Mssoapinit (ls_wsdl)
Ws. ConnectorProperty (" Timeout ", 180000)

R=ws. Interface (" F001 ls_input, ref ls_OutputJson)

END the IF

Destroy the ws

CodePudding user response:

The default encoding is encodingle16 pb string!
If transceiver is uft8! Must be transcoding
Try a string (blob (), encodingutf8!)

CodePudding user response:

Into the travel is json, why use webservice, using a restful architecture is not better

CodePudding user response:

Webservice does not support the out parameter, you directly use function return value to get the return type is a string and try again

CodePudding user response:

refer to the second floor pcwe2002 response:
into the travel is json, why use webservice, isn't it better to use a restful architecture


To ask, how to use pb restful architecture?

CodePudding user response:

reference 4 floor wenggoo response:
Quote: refer to the second floor pcwe2002 response:

Into the travel is json, why use webservice, isn't it better to use a restful architecture


To ask, how to use pb restful architecture?


You can refer to http://download.csdn.net/detail/pcwe2002/9523299