ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Help retrieving Request String IWS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help retrieving Request String IWS

    I have created a Simple Test RPG Web Service to check out some things and i need some help.

    The entry parameters of my program are as follows.

    DEp1 1
    DEp2 1 0
    DEp3 likeds(Testds) DIM(99)
    DEp4 likeds(Testds2) DIM(99)
    DEp5 1
    DEp6 1 0
    DResponse_LENGTH 10i 0
    dResponse Likeds(Responseds) dim(99)
    dRequest...

    And

    dTestds ds qualified
    DEp3a 2
    DEp3b 2

    dTestds2 ds qualified
    DEp4a 2
    DEp4b 2

    dResponseds ds qualified
    DCode 7
    DDescription 50


    My program is working as expected from soapUI but now my requirement is to log the request string calling the program.

    <REQUEST>
    <EP1>a</EP1>
    <EP2>2</EP2>
    <EP3>
    <EP3A>B</EP3A>
    <EP3B>3</EP3B>
    </EP3>
    <EP3>
    <EP3A>C</EP3A>
    <EP3B>9</EP3B>
    </EP3>
    <EP4>
    <EP4A>YY</EP4A>
    <EP4B>NN</EP4B>
    </EP4>
    <EP5>T</EP5>
    <EP6>3</EP6>
    </REQUEST>

    I cannot seem to retrieve it inside my RPG program as at entry the data structure is just populated and i cannot find it in any of the logs on IWS.

    The only this i can think of now is to Rebuild the request string based off of the populated entry Parameters which does not seem viable as i will miss additional tags and incorrect tags.
    But also can get tedious with larger XML strings.

    Is there anyway to get the original request sting?
    if not is there maybe a "reverse" XML-INTO that will move a data structure into a XML String using the field names as tags?
Working...
X