Home > Back-end >  XE2 call WebServies closed program, memory errors? Code is wrong? Or a BUG?
XE2 call WebServies closed program, memory errors? Code is wrong? Or a BUG?

Time:10-19

XE2 call WebServies closed program, memory errors? Code is wrong? Or a BUG?

The use of the China Meteorological Administration and write their own Java server, a program closed in invalid pointer, memory errors.

It's calling code provided by the meteorological agency: click the button after the list normal add a list of all provinces. Exit error.

The China Meteorological Administration web service address
http://www.webxml.com.cn/WebServices/WeatherWebService.asmx? WSDL


Button click event
Var
As2: arrayofstring2;
I: integer;
The begin
As2:=(HTTPRIO1 as WeatherWebServiceSoap). GetSupportProvince;
ListBox1. The Clear;
For I:=low (as2) to high (as2) do
The begin
Listbox1. Items. The add (as2 [I]);
end;
end;

For guidance.

CodePudding user response:

Under his roof, some use done XE2 webservices?
With the China Meteorological Administration on the web, and talent also try!

CodePudding user response:

His hat with again...

CodePudding user response:

After importing the WSDL Delphi is not automatically generates a gain webservice instance method, you see
Your code like no create, just a statement

CodePudding user response:

Under the Delphi 7 debugging through, I use the building code, there are no errors, the correct display all provinces


You have three HTTPRIO1 attribute set?
HTTPRIO1. WSDLLocation
HTTPRIO1. Port
HTTPRIO1. Service

And import upstairs webservice method?

CodePudding user response:

Delphi7 normal, I also tried. XE2 above no. Quit when an error

CodePudding user response:

Just like the original poster, memory errors, don't know what the reason,,,

CodePudding user response:

Sure HTTPRIO1 controls attribute is set up correctly, especially HTTPRIO1. Url attribute

CodePudding user response:

Need to up4
  • Related