ReadFromStream - how can I access the ClientID

I am trying to create a log for processing calls to my service -
I use ReadFromStream - the read the XML that comes in - I do this
using this function because I can track even malformed XML - my
problem right now is - if I later wan to add information to his “call” how
can I identify this dataset within the actual function that is called ?
Is there a way to get access to the ClientID at this point in time ?

Also - is there a way to store temp. session data to a specific call -
may in the message ?

Nils

Hi,

since xml string is usual string, you can add any info (like attribute or new node) to any position.

lets review XML request from the MegaDemo sample (formatting was added manually for better view):

<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:HNS="http://tempuri.org/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header>
    <HNS:ROClientID SOAP-ENV:mustUnderstand="0">{0A53DC54-AE0A-46BA-957C-916EAB206E5A}</HNS:ROClientID>
    <Test>1234</Test>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ro="http://tempuri.org/">
    <NS1:Sum xmlns:NS1="urn:MegaDemoLibrary-MegaDemoService">
      <A xsi:type="xsd:int">1</A>
      <B xsi:type="xsd:int">2</B>
    </NS1:Sum>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

you can get ClientID via cutting data between <HNS:ROClientID> and </HNS:ROClientID> tags with using usual string methods.

the same - you can use usual string methods and replace </SOAP-ENV:Header> with <mytag /></SOAP-ENV:Header>

Well,

this does not work - I am getting the XML from SAP PI/PO - the dataset does not contain a “valid” Client-ID - if I understand documentation correctly the ClientID is generated when the XML is parsed ?

Nils

Hi,

Not yet.
it is included into request and into response:


Note: it is valid for Remoting SDK client only.