Quantcast
Channel: SCN : Unanswered Discussions - SAP for Mobile
Viewing all articles
Browse latest Browse all 5512

REST service mbo: send object array in request

$
0
0

Hi,

 

i've created a mbo from a REST service data source. The mbo contains attributes of several simple data types and one attribute of a complex type (object that holds a string and an integer value) which can occur 0 to many times.  In the 'Load Arguments' tab this measurement object is declared correctly as an array data type (Measurement[]).

Now i want to programmatically send a request with an arbitrary number of measurements within the Fingerprint object. The problem is, i don't know which attribute key name to set inside a MessageValue object, in order to add measurements to the current message value collection. SUP generates a mbo with 2 entities connected with a relationship link (Fingerprint -> Measurement), but i can use only one of them for an online request. So the attribute key names are only available for the Fingerprint mbo. Here is the schema of the request, the REST service expects as an input argument:

 

 

<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">  <xs:element name="Fingerprint">    <xs:complexType>      <xs:sequence>        <xs:element ref="date"/>        <xs:element ref="building"/>        <xs:element ref="room"/>        <xs:element ref="locationId"/>        <xs:element ref="macAddress"/>        <xs:element ref="ipAddress"/>        <xs:element ref="networkId"/>        <xs:element ref="linkSpeed"/>        <xs:element maxOccurs="unbounded" ref="measurements"/>      </xs:sequence>    </xs:complexType>  </xs:element>  <xs:element name="date" type="xs:dateTime"/>  <xs:element name="building" type="xs:string"/>  <xs:element name="room" type="xs:string"/>  <xs:element name="locationId" type="xs:integer"/>  <xs:element name="macAddress" type="xs:string"/>  <xs:element name="ipAddress" type="xs:integer"/>  <xs:element name="networkId" type="xs:integer"/>  <xs:element name="linkSpeed" type="xs:integer"/>  <xs:element name="measurements">    <xs:complexType>      <xs:sequence>        <xs:element ref="bssid"/>        <xs:element ref="signal"/>      </xs:sequence>    </xs:complexType>  </xs:element>  <xs:element name="bssid" type="xs:string"/>  <xs:element name="signal" type="xs:integer"/></xs:schema>

 

 

Regards,

Bishara


Viewing all articles
Browse latest Browse all 5512

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>