Home » Community » Newbie corner » HttpRequest and SOAP protocole (I need help about sending soap request to a wep api)
Re: HttpRequest and SOAP protocole [message #50317 is a reply to message #50316] |
Tue, 18 September 2018 13:26 |
Oblivion
Messages: 1093 Registered: August 2007
|
Senior Contributor |
|
|
Hello Xemuth,
Because you've created an HttpRequest on the heap and you forgot to delete it at the end.
This is the VERY reason you should avoid using new/delete.
Try to allocate resources on the stack, or use containers (e.g. One<> for single instance, Array<> for mulitple instances.)
HttpRequest test("http://www.holidaywebservice.com//HolidayService_v2/HolidayService2.asmx?wsdl");
test.Timeout(5000);
test.ContentType("text/xml");
test.Post("<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:hs='http://www.holidaywebservice.com/HolidayService_v2/'><soapenv:Body><hs:GetHolidaysForMonth><hs:year>2018</hs:year><hs:countryCode>UnitedStates</hs:countryCode><hs:month>11</hs:month></hs:GetHolidaysForMonth></soapenv:Body></soapenv:Envelope>");
reponse = test.Execute();
LOG(reponse);
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Tue, 18 September 2018 13:28] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Wed May 08 08:33:00 CEST 2024
Total time taken to generate the page: 0.01814 seconds
|