Home > database >  Pb90 webservcie how to transfer a structure
Pb90 webservcie how to transfer a structure

Time:09-21

String ls_tjbh ls_path, ls_RequestInfo
Int I, li_jd li_cnt_select, li_rowcount
Long ll_cnt
Tns__uploadxml uploadxml
Tns__upload upload


Long ll_ret ll_row, ll_currentrow
String str_proxy_name='zywsuploadserviceimplport, ls_success
String err, WSDL
Ls_success='2'
WSDL='http://116.236.221.30/zywsservice/Upload? WSDL: '
Ls_success='
The soapconnection lsc_conn
ZywsUploadServiceImplPort lproxy_obj
Try
Lsc_conn=Create the soapconnection
The catch (runtimeerror e11)
Err='creates the soapconnection error occurs, an error message is:' + e11. GetMessage ()
MessageBox (' ', err)

End the try

Try
Lsc_conn. SetOptions (" SoapLog=~ "SoapLog. TXT ~" ")
The catch (runtimeerror e12 at 11:45.)
Err='the soapconnection calling function SetOptions error occurs, an error message is:' + e12 at 11:45. GetMessage ()
MessageBox (' ', err)

End the try
Debugbreak ()
Try
Ll_ret=lsc_conn. CreateInstance (lproxy_obj str_proxy_name, WSDL)
The catch (runtimeerror e13)
Err='the soapconnection instance creation (function createInstance) fails, an error message is:' + e13. GetMessage ()
MessageBox (' ', err)

End the try

Try
Upload the loginname='zwtj01033'
The upload. Password='8888'
The upload. The content=wf_get_file_blob (' C: \ Documents and Settings \ \ Administrator \ \ desktop bb. Zip ')//convert file to data flow
Uploadxml. Upload=upload
Lproxy_obj. Uploadxml (uploadxml)

The catch (soapexception e14)
MessageBox (' method is called ', 'call the web service failure: + e14. GetMessage ())
//run here appear -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
//call the web service failure: Unknown SOAP response tag: http://schemas.xmlsoap.org/wsdl/#definitions

The catch (pbxruntimeerror e15)
MessageBox (' method is called ', 'call a function error operation mistakes! ')

The catch (runtimeerror e16)
MessageBox (' method is called ', 'call a function unknown mistakes! '+ e16. GetMessage ())

End the try

CodePudding user response:

As long as the structure of the body is the basic data types, is certainly no problem

CodePudding user response:

The WSDL: WSDL='http://116.236.221.30/zywsservice/Upload' to try,

CodePudding user response:

The WSDL: WSDL='http://116.236.221.30/zywsservice/Upload'
Appear the Error while parsing the SOAP XML payload: not well - formed (invalid token) this tip


CodePudding user response:

Help me test the

Wf_get_file_blob (' C: \ Documents and Settings \ \ Administrator \ \ desktop bb. Zip ') function content

Boolean lb_oldcommit
Long I, ll_rowcount, j
String ls_path ls_filename, ls_fullpath
The integer li_FileNum, ll_loops
Long ll_flen bytes_read, new_pos
Blob, b tot_b

Tot_b=blob (')
B=blob (' ')
Ls_fullpath=as_path
Ll_flen=FileLength (ls_fullpath)
Li_FileNum=FileOpen (ls_fullpath StreamMode! , Read! , LockRead!)
IF ll_flen & gt; THEN 32765
IF the Mod (ll_flen, 32765)=0 THEN
Ll_loops=ll_flen/32765
The ELSE
Ll_loops=(ll_flen/32765) + 1
END the IF
The ELSE
Ll_loops=1
END the IF
FOR j=1 to ll_loops
Bytes_read=FileRead (li_FileNum, b)
Tot_b=tot_b + b
NEXT
FileClose (li_FileNum)
Return tot_b



Data.zip file data.zip content
<? The XML version="1.0" encoding="gb2312"?>

101970161 & lt;/customerid>
ShuQingZhen & lt;/name>
1
422822198603075043 & lt;/cardnumber>

10197 & lt;/documentID>
Turtles house on electric co., LTD. & lt;/unitname>
57741533 & lt;/unitphone>
310117 & lt;/areacode>

0 years 1 month & lt;/workage>
101970161 & lt;/idnumber>
0 years 1 month & lt;/harmfulage>
The 2010-01-20 & lt;/testdate>
The 2012-07-10 & lt;/createdate>
0
The 1986-03-07 & lt;/birthday>


2













No & lt;/jws>




15 & lt;/yjcc>

3
28 & lt;/yjzq>

1
0 nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related