Hi all.
I'm using SA12.0.1 and I'm trying to use Http web client access .... something like:

ALTER PROCEDURE "DBA"."SendXMLContent"(xmlcode long varchar) url 'http://server/service' type 'HTTP:POST:text/xml'

How can I use a variable url (... for example reading it from DB or global variable ...) ?
Thanks.

asked 03 May '13, 05:10

NCister's gravatar image

NCister
16191016
accept rate: 0%


Have a look at that doc page:

It shows a sample using an URI as function parameter:

The following statement uses a substitution parameter to allow the request URL to be passed as an input parameter. The SET clause is used to turn off CHUNK mode transfer-encoding.

CREATE FUNCTION cli_test2( image LONG VARCHAR, myurl LONG VARCHAR )
RETURNS LONG BINARY
URL '!myurl' 
TYPE 'HTTP:GET'
SET 'HTTP(CH=OFF)'
HEADER 'ASA-ID';

So, apparently you can supply a variable value when calling your web client function in a similar fashion - possibly by putting a wrapper function around that to "automatically" supply the variable URI portion...


Here's further information on substitution parameters like the "!myurl" used in the above sample (a help topic not easily found, methinks...):
Substitution parameters used for clause values

permanent link

answered 03 May '13, 05:44

Volker%20Barth's gravatar image

Volker Barth
30.0k294448654
accept rate: 32%

edited 03 May '13, 06:08

Thank you. It works.

(03 May '13, 11:40) NCister
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×31
×21
×8

question asked: 03 May '13, 05:10

question was seen: 593 times

last updated: 03 May '13, 11:45