on 08-25-2016 4:25 PM
Hello Experts,
I have checked many posts on context handling, and I am not able to solve this.
Requirement:
Source Structure
RootNode
Worker ............................ 1. unbounded
WorkerSummary........1.1
WID
EffectiveChange..........1..unbounded
F1
F2
This is my source structure, there is requirement I have get SOAP Response in UDF using SOAP LookUP. After my Response I have 2 validations in UDF and final Output Need to be populatedout.
Now let suppose 6 records(Effective Change - EC) coming in and after UDF validation we have 4 records(EC) matched, now I have send 4 records to target structure.
I am able to create target Nodes as per my requirement. but not able populate respective Field values(F1) to them. because Context mismatch.
Worker
WorkerSummary
WID
EffectiveChange
F1
F2
EffectiveChange
F1
F2
Worker
WorkerSummary
WID
EffectiveChange
F1
F2
.
.
.
.
In Detail....
I have 4 workers with 6 Effectivechange nodes in my structure .....after UDF validation target structure had 3 workers and 4 EffectiveChange nodes.
F1 Values are 6 .....but Target need only 4.
I am not able to send 4F1 values to respective Target fields . Kindly help.
Thanks in Advance.
Kumar
Hi Kumar,
You need to suppress other two F1 values which you dont want.
Post the input XML and out XML what you expecting then it will be easy to help you.
Regards,
Praveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Praveen,
Detailed Input and Output:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_EmployeeRAASReq xmlns:ns0="urn:LafargeHolcim.com:HR:TestEmployee">
<Workers_Effective_Stack>
<Summary>
<PayGroupID/>
</Summary>
<Worker>
<Worker_Summary>
<WID>10010543</WID>
</Worker_Summary>
<Effective_Change>
<Derived_Event_Code>Worker1EC1</Derived_Event_Code>
<Effective_Moment>2015-06-01T10:00:00.000-07:00</Effective_Moment>
<Entry_Moment/>
<Worker_Status>
<HireReason>AO</HireReason>
</Worker_Status>
</Effective_Change>
<Effective_Change>
<Derived_Event_Code>Worker1EC2</Derived_Event_Code>
<Effective_Moment>2015-06-01T60:00:00.000-07:00</Effective_Moment>
<Entry_Moment/>
<Worker_Status>
<HireReason>BO</HireReason>
</Worker_Status>
</Effective_Change>
</Worker>
<Worker>
<Worker_Summary>
<WID>10010553</WID>
</Worker_Summary>
<Effective_Change>
<Derived_Event_Code>Worker2EC1</Derived_Event_Code>
<Effective_Moment>2015-06-01T10:00:00.000-07:00</Effective_Moment>
<Entry_Moment/>
<Worker_Status>
<HireReason>CO</HireReason>
</Worker_Status>
</Effective_Change>
</Worker>
<Worker>
<Worker_Summary>
<WID>10010563</WID>
</Worker_Summary>
<Effective_Change>
<Derived_Event_Code>Worker3EC1</Derived_Event_Code>
<Effective_Moment>2015-06-01T10:00:00.000-07:00</Effective_Moment>
<Entry_Moment/>
<Worker_Status>
<HireReason>DO</HireReason>
</Worker_Status>
</Effective_Change>
<Effective_Change>
<Derived_Event_Code>Worker3EC2</Derived_Event_Code>
<Effective_Moment>2015-06-01T60:00:00.000-07:00</Effective_Moment>
<Entry_Moment/>
<Worker_Status>
<HireReason>EO</HireReason>
</Worker_Status>
</Effective_Change>
</Worker>
<Worker>
<Worker_Summary>
<WID>10010573</WID>
</Worker_Summary>
<Effective_Change>
<Derived_Event_Code>Worker4EC1</Derived_Event_Code>
<Effective_Moment>2015-06-01T10:00:00.000-07:00</Effective_Moment>
<Entry_Moment/>
<Worker_Status>
<HireReason>FO</HireReason>
</Worker_Status>
</Effective_Change>
</Worker>
</Effective_Change>
</Worker>
</Workers_Effective_Stack>
</ns0:MT_EmployeeRAASReq>
Output : For output we are calling SOAP Look Up and check records with 2 Validations and finally add the WebserviceResp at same level of Effective_Change Node.
excepted output after my validations I have 3 workers with 4 Effective change nodes. Now I am able to create Workers and Effective changes as per target structure, but respective values I am not able to sent. ex. for this field Derived_Event_Code.Problem is Context.
<ns0:MT_EmployeeRAASReq xmlns:ns0="urn:LafargeHolcim.com:HR:TestEmployee">
<Workers_Effective_Stack>
<Summary>
<PayGroupID/>
</Summary>
<Worker>
<Worker_Summary>
<WID>10010543</WID>
</Worker_Summary>
<Effective_Change>
<Derived_Event_Code>Worker1EC1</Derived_Event_Code>
<Effective_Moment>2015-06-01T10:00:00.000-07:00</Effective_Moment>
<Entry_Moment/>
<Worker_Status>
<HireReason>AO</HireReason>
</Worker_Status>
</Effective_Change>
<WebserviceResp>
<WBF1>Response value1</WBF1>
</WebserviceResp>
</Worker>
<Worker>
<Worker_Summary>
<WID>10010553</WID>
</Worker_Summary>
<Effective_Change>
<Derived_Event_Code>Worker2EC1</Derived_Event_Code>
<Effective_Moment>2015-06-01T10:00:00.000-07:00</Effective_Moment>
<Entry_Moment/>
<Worker_Status>
<HireReason>CO</HireReason>
</Worker_Status>
</Effective_Change>
<WebserviceResp>
<WBF1>Response value1</WBF1>
</WebserviceResp>
</Worker>
<Worker>
<Worker_Summary>
<WID>10010563</WID>
</Worker_Summary>
<Effective_Change>
<Derived_Event_Code>Worker3EC1</Derived_Event_Code>
<Effective_Moment>2015-06-01T10:00:00.000-07:00</Effective_Moment>
<Entry_Moment/>
<Worker_Status>
<HireReason>DO</HireReason>
</Worker_Status>
</Effective_Change>
<Effective_Change>
<Derived_Event_Code>Worker3EC2</Derived_Event_Code>
<Effective_Moment>2015-06-01T60:00:00.000-07:00</Effective_Moment>
<Entry_Moment/>
<Worker_Status>
<HireReason>EO</HireReason>
</Worker_Status>
</Effective_Change>
<WebserviceResp>
<WBF1>Response value3</WBF1>
</WebserviceResp>
<WebserviceResp>
<WBF1>Response value4</WBF1>
</WebserviceResp>
</Worker>
</Workers_Effective_Stack>
</ns0:MT_EmployeeRAASReq>
Regards,
Kumar
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.