cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP_AAE receiver Adapter using POST - Java mapping necessary?

JaySchwendemann
Active Contributor
0 Kudos

Dear all,

I have a scenario 3rd Party (SOAP) --> PI --> SAP BW (HTTP) with PI 7.4 AEX SP 7 so I have to use HTTP_AAE (or maybe SOAP) adapter for this.

BW expects URL style field - values in body like so


&Language=DE&BI_COMMAND_2-RESULT_SET=X&TEMPLATE=Z_OURTEMPLATE&BI_COMMAND_2-TARGET_DATA_PROVIDER_REF=CSS_001_DP_1&...

I have read some posts here but most of them are for GET consuming rest-like services. I however found this excellent blog (page 22) which describes in detail how to set up http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80104882-c7a8-2f10-c3a3-81f182917...

However, this blog dates back to  2012 and does use plain HTTP adapter of Integration Engine, something I don't have as an option, obviously.

So my question is:

Do I still need to opt for java mapping or is there a more elegant solution nowadays?

Many thanks and kind regards

Jens

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Jens,

Thank you for reading my blog It should work with the HTTP_AAE, yes you will still need java mapping to build the http body using either the HTTP_AAE or SOAP Adapter.

Regards,

Mark

JaySchwendemann
Active Contributor
0 Kudos

Hi Mark,

your devotion to SCN and PI place is really fantastic and there were so many times that I participated from your knowledge and willingness to share, so I'd like to take the chance to say "Thank you" by this thread

But back to topic :

I tried to get this working yesterday and finally succeeded to some degree. I must confess that I hesitated to opt for Java mapping as I never done this before, so I gave XSLT mapping a try and it seems working.

This is my input (simplified)


<?xml version="1.0" encoding="UTF-8"?>

<ns0:Customer xmlns:ns0="http://customer.example.com">

<CustomerNumber>490005</CustomerNumber>

</ns0:Customer>

This is the desired output (simplified)


&someArbitraryUrlParam=someSenslessValue&custNoUrlParam=490005

This is the XSLT (of course also simplified)


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://customer.example.com">
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>

<xsl:template match="/ns:Customer">
  <xsl:text disable-output-escaping="yes">&amp;someArbitraryUrlParam=someSenslessValue&amp;custNoUrlParam=</xsl:text>
  <xsl:value-of select="./CustomerNumber"/>
</xsl:template>

</xsl:stylesheet>

Fortunatelly I'll get back normal XML so mapping the response isn't a hassle at all 🙂

Any drawbacks using XSLT except the obvious lesser possibilities to influence the result when comparing against Java mapping?

Many thanks and kind regards

Jens

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Jens,

You're welcome! I answer here a lot because I wanted to give back what I also learned in SCN. You've also contributed a lot, so thank you too

Personally, I don't use xslt at all just because the whole document is loaded into memory before operations are made e.g via xpath. As far as I know, XSLT performance degrades exponentially as the payload size increases, but if you are sure that the returned XML <5MB, XSLT will be faster.

There was a document before here in SDN that compares the performances of the different types of mappings, but that was on XI 3.0. Of course, we have a lot of improvements now and that document needs to be updated too.

Regards,

Mark

engswee
Active Contributor
0 Kudos

I think the document that Mark talked about is this one below. It is from Dec 2008 but valid up to PI 7.1x.

If you look at section 3 onwards, it mentions about the pros and cons of each mapping type. In general XSLT performance prior to PI 7.1 was not that great because it was using the SAP XML Toolkit.

From 7.1 onwards, it is recommended to use the JDK instead, which is also highlighted in the online help.

XSLT Mapping - Managing Services in the Enterprise Services Repository - SAP Library

Performance on the JDK is claimed to be faster, but I haven't seen any official document with some numbers to back that up.

JaySchwendemann
Active Contributor
0 Kudos

Thanks a heap, Eng Swee.

I opted for XSL for now as resulting XML should be quite small and performance is not a main concern with that process.

Anyways, great (new) information on performance of Java mapping overall (generally seems to be fastest) and different performance implications when using JDK vs XML Toolikt.

Many thanks for collecting all the informations.

Cheers

Jens

JaySchwendemann
Active Contributor
0 Kudos

Just adding here that I was in bit of a catch-22 here. Mark gave the hint to the solution first but Eng Swee added some valuable information / links to that.

I had to pick one so I opted for Eng Swee, no offence meant but I suppose you could bear the misssing 10 pts, Mark

Cheers

Jens

engswee
Active Contributor
0 Kudos

LOL, Jens!

I hope I didn't steal the limelight away from Mark's answer. It just so happened that I knew which document that he was referring to, so I thought I'd help out a bit there - wasn't meant to steal his thunder

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Jens,

Lol, it is okay. It will still be the prerogative of the op

Regards,

Mark

Answers (1)

Answers (1)

engswee
Active Contributor
0 Kudos

Hi Jens

I think the plain HTTP adapter had a limitation of having 6 parameters in the dynamic URL part. From the link below, I think HTTP_AAE inherited the same limitation.

Configuring the Java HTTP Adapter on the Receiver Channel - Advanced Adapter Engine - SAP Library

Your system is just 2 SPs away from being able to support the new REST adapter. I'd give the same recommendation as I gave in the thread below - try and upgrade to get REST as it is superior in HTTP scenarios.

Re: Dynamic URL in HTTP_AAE PO 7.40

If you can't upgrade, maybe you can check out the below.

Rgds

Eng Swee

Message was edited by: Eng Swee Yeoh

engswee
Active Contributor
0 Kudos

I thought I had edited my message earlier to add the following, but not sure why it's missing now.

Anyway, if you can't get on REST, you can check out the following if you need more than 6 parameters.

JaySchwendemann
Active Contributor
0 Kudos

Hi Eng Swee,

about the 6 URL parameters of HTTP_AAE:

Right, there are only six parameters you may set up with support of the GUI (NWDS or IB). However, I'm in a Post scenario and fortunatelly do not neet to built the URL itself dynamically, only the body is dynamic and in a form style fashion. So no need for ASMA and dynamic configuration / URL parameters this time (*lucky me*)

Probably my expression "BW excpects URL style field -values in body" was somewhat missleading. Sorry for that.

BTW, reading this note http://service.sap.com/sap/support/notes/1742088 it seems that limitation of only 6 URLs is gone by now. See http://service.sap.com/sap/support/notes/1873415 (but didn't actually try)

about REST adapter:

sure promising. I'm eager to give that one a spin, I must confess. However, no resources currently to update, maybe somewhere in  Q2 or Q3 this year. But will definitely give this a try as soon as we are on SP 9 or greater.

Thanks a lot for your help so far

Cheers

Jens

PS: Congrats for platinum badge 🙂

JaySchwendemann
Active Contributor
0 Kudos

Great catch, as always. see below also about the note 1873415 which seems to officially document that this is supported.

Not sure about the namespace "http://sap.com/xi/XI/System/HTTP" in your linked thread, though. We use "http://sap.com/xi/XI/System" for HTTP_AAE adapter (at least for setting keys like URLParamOne), so one may need to adjust accordingly

There's of course again a note http://service.sap.com/sap/support/notes/1958747 for completely puzzling everybody about that matter where you can force "http://sap.com/xi/XI/System/HTTP_AAE" by using advanced --> additional parameters "treatNSWithHTTP"

Cheers

Jens

engswee
Active Contributor
0 Kudos

Hi Jens


BW expects URL style field - values in body like so

Yes, that line above started me on the wrong track but no worries about that!

Anyway, thanks for sharing those two notes. It does look like on paper the limitation is gone now on the HTTP_AAE. On a side note, it's really frustrating that SAP keeps all this extra information buried in SAP Notes when it would have been more beneficial if they update the online SAP Library documentation It's also not even mentioned on the release notes of 7.4 SP05

Rgds

Eng Swee

PS: Thanks for noticing

JaySchwendemann
Active Contributor
0 Kudos

Yeah, that also bothers me constantly. There's so often a gap between help.sap.com and what's currently supported by various SP levels or notes. You'll allways have to check both and hope you are even finding the note if it exists.

Anyways, SCN and a decent search engine seems to help easing that pain to some degree

engswee
Active Contributor
0 Kudos

Arrghhhh... not another SAP Note!!!!

PS: Nice comment on . I enjoy reading his responses too which quite often are out-of-the-box thinking and therefore provides refreshing perspectives