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
10 replies
Subscribers
10 subscribers
Views
4402 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Is there a way to send an Http Post with an atachment to a restful web service?.
karls
over 10 years ago
Is there a way to send an Http Post with an atachment to a restful web service?...
OriginalPostID-130561
OriginalPostID-130561
Discussion posts and replies are publicly visible
0
Eduardo Fuentes
Appian Employee
over 10 years ago
I have done this to upload files to Sharepoint using the Send HTTP Request Plug-in and passing the document converted to base 64 in the body of the request (
forum.appian.com/.../summary)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
karls
over 10 years ago
Eduardo,
I get a 415 back. I created a smart service which works but would prefer the built in method. I am passing the content type in the header as application/octet-stream. Can you please give me your header values.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
In my case I am making a Web Service call using the plug-in therefore I'm passing a string which contains the SOAP envelope and one of the fields (Stream) in the envelope is the content of the file. That said, since I'm sending a SOAP envelope my headers are:
="Content-Type"
="application/soap+xml; charset=utf-8"
and my SOAP envelope looks like this
<soap:Envelope xmlns:soap='
www.w3.org/.../soap-envelope'
xmlns:soap1='
schemas.microsoft.com/.../'>
<soap:Header/>
<soap:Body>
<soap1:CopyIntoItems>
<soap1:SourceUrl>Default</soap1:SourceUrl>
<soap1:DestinationUrls>
<soap1:string>
xxxx.xxxxx.net/.../soap1:string>
</soap1:DestinationUrls>
<soap1:Fields>
<soap1:FieldInformation Type='Text' DisplayName='xxxxxx' InternalName='xxxxx' Id='22222222-2222-2222-2222-222222222222' Value='xxxxx'/>
</soap1:Fields>
<soap1:Stream>dGhpcyBpcyBhIHRleHQgZmlsZQ==</soap1:Stream>
</soap1:CopyIntoItems>
</soap:Body>
</soap:Envelope>
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
karls
over 10 years ago
In my case, it is a restful service. works fine with org.apache.http.client.HttpClient
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
karls
over 10 years ago
Do you think a custom smart service would be ok for this scenario.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
If you already have a custom smart service working then it's fine to keep using it. You can eventually switch to the out of the box HTTP Query once it has additional features that your plug-in doesn't support (e.g. NTLM support, etc)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
karls
over 10 years ago
Can I turn on debug to check the values passed. Dont know why its returning a 415
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
What node are you using? the Send HTTP Request or HTTP Query? They both have the same icon but one is a plug-in the other is OOB since 7.7
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
karls
over 10 years ago
i am using Send HTTP Request. we have 7.5 installed
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
To enable DEBUG mode you can add this to runtime_ear\\suite.ear\\resources\\appian_log4j.properties
log4j.logger.com.appiancorp.process.runtime.activities=DEBUG
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel