cancel
Showing results for 
Search instead for 
Did you mean: 

need to post to HTTP destination with a dynamic URL

Former Member
0 Kudos

I have a working interface that posts to a static URL using an HTTP via an SM59 connection.

however i now need to do something similar, but use a dynamic field from the data to post as part of the url...

so it will be something like...

http://host.fqdn:port/path/goes/boldfield1bold/here/to/remove

field1 being a variable in my xml.

i guess i post to a URL with URL Address instead of HTTP destination, and i can use the header fields in adapter specific message attributes... however i do not want to send the xml.... so do i have to map just the single field to my target xml? how do i not send the xml as it is integrated within the URL?

how do i add the field1 within the path: /path/goes/boldfield1bold/here/to/remove into the options within the communication channel?

does that make sense?

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182004
Contributor
0 Kudos

Hi Barry,

If I understood well, and you have one part of the target URL fixed, and the other one is going to be dynamic.

You can use, as you said, the ASMA for HTTP adapter, and in the middle of the mapping you can create a simple UDF to create the URL. But as the result of that UDF, you just return the same value that you'd map if the UDF didn't exist.

For example you can use a funcion "setURL" and you can have 2 inputs: "url" and "companyname", but you just return "companyname" that is the value that really has to be mapped.

I hope this helps you.

Juan.

Former Member
0 Kudos

Hi Juan

i have found a blog to help me!:

/people/william.li/blog/2007/09/07/posting-and-testing-using-xipi-http-adapter

thanks anyway!