Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
+1
person also asked this
people also asked this
Replies
12 replies
Subscribers
7 subscribers
Views
5596 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Integrations
What is the best way to send XML from Appian to REST Service
mohammedz
Certified Senior Developer
over 8 years ago
Hi All,
We have a requirement to send a XML generated from Appian to External Service [REST Service]. This is not a WSDL Service.
What would be the best way to POST the xml to REST API
If anyone experienced similar requirement in your way, Please share your thoughts
OriginalPostID-241342
Discussion posts and replies are publicly visible
0
rodgraham
Certified Lead Developer
over 8 years ago
Have a look at suite/help/16.2/HTTP_Query_Smart_Service.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rodgraham
Certified Lead Developer
over 8 years ago
forum.appian.com/.../HTTP_Query_Smart_Service.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mohammedz
Certified Senior Developer
over 8 years ago
@rodgraham
Yeah i know we have function as well for the same operation. I have gone through all the possible areas but i would like to know which would be the best option for this requirement
Thanks...!!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vijayy700
over 8 years ago
you may also refer this link:
forum.appian.com/.../Connector_Functions.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 8 years ago
@mohammedz, You have these options:
1. a!httpWrite() function - This can be used from SAIL form. It returns a writer. So, you need to use it in SAIL form.
2. Use the HTTP Query Smart Service from the process model. You can use the POST request and pass the data. You may need to specify the application or content type in the headers of the request to specify that you are passing XML in the body/headers. I would prefer this, as it is easy to setup/configure(compared to the function where you need to use it in SAIL form in combination with bind() ). If possible, you could also create a reusable process model for this, and call it from a SAIL form in a saveInto using the a!startProcess function.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vijayy700
over 8 years ago
@mohammedz when you will use a!httpWrite you will have to also define the content type that you can do in header and set its content type to xml
a!httpHeader(
name: "Content-Type",
value: "text/xml"
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vijayy700
over 8 years ago
Content-Type => text/xml; charset=utf-8
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mohammedz
Certified Senior Developer
over 8 years ago
@chetany - I am using service from PM
We have two smart service
1) HTTP Query
2) Send HTTP Request
Is both the Smart service are same or for sending XML which would be reliable and preferable ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chetany
A Score Level 1
over 8 years ago
I would suggest HTTP Query smart service. The reason is that - the "Send HTTP Request" is not a built-in smart service. It comes from a plugin.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mohammedz
Certified Senior Developer
over 8 years ago
@cheatan,
I am using toxml function to convert a CDT into XML format.
If i need to POST the xml in which parameter in the node i need to pass the same ?
Can you please share ur view
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>