Home > database >  Development of farming system and his system interface made a pb invoke the webservice program, ther
Development of farming system and his system interface made a pb invoke the webservice program, ther

Time:09-17

In the process of the development of farming system and his system interface, made a pb invoke the web service application, pb 9.0 in the process of call number webservice culvert, appeared the following error: error: unknown soap response tag:http://schemas.xmlsoap.org/wsdl/#definitions please master guiding, see the previous two years have Posting and I this mistake, how to solve!!!!!!

The program code is as follows:
The SoapConnection i_conn//declare the Soap connection object
//p_nh_webservicedata_update_i nh_soap//set up object

Nh_data_update_ihttpport nh_soap//set up object


String ls_Url
String err
Long rVal

Try
I_conn=create the SoapConnection//instantiate the Soap connection object
The catch (RUNtimeerror e11)
Err='creates the soapconnection error occurs, an error message is:' + e11. GetMessage ()
Messagebox (' creates the soapconnection errors, err)
//st_waiting. Visible=false
Return
End the try



Ls_Url="HTTP://http://202.100.78.91:7001/sjpt_his_village/Data_Update_M.ws? WSDL
"
RVal=i_conn. Createinstance (nh_soap, "nh_data_update_ihttpport ls_Url)////instantiate the WebService proxy objects


If rVal<> 0 then
MessageBox (' initialize WebServer failure ', 'initialize WebServer failure, error number: + string (rVal))

End the if

String params
String ls_S_Returns
Params='000' + & amp; "" + 'admin'



Ls_S_Returns=""



Try
//ls_S_Returns=nh_soap. Update_Data_String (" PROC_CHECK_USER "params, & amp;" " )


Ls_S_Returns=nh_soap. Execute_Sql (" Get_Member ", "620621 & amp; 6206210204080055 ", "& amp; ')
The catch (RUNtimeerror e12 at 11:45.)
Err='the soapconnection calling function SetOptions error occurs, an error message is:' + e12 at 11:45. GetMessage ()
//st_waiting. Visible=false
Messagebox (' the soapconnection calling function SetOptions errors', err)
//return ls_S_Returns
End the try















CodePudding user response:

Ls_Url="HTTP://http://202.100.78.91:7001/sjpt_his_village/Data_Update_M.ws? WSDL
"This address is available?
Can enter the address in the ie column test, appeared the page can't display, address is wrong or the network impassability

CodePudding user response:

May be the PB is bad for the webservice support

You can use the mssoap to implement


Since PB8.0/9.0, already provide Web Service Proxy function, can direct the preparation of the relevant procedure,

However, some old projects use PB6.5 development

Research found that actually PB6.5 to operate Web Service also pretty easy,




Description: 1. This example for pb to the operation of the Web Service,
2. The pb can use two ways,
3. The proxy mode using pb9 own Web Service proxy function implementation, need to be sharedPowerBuilderpbsoapclient90. The PBD included in the application,
4. OLE way call MSSOAP. SoapClient implementation, this method can be used in the low version of pb, as, pb6.5
5. MSSOAPLib. SoapClient available, please download from the Microsoft search soap toolkit soapsdk. Exe

OLEObject MSSOAPLib1
MSSOAPLib1=CREATE OLEObject
Long ll_result
Ll_result=MSSOAPLib1. ConnectToNewObject (" MSSOAP. SoapClient ")
If ll_result & lt;> 0 then
Messagebox (" prompt ", "connect MSSOAP SoapClient failure! Return parameter: "+ string (ll_result))
End the if
MSSOAPLib1. Mssoapinit (" http://172.17.99.20:9090/yygh/services/Query? WSDL ")
Mle_content. Text=MSSOAPLib1. SendXml (" Sina, "sle_userid. Text, sle_passwd. Text, sle_mobileno. Text, mle_content. The Text," new ")

CodePudding user response:

Thank you, try again!

CodePudding user response:

Lzp_lrp moderator PB is positive solutions of life, and finally use MSSOAPLib. The SoapClient solve!
The code is as follows:

Oleobject nh_soapcom

Nh_soapcom=create oleobject

If nh_SOAPcom. Connecttonewobject (" MSSOAP. SoapClient30 ") & lt;> 0 then
Messagebox (" error ", "soap connection failed! , the program exit!" )

The else

End the if

ServerHTTPRequest nh_SOAPcom. ClientProperty (" ", true)


Nh_soapcom. Mssoapinit (" http://202.100.78.91:7001/sjpt_his_village/Data_Update_M.ws? WSDL ")


Nh_SOAPcom. ConnectorProperty (" Timeout ", 180000)

Nh_soapcom. The function name ()
  • Related