[MarkLogic Dev General] Re: Return value from xdmp:http-post
Runstein, Robert E. (Contr) (IS)
Robert.Runstein at ngc.com
Wed Mar 10 10:43:11 PST 2010
Correction - I just found out that the server response content-type was
set to application/xml, so that was the reason it was treated as XML,
not the suffix.
It appears that the code saw the ".xml" suffix in the response and
decided to treat the response as XML as I did not have this error when
returning other strings in my test harness. I added
xmlns:get="xdmp:document-get" to the default xdmp:http namespace and
passed <get:format>text</get:format> in the options. This removed the
error (quote/unquote was not involved).
> Hi All,
> I'm using xdmp:http-post to send a document to a web service that
> inserts it into another MarkLogic database and returns the URI of the
> document as a string. The service processes the document correctly,
> but I receive an XDMP-DOCROOTTEXT error with the following message:
> Invalid root text "/document/12345678.xml"
> /document/12345678.xml is the URI of the document in the remote
> database. The MarkLogic API docs state that the return value of
> xdmp:http-post is "the response from the server as well as the
> specified document". Is the error occurring because the value
> returned is a string not a document?
More information about the General