AIS testing using SOAP

johndanter

johndanter

Legendary Poster
Hi folks,

I'm totally new to this, so bare with me. I have seen posts on a similar topic but......

I've connected the server and tested the endpoint that gets your token and user credentials /jderest/tokenrequest. works fine
But then how do I use token this in another call such as /jderest/formservice

Because if I call the formservice on it's own I am told to get a token :) "message": "Invalid Token: Please Request a New Token",

Is it I need to create a testsuite with steps or something?
Do I need to request a token? Or is there a way of using other endpoints and getting them to get the token etc

Also....How do you guys go and get the controlID? what tools are you using to work out your FC Short Item Number for example is controlID 6??
JDE Object Browser from Craig? Or just plain old FDAs Property Browser?

Thanks

John
 
Last edited:
Some of your answers will depend on your tools release. AIS/Orchestrator have been and continue to get regular updates.

You need to put the generated token into the body of the call along with the form request details. Alternatively, you would not use tokens and put your user ID and password into basic authentication in the message header. This does mean that every call would login/logout while that is not the case for using a token.

Check if your release supports Process Recorder, if it does, use it, it much easier than handcrafting form requests.
If I didn't have access to Process Recorder I'd use FDA, that's my personal preference. If you turn on the status bar you can see the control ID at the bottom right.


Good luck!
 
Hi Trevor,

Hope you're keeping well?
I don't have orchestrator as I'm on E900 TR 9.1.5.3 on Unix. That should be in my signature but it looks like it's not in my post above for some reason.

I'll have a beterr play later, sad thing is I can't have a dedicated focus on this as I keep flitting in between other jobs :(
 
If you run the application in JDE click in the control and use F1 to pull up the Help. Under advanced it tells you what the control ID is.
 
Hi John

Another blast from the past eh? Glad to see that you're keeping JDEList alive :).

As Trevor says, you'll need to pass the token into the JSON body of your formservice request. Here's an example:

{
"token": "044jxy8ay3BWBQpe+dt9iQwxG8FBPZ5CUo7XIa9zm1tiKA=MDE5MDA2Mzk4MzYwNDg3Mjc0MjM0NDI4OXNvYXBVSTE1NjU3MjU2MTM4NTE=",


"formInputs":[
{
".type":"com.oracle.e1.jdemf.FIStructure",
"id":"1",
"value":"TEST"
},
{
".type":"com.oracle.e1.jdemf.FIStructure",
"id":"2",
"value":"ABC"
},
{
".type":"com.oracle.e1.jdemf.FIStructure",
"id":"3",
"value":"DEF"
},
{
".type":"com.oracle.e1.jdemf.FIStructure",
"id":"5",
"value":"123"
}
],
"formActions": [


{
"command": "DoAction",
"controlID": "15"
}
],


"formServiceAction": "R",
"deviceName": "soapUI",
"formName": "P554050_W554050C"
}

This FSR passes a bunch of values into the form interconnects and presses the Find button.

You can see the control ids in FDA, but another good way to get the control ids is using the demo mode for the FSR, by setting formServiceDemo = true, eg:

{
"token": "044H/QAioh+QtQNk0C6HuIZ/0VUc8bIO9ui7RFAG5yMHRw=MDE5MDA2NDkyNDI2NTYxODI1OTQ1NjIyOHNvYXBVSTE1NjcwMDM3MDE3MDE=",
"formServiceAction": "R",
"deviceName": "soapUI",
"formName": "P554050_W554050C",
"maxPageSize": "500",
"formServiceDemo": "true",
"formActions": [
{
"command": "DoAction",
"controlID": "133"
}
]
}

Take a look at the AIS Server API documentation for more info: https://docs.oracle.com/cd/E53430_01/EOTRS/op-formservice-post.html

Dave Harrison
 
Hey Dave, how are you?

I've tried this but it still says I require a new token. My other work is dying down so hopefully next week I'll get more of a chance to focus on this for a few days rather than dipping in and out
 
Hi John

Another blast from the past eh? Glad to see that you're keeping JDEList alive :).

As Trevor says, you'll need to pass the token into the JSON body of your formservice request. Here's an example:

{
"token": "044jxy8ay3BWBQpe+dt9iQwxG8FBPZ5CUo7XIa9zm1tiKA=MDE5MDA2Mzk4MzYwNDg3Mjc0MjM0NDI4OXNvYXBVSTE1NjU3MjU2MTM4NTE=",


"formInputs":[
{
".type":"com.oracle.e1.jdemf.FIStructure",
"id":"1",
"value":"TEST"
},
{
".type":"com.oracle.e1.jdemf.FIStructure",
"id":"2",
"value":"ABC"
},
{
".type":"com.oracle.e1.jdemf.FIStructure",
"id":"3",
"value":"DEF"
},
{
".type":"com.oracle.e1.jdemf.FIStructure",
"id":"5",
"value":"123"
}
],
"formActions": [


{
"command": "DoAction",
"controlID": "15"
}
],


"formServiceAction": "R",
"deviceName": "soapUI",
"formName": "P554050_W554050C"
}


This FSR passes a bunch of values into the form interconnects and presses the Find button.

You can see the control ids in FDA, but another good way to get the control ids is using the demo mode for the FSR, by setting formServiceDemo = true, eg:

{
"token": "044H/QAioh+QtQNk0C6HuIZ/0VUc8bIO9ui7RFAG5yMHRw=MDE5MDA2NDkyNDI2NTYxODI1OTQ1NjIyOHNvYXBVSTE1NjcwMDM3MDE3MDE=",
"formServiceAction": "R",
"deviceName": "soapUI",
"formName": "P554050_W554050C",
"maxPageSize": "500",
"formServiceDemo": "true",
"formActions": [
{
"command": "DoAction",
"controlID": "133"
}
]
}


Take a look at the AIS Server API documentation for more info: https://docs.oracle.com/cd/E53430_01/EOTRS/op-formservice-post.html

Dave Harrison
Omg....this is nutz
 
Back
Top