Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Can I consume a Restful web service that needs to post a XML file? I like to call a Redmine web service to register hours for a project. I need to call a web service described in this url: How do I pass the needed XML string to the web service?

Tia Hans

asked 17 Feb '14, 10:32

HansTSD's gravatar image

accept rate: 20%


Would you please explain how your question is related to SQL Anywhere (that's what this forum is about)?

(17 Feb '14, 13:06) Reimer Pods

I like to call a web service with SQL Anywhere, to send data from our database to Redmine. In a way like this: CREATE PROCEDURE "DBA"."zz_redmine_test"(IN as_xml XML) URL '' TYPE 'HTTP:POST'

I used that for retrieving Google Maps locations and other web sites also. But now I have to Post a web service that needs a set of XML data.

(18 Feb '14, 04:02) HansTSD
Replies hidden

Have you had a look at that doc page on web client functions and POST requests:

Web service request types

(18 Feb '14, 04:23) Volker Barth

Yes I did. But I do know how to call a service of Redmine, see my original post. I need to create time entries an therfore need to Post a time_entries.xml. No idea if is possible with SA..?

(18 Feb '14, 04:32) HansTSD

I solved the problem as follows. Maybe somebody else can us this in the future.

CREATE PROCEDURE "DBA"."zz_redmine_test"(IN "time_entries.xml" LONG VARCHAR)
URL 'https://bb<--My API key-->>'
TYPE 'HTTP:POST:text/xml'

CALL "DBA"."zz_redmine_test" 
permanent link

answered 18 Feb '14, 09:02

HansTSD's gravatar image

accept rate: 20%

edited 18 Feb '14, 09:17

Volker%20Barth's gravatar image

Volker Barth

Glad you got it working!

Apparently, you could use SQL Anywhere's XML features / XML datatype to construct the XML object instead of building it "manually"...

(18 Feb '14, 09:18) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 17 Feb '14, 10:32

question was seen: 2,798 times

last updated: 18 Feb '14, 09:24