Hi All,
I want to map employee id to employeeId. I have done mapping in straight way employee id to employeeId. but I always receives only one id. when multiple employee records are pushed, I receive only one employee id field, remaining employee details comes without id.
How to map properly to get all the employee info with id field.
current mapping is
id ----> employeeId (do I have to add any context or how to map in a right way?)
My Input xml
<Sales>
<employee>
<id>101</id>
<name>XDG</name>
<dept>4XR1</dept>
</employee>
</Sales>
<Sales>
<employee>
<id>102</id>
<name>XDG</name>
<dept>4XR1</dept>
</employee></Sales>
<Sales>
<employee>
<id>103</id>
<name>XDG</name>
<dept>4XR1</dept>
</employee>
</Sales>
My expected output xml
<EmployeeRequest>
<Employee>
<employeeId>101</employeeId>
</Employee>
</EmployeeRequest>
<EmployeeRequest>
<Employee>
<employeeId>102</employeeId>
</Employee>
</EmployeeRequest>
<EmployeeRequest>
<Employee>
<employeeId>103</employeeId>
</Employee>
</EmployeeRequest>
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hello Ansari,
Please check the occurrence of the target node it should be unbounded shown like below.

Below Target XSD might help you ( I have created based on your input and output payload ).
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="EData">
<xs:complexType>
<xs:sequence>
<xs:element name="EmployeeRequest" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Employee">
<xs:complexType>
<xs:sequence>
<xs:element name="employeeId" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sriprasad,
My actual business scenario is USERID_LONG to Identity Id mapping in Replicate Employee to SAP Business Suite ( ERP -> C4C )

for the above mapping I receive the following payload without identity id. identity id received only for first element.

Please help me out. Please note that Employee Replication request from ERP contains more than one employee record and the mapping between useridlong and identity id field works only for the first record and fails for the subsequent record.
Thanks in Advance
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.