Skip to Content
0

read multiple input payload using Java Mapping

Apr 09 at 10:10 AM

27

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Apr 09 at 11:01 AM
1

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.

Show 3 Share
10 |10000 characters needed characters left characters exceeded

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

0
Former Member

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.

0

Got it thanks a lot Stefan,

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

Warm Regards,

Rudra

0