cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with SOAP Receiver, Dynamic Configuration / URL, using HTTPS

Former Member
0 Kudos

Hi all,

I've been researching and troubleshooting this quite a bit from posts here on the SDN but not making much headway. I'm hoping someone can help me out with this.

My scenario is I have an interface that ends up at a SOAP receiver that needs to redirect the payload to a Sender SOAP channel. In the end, I need to do this dynamically, and this is where I'm hitting a wall.

Here's what works, configuration for the SOAP receiver channel. This will take an incoming payload and redirect it to a given SOAP Sender. There is a simple MM prior:

- Adapter type: SOAP 7.01 version

- Message Protocol: SOAP 1.1

- Adapter Engine: Integration Server

- Target URL: https://<myserver>:52201/XISOAPAdapter/MessageServlet?channel=:LMP_D:LMP_SOAP_Out_02

- Aside: I also do a PayloadSwapBean in the module, but should not matter. Only mentioning for full disclosure

This does successfully redirect the payload to a SOAP sender which processes it through without issue.

So I took the next step to set the TargetURL dynamically: The following are the additional mods:

1) UDF in the message map to set the TServerLocation


DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP", "TServerLocation");
conf.put(key,varURL);

2) In the SOAP Receiver:

- Target URL set to "https://" without the quotes

- Advanced Tab, check 'Use Adapter Specific Message Attributes' and 'Variable Transport Binding'

Addtl info to the above:

- varURL in the UDF is a passed in variable and has the same value as the initial static TargetURL in the comm channel (https://<myserver>:52201/XISOAPAdapter/MessageServlet?channel=:LMP_D:LMP_SOAP_Out_02)

- New targetURL value of "https://" is because the URL I am sending is also a https one and these must match per SDN posts I have seen

When I execute this using the same data I see:

1) SXI_MONITOR is successful and there is a Dynamic Configuration node with the values:


<SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
  <SAP:Record namespace="http://sap.com/xi/XI/System/SOAP" name="TServerLocation">https://<myserver>:52201/XISOAPAdapter/MessageServlet?channel=:LMP_D:LMP_SOAP_Out_02</SAP:Record> 
  <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">DE4_SC-INT-2076_20111003.xml</SAP:Record> 
  </SAP:DynamicConfiguration>

2) An error in the RTB Adapter Monitor saying:

"invalid content type for SOAP: TEXT/HTML; HTTP 401 Unauthorized: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 401 Unauthorized"

So it seems like the dynamic config is being set as I expect, and the value identical to the harcoded TargetURL successful execution. I don't understand the error I am getting with the 401 message given the data is identical to the prior successful run and it should be the same URL.

As I said, I've done a lot of reading and testing with the SDN posts. <<Text Removed>>, but not link spamming

Thanks for the help!

Edited by: Matt on Oct 5, 2011 9:37 AM

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello Darin,

Your scenario is interesting. Since your error is 401, this is related to a credential issue. There was a bug in PI such that once you use dynamic configuration for your URL, the username needs to be also included in the dynamic config. The technical name for the username in the UDF is TAuthKey. You set the password in the SOAP receiver communication channel by going Advanced Tab -> Variable Transport Binding -> View Authorization Keys.

Standard SOAP sender in PI requires you to still provide a username/password even if you are using SSL. Make sure that the username is existing in PI and has the necessary authorization. For now, try inputting your PI username and password.

Hope this helps,

Mark

Former Member
0 Kudos

Not only did that help Mark, that resolved the issue. And as my recently moderator edited post will attest I can not promise you points, so instead I will rewarding you with cupcakes and puppies - 10 of them. And they look like points.

Thanks again for your help!

former_member192851
Active Participant
0 Kudos

Thank you.

Just want to add for others. Maybe helpfull

About authorization key:

ToMi
Explorer
0 Kudos

Dear Mark,

first of all: I tried out your solution approach with the use of TAuthKey in UDF in combi with Authorization Keys username/password pair in SOAP receiver channel and it workes fine.

Here I have to maintain the same username twice (one time as operation mapping parameter and one time in Authorization Keys in SOAP receiver channel). Do you see a elegant possibility to maintain the username only at one of these locations?

Best Regards,

Tobias Miller

Answers (0)