cancel
Showing results for 
Search instead for 
Did you mean: 

read multiple input payload using Java Mapping

Former Member
0 Kudos

Hi All,

I have requirement where I need to need multiple input payload and if payload are valid XML or not.

If Payload are valid XML then based on root nodes , I have to generate different XML files with different Namespace.

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_grube
Active Contributor

You could create a service interface with different operations. An operation is identified by the root node, so the message type corresponding to the operation must have the root node name.
You can do this with graphical mapping, there is no need to use Java mapping.
Create a different graphical mapping for each operation.

Former Member
0 Kudos

Hi Stefan,

so sender interface is having capability to identify proper XML if we are giving operation similar as root node name. ?

for example - input payload is having Emp.xml , Student.xml with Emp and Student root node then I have to give operation name as Emp and Student in Sender operation ?.

Warm Regards,

Rudra

stefan_grube
Active Contributor
0 Kudos

Not the operation name, the message type name is used for root name.
So you can have a sender interface with operations Emp and Student which refer to the message types with same name.
In the message type you have to set XML namespace accordingly. If the input payload do not have namespace, then the XML namespace of the message type should be cleared.

Former Member
0 Kudos

Got it thanks a lot Stefan,

Let me try this, I will let know you once done.

Warm Regards,

Rudra