-2

I am struggling with gsoap's return parameter binding. I have a function which returns char** which is composed like this: {char*, ..., char*, NULL}. I want the generated web service to be able to transmit and process multiple strings in one parameter. Gsoap however generates only: <element name="retVal" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>

I would like it to return an array of strings, not a single string.

Dariusz
  • 21,561
  • 9
  • 74
  • 114

2 Answers2

0

If I undesrstand your question

You can develop your own function which call the gSoap function to get the returned string from the gSoap function then split the gSoap sting to sub strings and put them into an array and then return your array of strings

MOHAMED
  • 41,599
  • 58
  • 163
  • 268
0

I found an answer in the documentation. It turns out that I had to create a structure to be used to return the value and name the variables appropriately. In my case:

struct ns_cl_get_indexes_retVal {
  int __sizeIndex;
  char** index;
};

and the function in the WS-base header:

int ns__cl_get_indexes ( int32_t db_id,  struct ns_cl_get_indexes_retVal& retVal );

Which resulted in a proper xml generation, as seen in wsdl:

<element name="index" type="xsd:string" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
Dariusz
  • 21,561
  • 9
  • 74
  • 114