tunday 0 Newbie Poster

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 unboundd 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.

_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 + "\nDestination Path:" + (String)updates_response->UpdatesList->destination_path;
  }
  else
  {
   Application->MessageBox("Updates Unavailable", "Updates", MB_OK);
  }

The relevant section of the wsdl for the code above is this:

[B]-[/B] <xs:complexType name="[B]UpdatesResponseData[/B]">
[B]-[/B] <xs:annotation>
 <xs:documentation>[B]Prototype for GetUpdates Response[/B]</xs:documentation> 
 
 </xs:annotation>
 
 
[B]-[/B] <xs:all>
 <xs:element name="[B]UpdatesList[/B]" type="[B]tns:UpdatesListType[/B]" /> 
 
 <xs:element name="[B]Status[/B]" type="[B]xs:string[/B]" /> 
 
 <xs:element name="[B]ErrorMessage[/B]" type="[B]xs:string[/B]" /> 
 
 </xs:all>
 
 
 </xs:complexType>
 
 
[B]-[/B] <xs:complexType name="[B]UpdatesListType[/B]">
[B]-[/B] <xs:annotation>
 <xs:documentation>[B]Prototype for contents of UpdatesList[/B]</xs:documentation> 
 
 </xs:annotation>
 
 
[B]-[/B] <xs:sequence>
 <xs:element name="[B]source_path[/B]" type="[B]xs:string[/B]" minOccurs="[B]0[/B]" maxOccurs="[B]unbounded[/B]" /> 
 
 <xs:element name="[B]destination_path[/B]" type="[B]xs:string[/B]" minOccurs="[B]0[/B]" maxOccurs="[B]unbounded[/B]" /> 
 
 </xs:sequence>
 </xs:complexType>

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.

I thought using an array would do the trick but while stepping through the code at run-time, I disovered that it was only the last set that was returned so it wouldn't solve the problem. When I made UpdatesList itself an array, it returned a verbose result that looked something like this

Source Path: "RT12345VB Destination Path: [B][URL]http://schemas.xmlsoap.org/soap/encoding/[/B]BV54321TR".

This still meant that the other result set was either not returned or was overwritten. Can someone please help me?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.