Excessive XML nodes when returning a DATASET-HANDLE from a W

Posted by Simon L. Prinsloo on 11-Jun-2014 05:38

Good Day

OpenEdge 10.2A03, multiple platforms

We used to return a static dataset to a web-service and the XML was working well for us.

Now we changed the parameter to "DATASET-HANDLE" and create the dataset dynamically, but we experience a few weird issues:

1. The schema of the dataset is embedded in the output.

2. The dataset is wrapped in a node called "<ProDataset>" that was not there before.

3. The fact that we defined one of the data relations as "NESTED" is ignored.

Does anybody know how we can get around this?

Regards

Simon

Posted by Robin Brown on 11-Jun-2014 16:47

Hi Simon,

This is the way we designed dataset-handle parameters for the WSA in 10.1C.  Since there is no schema in the WSDL, the schema is embedded in the SOAP response.  The <Prodataset> wrapper for the dataset-handle is also as designed.  There isn't a way to get around this.  I believe we document this, but I am not positive.

Robin

All Replies

Posted by Simon L. Prinsloo on 11-Jun-2014 06:21

Solved number three. When you create a data relation, you must pass the parameter Not-Active as "TRUE" so that the relation IS active.....

But any thoughts on no. 1 and 2 is still welcome.

Posted by Robin Brown on 11-Jun-2014 16:47

Hi Simon,

This is the way we designed dataset-handle parameters for the WSA in 10.1C.  Since there is no schema in the WSDL, the schema is embedded in the SOAP response.  The <Prodataset> wrapper for the dataset-handle is also as designed.  There isn't a way to get around this.  I believe we document this, but I am not positive.

Robin

Posted by Simon L. Prinsloo on 12-Jun-2014 02:58

I suspected as much, but hoped there was a way that I could override the behaviour. The prototype used a static dataset that essentially simply "extended" the SOAP, so the Android client could get to anything it needed using the SOAP object it received, but now the structure changed.

They want as little data as possible crossing the wire due to mobile network issues and costs.

I've now written the Dataset to a longchar and reparsed it with SAX, writing out only the bare essentials that we need throug a SAX writer and returned that as a LONGCHAR, but now the SOAP have a single "CDATA" node in the output parameter, instead of the structure, which means they now nead to import another API in the Android app to parse this "string" as an XML object.

Posted by Richard.Kelters on 19-Jul-2014 04:15

The way I would solve this 'problem' is define an 'operation' on the service with the static dataset definition and an 'operation' the expects a field list that supplies a dataset (subset of de static dataset) dynamically (dataset handle). This way the consumer can control the amount of data to recieve and knows what to expect based on the 'operation' with the complete static dataset definition.

This thread is closed