on 06-03-2009 3:59 PM
Hi,
I have a mobile application that uploads orders to PI. Everything is working except for a test function. It sends a payload to PI to confirm the 'network' is functioning. However, the payload of the call is text. When viewing the payload in the PI logs the text 'TEST' appears. PI then generates an error for this call. I'd like to be able handle this payload without having to ask the developer to send an XML document. I could get the developer to change the code but it would mean $$$$ and deploying the update to a lot of devices. Is there any way I can deal with this in PI.
Many thanks in advance.
Sorry - I should have made that clear.
The text is being sent as part of the payload of a HTTP request.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The test function is using the same interface we use for delivery uploads (which work perfectly). It's a plain HTTP interface. The payload being sent is shown below.
bold Test Connectionbold
That is it, nothing more. The interface gets to PI but fails with a mapping error which is to be expected.Obviously I could ask the developer to change the payload and send an XML document and then deal with it in the interface mapping but that would cost $$$.
So what I need to be able to do is handle it in the interface mapping. Is there any way I can do this?
>>The interface gets to PI but fails with a mapping error which is to be expected
Well if you really want to do some message mapping,then you need to use either java or XSLT mappings,graphical mapping wont work here since the payload is not XML .
If you don't have any need for mapping,then just develop a dummy scenario without mapping.
Thanks
Aamir
Gentlemen - thank you for your replies. I think we are agreed I need to do XSLT mapping to convert a text string into an XML document. I just have one more question.
I mentioned earlier this interface is used for deliveries and that the test message (the text message) is sent on this interface. My question is am I able to use conditions in the interface determination to check to see if the message is a delivery or a test message so I can redirect it to the appropriate mapping?
check it here:
http://help.sap.com/saphelp_nw70/helpdata/EN/e9/67a63d7af20450e10000000a114084/frameset.htm
From above link:
If you specify more than one inbound interface, you can specify conditions for forwarding the message to
the inbound interfaces. These conditions are evaluated at runtime.
Regards,
Abhishek.
I'm having problems defining a condition in the interface determination. Let me recap.
I have a very simple HTTP interface. The application using this interface can send a request with a valid XML document in the payload OR a simple text string. Using the interface determination I need to be able to map the valid XML document to one RFC and the test string to another RFC. The condition for the XML document is simple but defining a condition for the text string is proving to be next to impossible. According to the condition & expression editor documentation I have to use an Xpath expression to refer to the element I want to u2018testu2019. How can I use an Xpath expression when the document Iu2019m referring to isnu2019t a valid XML document.
Any advice you can offer would be appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Brian!
It is some kind of "unusual" to work with Non-XML messages within the PI. So some behaviour might be unpredictable, because - as per definition - PI internally always works with XML files.
But for the textstring you may try to use a Dummy XPath expression with NOT, which always gets the value "TRUE".
Try it.
Regards,
Volker
Volker,
Many thanks for the reply, looks like I have all the information I need.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
It depends on the adapter you use to get the message from the mobile device. E.g. a SOAP Adapter expects to get a SOAP message. A File Adapter can work with almost everything as long as it comes in a flat file.
So what is the Config. Scenario you use?
Regards,
Volker
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.