Hi All,
We are trying to send some data through xdmp:http-post() function and receive
the same in a servlet hosted in a jetty server.
The code snippet we are using is as follows:
let $str1 := "4S5X-3SB0-TXFR-J2JX-00000-00"
let $str2 := "4S5W-85Y0-TXFR-3219-00000-00"
let $str3 := "4RY2-FH10-TXFK-12W6-00000-00"
let $masterlkey := "5816839"
let $ list :=
element Strings
{
element value{$str1},
element value{$str2},
element value{$str3}
}
let $infos :=
element RequestBody
{
element masterLockNo {$masterlkey},
$list
}
let $options := "data"
Tried with this commented block as well
(:let $soap-lnis :=
<SOAP-ENV:Envelope
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'>
<SOAP-ENV:Body>
{$lnis}
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>:)
let $soap-lnis :=
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1"/>
</head>
<body>
{$infos}
</body>
</html>
let $post-data := xdmp:quote($soap-lnis)
return
(
xdmp:http-post($uri,
<options xmlns="xdmp:http">
<data>{fn:concat($options,"=",$soap-lnis)}</data>
</options>)
)
But servlet is not able to get anything when it does
request.getparameter("data")/request.getAttribute("data").
We tried by sending $infos without wrapping it into anything and also by
wrapping it into soap envelope. They all gave the same error:
<v:results v:warning="more than one node"
xmlns:v="com.marklogic.developer.cq.view">
- <response xmlns="xdmp:http">
<code>500</code>
<message>javax.xml.bind.annotation.XmlAccessorType.value()Ljavax/xml/bind/annotation/AccessType;</message>
- <headers>
<cache-control>must-revalidate,no-cache,no-store</cache-control>
<content-type>text/html; charset=iso-8859-1</content-type>
<content-length>1434</content-length>
<server>Jetty(6.1.15)</server>
</headers>
</response>
<html> <head> <meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1"/> <title>Error 500
javax.xml.bind.annotation.XmlAccessorType.value()Ljavax/xml/bind/annotation/AccessType;</title>
</head> <body> <h2>HTTP ERROR: 500</h2> <p>Problem accessing /getlockkey.
Reason: <pre>
javax.xml.bind.annotation.XmlAccessorType.value()Ljavax/xml/bind/annotation/AccessType;</pre></p>
<hr /><i><small>Powered by Jetty://</small></i> </body> </html>
</v:results>
Please let me know if you have any solutions for this one.
Regards,
Arindam Chatterjee
Mob: (+91)9689881791
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are
not
to copy, disclose, or distribute this e-mail or its contents to any other
person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has
taken
every reasonable precaution to minimize this risk, but is not liable for any
damage
you may sustain as a result of any virus in this e-mail. You should carry out
your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this
e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general