cancel
Showing results for 
Search instead for 
Did you mean: 

http response not packed in xml-format

Former Member
0 Kudos

Hi all,

I have the requirement to send a synchron call via http. The reqest message works fine.

The message I get back is unfourtenately not packed as XML payload, but only as string. And so I can not access to this string.

Are there any tips or expiriences.

Regards

Mathias

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

The problem I guess will occur in the response mapping.

Java Mapping does not check if the input and output to the mapping is XML. it also does not validate the source and target message agaisnt the corresponding XSD's.

The solution to this would be to use a java mapping as the response mapping and then create the required string and push it to the outputstream of your java mapping.

Regards

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

the response is already failed in the payload of the adapter. Response mapping will happens later!

Regards

Mathias

bhavesh_kantilal
Active Contributor
0 Kudos

Mathias,

Sorry for the confusion. I thought that HTTP adapter was on the sender side. But , it actually is on your Receiver Side and you my earlier answer does not hold true.

Regards

Bhavesh

Former Member
0 Kudos

>>the response is already failed in the payload of the adapter

What do you mean by this?

Regards,

Jai Shankar

Former Member
0 Kudos

Hi Jai,

I get a response string on a http-adapter. This looks correct. But I miss the the enclosing XML-Tags.

Example:

My actual Result:

a_string

Expected Result:

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

<string>

astring

</string>

Regards

Mathias

Former Member
0 Kudos

Hi,

It looks like it is not coming back as a valid HTTP response.

Check with the vendor to see if it is a valid HTTP response that is being returned.

Kind regards

Colin.

Former Member
0 Kudos

Hi,

the Vendor sends me a string, what represent a xml-File. Which things of the vendor can be wrong or not valid?

If I look in SXMB_MONI so I see under the node "Payloads" the entrie "MainDocument(application/octet-stream" and "XI_Context(text/xml)'. Is the suffix application/octet-stream correct?

Regards

Mathias

Former Member
0 Kudos

Hi,

The fact that you are able to see it in SXMB_MONI means that the HTTP response was valid....

what you need to do is that for the Synchronous interface going out to HTTP receiver, in the interface determination, there needs to be a mapping program, which has a mapping on the response side....which as bhavesh was suggesting, should be a java mapping...to convert the string to the XML that you want...

Thanks.

Former Member
0 Kudos

Hello Deepu,

my Synchronous interfaces is called from a Business Process. So I map the return message in the following transformation step. In SXMB_MONI I can see the payload in the source of this transformation process. No mather which mapping I use (XSLT, MessageMapping) there is no payload in target.

I checked the transformation. I tooked the incoming payload of the http adapter and put it in MessageMapping test screen. It didnt work, altought it was the same structure. The only difference are the missing namespaces and the missing <--xml.. > row.

If I add this parts to the source payload message mapping works fine.

So I think without namespaces the payload is not accepted.

So I am on my first question. Why is the incoming payload in an incorrect format?

Regards

Mathias

Former Member
0 Kudos

Hi Mathias -

<i>>>>No mather which mapping I use (XSLT, MessageMapping) there is no payload in target.</i>

You mentioned earlier that your payload is a text string. XSLT and Message Mapping only work with XML formatted source messages.

<i>>>>So I am on my first question. Why is the incoming payload in an incorrect format?</i>

So what is the expected format - text string or an xml message, according to your partner that sends the response?

If it is supposed to be a string, you can use a Java mapping for the response mapping.

If it's supposed to be an XML message and you're not getting one, use a tool like TCPGateway (see Note 856597) to isolate the problem. You can set this up, for example, between your Integration Server and http partner to see what the http response looks like before the response is received by the Integration Server.

Regards,

Jin

Former Member
0 Kudos

Hi Deepu,

I am facing similar problem. The response message I get is in HTML format. Could you please elaborate more on how I can use Java mapping in the sychronous interface to read the HTTP response?

Any inputs from you regarding this will really be helpful.

You can have a look at the thread that I have initiated for further details.

Mathias: Would you please let me know how did you solve this problem?

Regards,

Rahul.

Message was edited by:

Rahul Aurangabadkar

Former Member
0 Kudos

Hi Deepu,

I solved the problem by using a xslt mapping. This program add the missing parameters, e.g. namespaces.

So mapping (java, xsltI) is right.

Best

Mathias

Answers (0)