Hi. I have a C++ program (written In Borland C++ Builder) which makes requests and receives responses via SOAP. I have imported the SOAP using wsdl inporter. It has created the classes and I have created object instances from them.
However, I have a particular element that has unbounded values. Whenever I try to retrieve its values from the object, I only get the last set of elements from it meaning the ones before have been overwritten.
[code]_di__QPortType so_what;
HTTPRIO_4Q->QueryInterface(so_what);
updates_response = so_what->GetUpdates(updates_request);
if (updates_response)
{
if (updates_response->Status == (WideString)"Updates Available")
{
lblMessage->Caption = "Source Path:" + (String)updates_response->UpdatesList->source_path + "
Destination Path:" + (String)updates_response->UpdatesList->destination_path;
}
else
{
Application->MessageBox("Updates Unavailable", "Updates", MB_OK);
}[/code]
The relevant section of the wsdl for the code above is this: [code]
-
-
Prototype for GetUpdates Response
-
-
-
Prototype for contents of UpdatesList
-
[/code]
The output looks like this:
Source Path: RT12345VB
Destination Path: BV54321TR
However, what I do expect is:
Source Path: XXXXXX
Destination Path: YYYYYY
Source Path: RT12345VB
Destination Path: BV54321TR this is what is logged into a particular file by a function I created on the server side to log the returned results into this file so I could analyse/compare results for debugging purposes.
I thought using an array would do the trick but while stepping through the code at run-time, I discovered that it was only the last set that was returned so it wouldn't solve the problem. I decided to make UpdatesList itself an array, and then changed the section of code using it to this:
[code]if (updates_response)
{
if (updates_response->Status == (WideString)"Updates Available")
{
lblMessage->Caption = (String)updates_response->UpdatesList;
//Application->MessageBox("Updates Available", "Updates", MB_OK);
//lblMessage->Caption = "Source Path:" + (String)updates_response->UpdatesList->source_path + "
Destination Path:" + (String)updates_response->UpdatesList->destination_path;
}
else
{
Application->MessageBox("Updates Unavailable", "Updates", MB_OK);[/code]
}
It returned a verbose result as follows:
RT12345VBBV54321TR</destination_path
This still meant that the other result set was either not returned or was overwritten. Can someone please help me?