Hello -

I am very much a beginner to Camel and have limited development experience
in general.  I am successfully using Camel for multiple FTP routes and now I
need to post a file to a web service.  We are using only the Blueprint XML
for our routes.  

I am able to successfully post to the web service using a curl command that
looks like this: 

curl -s --show-error -F "upload[upload]=@test.txt" -X PUT
"https://pathtowebservicehere/";

I need to do this exact same thing in Camel, and I am retrieving the file
from a FTP server.  Here is my route thus far:

<from uri="sftp://servername?password=***&amp;delete=true"/>
                <setHeader headerName="CamelHttpMethod">
                        <constant>PUT</constant>
                </setHeader>
        <log message="Moving ${file:name} to the output directory"/>
        <to
uri="https://pathtowebservice/?sslKeystore=C:\pathtokeystore&amp;sslKeyPassword=*****"/>
                </route>

Am in the ballpark here?  I keep getting SSL timestamp errors with this,
even though I've verified all the certs in the chain are valid.  System
clock times on all involved servers are good.  Is there a way to tell camel
to ignore the cert warning?    

There is so much documentation about HTTP, HTTP4, Jetty etc etc.  I'm
thoroughly confused.  Do the sslKeystore and sslKeyPassword options only go
along with the Jetty module?  I see in the documentation that I need to add
a dependency for Jetty if I am a Maven user.  I don't think we are using
Maven. 

Any help would be greatly appreciated!! 

 




--
View this message in context: 
http://camel.465427.n5.nabble.com/Posting-a-file-to-a-web-service-tp5746815.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to