I'm trying to POST a file to an web service interface that I've written.  The 
webservice uses a URL rewriter that translates the web service URLs to the 
actual code that will do the work and hides the actual .xqy extensions from the 
end users.

So we have some application code that does a post like this:

      <form action="/file" method="put" enctype="multipart/form-data" 
target="_self">
        <p>Add file to folder: <input type="file" class="name" 
name="name"/><input type="submit" value="Add"/></p>
      </form>

In the rewriter the URL PUT or POST of '/file?uri=foo.xml' gets translated to 
something like '/file/receive.xqy?uri=foo.xml'

However, the URL rewriter never receives the request and the browser gets a 405 
(Method Not Allowed) error from MarkLogic.

If I change the action of the form to go directly at the XQuery file 
'/file/receive.xqy?uri=foo.xml' I don't get the error and everything is fine.

Two questions: Why is MarkLogic intercepting all POST calls in the first place? 
 And second, if there is a good reason then why does MarkLogic intercept POST 
calls before the rewriter instead of after when it actually knows where it is 
headed?

Keith L. Breinholt
ICS Content & Media
[email protected]<mailto:[email protected]>
"Do what you can, with what you have, where you are." Theodore Roosevelt


 NOTICE: This email message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information. Any unauthorized 
review, use, disclosure or distribution is prohibited. If you are not the 
intended recipient, please contact the sender by reply email and destroy all 
copies of the original message.


_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to