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