on 03-31-2016 10:57 AM
Hi Experts,
We have a requirement where the scenario is to develop a Proxy to HTTP (GET) synchronous interface.
The target url given by the third party is as below form:
https://abcd.com/InjectMessage?code=awefv_inject&username=xyzw&password=258963&msg=FeedBack&from=<Customer # preceded by 91>&user.name=<Customer Name>&user.city=<Hotel Name>
Kindly help me with the receiver HTTP GET channel configuration.
Do i need to add header details in advanced tab? If yes, pls guide how.
Also would like to know about Main Payload Parameter Name field in Request details in General tab.
Hi Ashish
Noticed from your screenshot that you are on PI 7.4. And I noticed from your other thread that you also have REST adapter.
I'd suggest using the REST adapter for your HTTP GET scenario. REST adapter provides more functionality when dealing with HTTP scenarios.
You can check the following blog which shows you how you can configure the adapter that uses dynamic URL.
Regards
Eng Swee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Eng Swee Yeoh,
I tried using REST adapter. But it is giving me below error.
Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.rest.ejb.common.exception.HttpCallException: HTTP GET call to https://abcd.com/InjectMessage?code=awefv_inject&username=xyzw&password=258963&msg=FeedBack&from=<Customer # preceded by 91>&user.name=<Customer Name>&user.city=<Hotel Name> not successful. HTTP/1.0 403 Forbidden
Th message is under system error with status details as channel not found.
Can you please guide me how to proceed further?
Here's my feedback:-
i) The URL pattern looks incorrect. You need to put an actual value for the &from field. Also, the placeholders for user.name and user.city is incorrect, you need to use the same name defined under "Pattern Element Name" and put them in curly brackets {} instead of <>. Example below (910000 is just a random number, you need to use an actual valid number there)
https://abcd.com/InjectMessage?code=awefv_inject&username=xyzw&password=258963&msg=FeedBack&from=9100000&user.name={Customer_Name}&user.city={Hotel_Name}
ii) I'd suggest that you follow the advice by Dev Noronha and try to test out the URL using a REST client first,
Hi Dev,
I have tested the integration on below link and it is working as expected also. We got the desired response as well.
Hi Eng Swee Yeoh,
it seems that there was some security issue for which we have done URL white listing and now we are able to send the request proper to the third party
Channel ping status is green now.
Only part which is remaining in the whole interface is that the Vendor is sending response in plain text due to which we are getting error as
Transmitting the message using connection AFW failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error encountered while executing mapping: com.sap.aii.af.service.mapping.MappingException: Mapping failed in runtimeRuntime Exception when executing application mapping program com/sap/xi/tf/_MM_API_RS_; Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Content is not allowed in prolog.
Do i need to put a xslt mapping or java mapping to convert plain text to xml so that we get a successful response?
The response will be plain text like: "The survey has been completed successfully" coming from the vendor which is not supported in PI.
Please help how to proceed in this case.
Ashish
If you are not familiar with Java mapping, you can check out my blog below
It can help simplify your mapping logic. For your case, you can refer to the CustomPlain2DOM mapping per the link below and adjust to your scenario.
equalize-xpi-mapping/CustomPlain2DOM.java at master · engswee/equalize-xpi-mapping · GitHub
Dear Ashish
Very pleased to have been of assistance and hear that you have resolved your issue.
There is a lot that can be learnt on SCN for new and old alike. I'd encourage you to continue participating on SCN, not only for your own queries but also take time to read up others as well.
Regards
Eng Swee
Hello Ashsish,
If the HTTP message from the receiver channel to the target system should be an HTML form submission, choose Set Form and enter the Main Payload Field Name to specify the name of the request parameter whose value contains the XI main payload.
Below is the guide for HTTP Adapter configuration
Configuring the Java HTTP Adapter on the Receiver Channel - Advanced Adapter Engine - SAP Library
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raghu,
Thanks for your reply!
Please let me know how to fill values in that Main Payload Field Name as per the URL given.
https://abcd.com/InjectMessage?code=awefv_inject&username=xyzw&password=258963&msg=FeedBack&from=<Customer # preceded by 91>&user.name=<Customer Name>&user.city=<Hotel Name>
I want to know the format of filling that particular field .
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.