cancel
Showing results for 
Search instead for 
Did you mean: 

One inbound HTTP interface to accept multiple XML message types

Former Member
0 Kudos

We want to setup an inbound HTTP interface that can accept multiple XML messages, all of a different type and be able to route to the appropriate mapping based on some element in the XML, most likely the opening tag name that contains the message name. This is necessary because our partner can only accept one URL to send different XML messages to so we need a way to branch accordingly in XI.

I would like to see this work similar to the /invoke/wm.tn/receive listener that webMethods uses to accept inbound messages from partners. You can send any message type to it and it knows how to route accordingly. Is there an easy way to replicate this feature in XI?

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

Your request is a standard feature in PI 7.1.

In PI 7.0 you need as work around a pre-mapping with Java code or XSLT which transfers the incoming structure to a generic structure, where you can use the graphical mapping.

Regards

Stefan

Former Member
0 Kudos

Thanks Stefan

Can you provide more information on the standard feature that's part of PI 7.1?

stefan_grube
Active Contributor
0 Kudos

In PI 7.1 an interface can have several operations. Each operation is defined by a different message type, so the message structure is different.

For your request you define an interface with an opereration for each message structure. The operation is defined by the root tag of the message.

The receiver determination and the mapping is now based on that operation.

So all the messages can be send to the same URL, where you only define the interface, the operation name (and the related mapping) is taken from the root tag of the message.

There are some weblogs about service interfaces and operations, you may search for them.

Regards

Stefan

Former Member
0 Kudos

You can define one URL for inbound interface.

e.g http://host:80<instance no>/sap/xi/adapter_plain?namespace=<namespace>&interface=<interface>&service=<service>&qos=BE/EO

Define one interface to accept different xml messages and multiple message types(M1,M2....) and interface mappings(IM1, IM2... ) for all message types.

Define conditions in interface determination based on root tag i.e. messagetype received.

If /<M1> EX ---> call interface mapping IM1

if /<M2> EX ---> call interface mapping IM2

Thanks,

Beena.

Former Member
0 Kudos

Thanks Beena,

Your answer makes sense but I don't see anywhere in the interface determination that allows for condition specific mapping as you would do with receiver determination. Are you referring to the enhanced mapping option?

former_member181962
Active Contributor
0 Kudos

NO, there is an option of dynamic/conditional interface determination also, just as we have the option of conditional receiver determination.

YOu would not see it in Display mode of the Interface determination.

In EDIT mode, if you add a new line and specify the condition on which a specific interface mapping is fired.

Regards,

Ravi

Former Member
0 Kudos

Maybe im missing something or on the wrong version of XI.

In the Integration Directory when looking at the Interface Determination screen under configured inbound interfaces in Edit mode, I see no place to specify a condition. You specify an inbound interface and a corresponding interface mapping. I can add multiple interfaces but I see nowhere to put a condition.

Former Member
0 Kudos

click save and you should see the condition editor appear... make sure you save with both interfaces though

Former Member
0 Kudos

Hi,

Check this link.

[http://help.sap.com/saphelp_nw70/helpdata/en/42/ea20e737f33ee9e10000000a1553f7/content.htm]

In standard Interface Determination add another interface using insert line button and you will see condition editor.

Thanks,

Beena.

Former Member
0 Kudos

thanks to everyone for their assistance... i now see the condition editor..

the next issue is that I followed Beena's steps, "Define one interface to accept different xml messages and multiple message types(M1,M2....) and interface mappings(IM1, IM2... ) for all message types."

here's where I'm stuck now...

I created one MI(Message Interface) called MI_Listener but I'm only able to specify one output message to it. If I try to use this in the interface determination as the Interface, I can only work with the specific XML structure I put in the MI definition. This won't work as the XML that comes in will be of different types. I have the multiple Interface Mappings and Message Mappings already built.

I guess I need to understand how to ""Define one message interface to accept different xml messages"

Thanks in advance..

Former Member
0 Kudos

Yes. You can define only one message type for one interface and that's why I told you to create one generic message type and specify in message interface.

However, XI doesn't validate the messge type specified in message interface with the source xml.

So if you specify message type MG in interface but send source xml as M1, It will first do receiver determination and then interface determination.

In interface determination it will check the condition (if M1 exists),

If the condition is satisfied, it will execute the interface mapping for M1 to target message.

So there is no validation with the generic message type in message interface.

I have a scenario where I call 14 different RFCs based on the input xml and it is working fine.

Thanks,

Beena.

Former Member
0 Kudos

Thanks Beena, I was about to post that I discovered exactly what you mentioned.

I now need to figure out the XPATH expression to do the correct selection and I'm good to go. Thanks so much!!!

I awarded everyone who helped out points.

Former Member
0 Kudos

Use left operand as message type and operator as EX in condition editor

Thanks,

Beena.

Answers (0)