on 08-19-2008 4:37 PM
I have an XI web service I am utilizing via the Adaptive Web Service Model. This service requires that I send some input parms. I'm not quite sure how to get the parms into the request object. I reviewed the tutorial and the bugger doesn't do that via code but instead does it via mapping context to view context.
Here is my Context node in the component controller
Context
Request_SelectEmployeeTime
EmployeeTime_Select
SELECT
EMPLID
$0023SimpleContent
Response
EmployeeTime_Data
Statement_Response
Row
ATTIO_FLG
ATTNC_TS
DEVICE
EMPLID
POST_LOC
REVD_BY
REVD_TS
Code I have so far is
Request_EmployeeTime_Select_Sync_OB requestMO = wdContext.currentRequest_SelectEmployeeTimeElement().modelObject();
requestMO.wdSetInvocationLogEnabled(logger.beDebug() ? true : false);
try
{
wdContext.nodeRequest_SelectEmployeeTime().bind(requestMO);
wdContext.currentRequest_SelectEmployeeTimeElement().modelObject().execute();
wdContext.nodeResponse().invalidate();
wdComponentAPI.getMessageManager().reportSuccess("Executed and invalidated " + String.valueOf(wdContext.nodeRow().size()));
}
.....
Any guidance is appreaciated!
Diane
Edited by: Diane Fuller on Aug 19, 2008 10:38 AM
Ok Here is what I had to do. I had to create objects for each level. Then each object had to be set into the next higher up object in my chain. Several of the objects were lists (allowing me to create several keys to make complex where clauses see http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
Request_EmployeeTime_Select_Sync_OB requestMO =
wdContext.currentRequest_SelectEmployeeTimeElement().modelObject();
EmployeeTime_Select EmployeeTime_SelectMO = new EmployeeTime_Select(model);
SELECT selectMO = new SELECT(model);
EMPLID emplIdMO = new EMPLID(model);
// TODO hardcoded person 60617
emplIdMO.set$0023SimpleContent("60617");
wdComponentAPI.getMessageManager().reportSuccess("About to get do WS for "
+ emplIdMO.get$0023SimpleContent());
listEmpl.add(emplIdMO);
selectMO.setEMPLID(listEmpl);
listSelect.add(selectMO);
EmployeeTime_SelectMO.setSELECT(listSelect);
requestMO.setEmployeeTime_Select(EmployeeTime_SelectMO);
requestMO.wdSetInvocationLogEnabled(logger.beDebug() ? true : false);
try
{
wdContext.nodeRequest_SelectEmployeeTime().bind(requestMO);
wdContext.currentRequest_SelectEmployeeTimeElement().modelObject().execute();
wdContext.nodeResponse().invalidate();
}
catch(Exception ex)
{
wdComponentAPI.getMessageManager().reportException(ex.getLocalizedMessage(), true);
this.traceWSInvocation(requestMO, ex);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If i understand you want to fill the params without user input, right?
If yes, you can set the parameter requestMO object. Probaly exist a set<YourParameter> method.
Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.