cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP client

Former Member
0 Kudos

Hi :

1) What kind of data do we send as payload in the http cleint.

2) i took the xml from TEST of mapping.

3) Error : java.lang.NullpointerException thrown during application mapping .

4) payload i sent : <?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_CompanyID xmlns:ns0="http://www.http-rfc.com">

<CompanyID>000001</CompanyID>

</ns0:MT_CompanyID>

This works fine when i test from TEST message in integration engine on RWB

Can some body provide some insight into this

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

<i>1) What kind of data do we send as payload in the http cleint.</i>

-- XML data and xml files

<i>2) i took the xml from TEST of mapping.

Yes you can use to test through HTTP Client

3) Error : java.lang.NullpointerException thrown during application mapping .

Check in Mapping ,and imput data

4) payload i sent : <?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_CompanyID xmlns:ns0="http://www.http-rfc.com">

<CompanyID>000001</CompanyID>

</ns0:MT_CompanyID></i>

Please Remove <b><?xml version="1.0" encoding="UTF-8"?></b>

and test once again

Regards

Chilla

Former Member
0 Kudos

Hi :

The problem is resolved.

Wht Chilla said was correct : the first line had to be removed. The http client accepts bit different format .

So do all HTTP cleints accept similar format : ?

Thanks

Former Member
0 Kudos

No,not all http clients accept payload in this format,if u look at the source code of the client ur using,u will find an variable called payload.

var payload = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";

its already been hardcoded so u dont need this in ur payload as well

thanx

ahmad

Message was edited by:

Ahmad

Answers (2)

Answers (2)

Former Member
0 Kudos

Hey

we send XMl payload in HTTP client

and where did u get this java error?was it in the HTTP client?

also try to change ur data type a little bit so that ur XML looks something like this

<ns0:MT_CompanyID xmlns:ns0="http://www.http-rfc.com">

<Recordset>

<CompanyID>000001</CompanyID>

</Recordset>

</ns0:MT_CompanyID>

thanx

ahmad

former_member187339
Active Contributor
0 Kudos

Hi,

With http client you can either send XMLString or XML file...

Check in MONI whether you are getting any error message..

Regards

Suraj

Former Member
0 Kudos

so if i dont want to hardcode it ,can i remove the var payload = " xml...." in the source code?

Thnx

Former Member
0 Kudos

yeah u can but make sure that ur code is syntactically correct after u have made any changes.

Former Member
0 Kudos

Thnx Ahmad.

i modified the source code and now it works exactly same way as i want

awarded the points.

Thnx