Thanks, Geert.
Next issue is connecting machine to machine with 2 way SSL. I have two
problems:
First, in the development environment my destination server certificates
do not match the server host name. How can I tell MarkLogic to ignore
hostname verification ? I'd rather not create self-signed certificates
for each developer's workstation acting as a server.
Second, I see where I pass the client cert in PEM format into the
options node as well as the cert password. I'm thinking that I could
just save the cert as a text document in the database and read that in
as needed. Does that seem reasonable or is there a better way to do
that (note that it will always be the same certificate for my
application).
Bob
>Hi Robert,
>You need to encode the params into key-value pairs into the data
element of the options, and specify url-encoded content type. That
should do the trick:
>xdmp:http-post("http://localhost:8888/test/show-request.xqy", <options
xmlns="xdmp:http"><headers>
<Content-type>application/x-www-form-urlencoded</Content-type>
</headers><data>foo=bar</data></options>)
>Kind regards,
>Geert
_____________________________________________
From: Runstein, Robert E. (Contr) (IS)
Sent: Tuesday, February 02, 2010 2:01 PM
To: 'General Mark Logic Developer Discussion'
Subject: Sending parameters with xdmp:http-post
I have an external service that requires two named parameters via HTTP
POST. I have sample code from the service provider for sending the
parameters from Java, but as my processing is all in XQuery, I'd prefer
to use xdmp:http-post.
I see the examples for xdmp:http-post where an XML or SOAP document can
be posted, but how do I specify the named parameters required by the
service? Do I need to create an HTML page containing a form with named
input tags corresponding to the parameter names and pass the page within
the options data element or is there another way?
e.g.,
<html>
<body>
<form>
<input type="text" name="parameter1">
<input type="text" name="parameter2">
</form>
</body>
</html>
Bob
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general