cancel
Showing results for 
Search instead for 
Did you mean: 

BPM: IDoc to multiple HTTP-Requests

roman_scholz
Explorer
0 Kudos

Hello!

I'm currently working on a scenario which is described as followed:

My XI-System is receiving an IDoc from an SAP R/3-System.

This IDoc contains a list of numbers together with the respective name of the customer an our internal customer number.

Structure:

IDoc
 |
 area01
   |
   |-NUMBER01
   |
   area02
     |
     |-NUMBER02
     |-CUSTNAME
     |-CUSTNUMBER

This IDoc has to be split up in HTTP-Request to a server in the WWW. Each HTTP-Request consists of an URL together with two specific parameters (eg: http://www.xyz.com?param1=P1&param2=P2, where param1 is NUMBER01 from the IDoc and param2 is NUMBER02)

I have two different problems:

First one is that my BPM is showing errors with the transformation step (IDoc to single HTTP-Requests). It shows the "Expression must return the interface type xxxx"-error. I have mapped the incomming-IDoc into a abstract interface IDoc, as described in other topics.

What is to be done, to convert the incooming IDoc into several HTTP-Requests? How can i solve this issue?

Second one is the HTTP-Request itself.

I've read the hints about the adapter specific settings and tried the HTTP-Request in a little "extra"-scenario. But it didn't work very well...I other words: It did nothing. How to map the two parameters to my specific HTTP-parameters?

If I have to describe something more detailed, please let me now. I appreciate any suggestions!

Many many thanks in advance,

Roman Scholz

Accepted Solutions (0)

Answers (2)

Answers (2)

udo_martens
Active Contributor
0 Kudos

Hi Roman,

>"Expression must return the interface type xxxx"-error.

The target of your interface mapping has to be the abstr interface used for BP container.

>What is to be done, to convert the incooming IDoc into several HTTP-Requests?

<a href="/people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure of Multi-Mapping and Message Split using BPM in SAP Exchange Infrastructure</a>

>How to map the two parameters to my specific HTTP-parameters?

<a href="http://help.sap.com/saphelp_nw04/helpdata/de/43/64dbb0af9f30b4e10000000a11466f/frameset.htm">Configuring the Receiver Plain HTTP Adapter</a>

Regards,

Udo

roman_scholz
Explorer
0 Kudos

Hi Udo,

"Expression must return the interface type xxxx"-error:

My silly mistake, already solved!

Your two hints:

Many thanks for that. I've already read these two articles more than twice, but probably I havn't read them as accurate as I should read them.

The first one doesn't describe the problem that I have exactly. There the incoming message is split into two different messages. Anyway, I try to do it in detail this way. I'll give you a short note, if i was successful.

Second hint: I have read this already, too. But in my opinion, there is not described, how to dynamically map one (or two) of my variables to the parameters of the HTTP-query-string.

But I'll try this again...from the beginning.

Thanks for your help so far.

Regards,

Roman

Former Member
0 Kudos

Hi Roman,

Coming to dynamically giving the values of number1 and number2 in the URL, perhaps you can capture the values for these two numbers and create the URL accordingly in your mapping, maybe define a small udf to create the url and save it as a field value for the target payload. then, all you will have to do after this is to pick up the value from this field using the adapter-specific attributes indicator.

Regards,

Roman

Former Member
0 Kudos

Hi Roman,

Since the URL is a query string, have you set the indicator <i>Use query string</i>?

"Expression must return the interface type xxxx"

This error generally occurs if you have specified the wrong container element in the transformation step...you shld have response container elements for the targets...also, check if you have defined your interafce mapping for two <b>abstract</b> interfaces...

Regards,

Sushumna

roman_scholz
Explorer
0 Kudos

Hi Sushumna,

the issue "Expression must return the interface type xxxx" was indeed a very silly mistace of me. I had specified many container elements and took the wrong interface mapping with the two wrong interfaces tilt

You got your points for that

The other problem with the HTTP-Request:

I don't know exactly what you mean with "User Query string"

where do I find this indicator?

Former Member
0 Kudos

Hi Roman,

If you want the http adapter to process the query string url that you are giving...with the param1=number1 and param2=number2...you will have to set conversion parameter <i>Use Query String</i> which can be seen in the receiver http adapter.

Regards,

Sushumna