From: Adam R. <ada...@de...> - 2007-07-30 20:34:58
|
Indeed, as Dannes has mentioned, there is a SOAPServer component in = eXist. Not only is it in SVN, but I think it was probably also in the = last eXist release at least. Take a look in EXIST_HOME/tools/SOAPServer, = the README file in there should be enough info to get you started. The basic idea is that you can have an XQuery module stored in the = database, but instead of the .xqm extension, you give it a .xqws = extension (XQuery Web Service). You then call the webservice in this way for its WSDL - = http://localhost:8080/exist/servlet/db/myquery.xqws?wsdl If you want re-useable code that can be used for SOAP and/or REST or = anything else, the best way to do this is probably to write common code = as modules (.xqm) anyways, and create a .xqws to include the appropriate = modules and write wrapper functions to call the module functions. = Basically every function in a .xqws translates to a webservice method; = The SOAP Server will take care of generating the WSDL, parsing the = incoming SOAP Request and executing the correct function and then = returning a SOAP Response. Otherwise if you are only interested in = writting XQuery for webservices then you can code your xquery directly = in the .xqws functions. I have not officially documented this yet as I have been trying to test = interoperability. The initial version was developed to use = document/literal wrapped encoding and I tested with the oXygen WSDL SOAP = Analyser and that all works I believe. I did some testing with .Net and = I think the results were good (sorry it was some time ago), probably = because document/literal wrapped is the Microsoft way of doing SOAP, = although it is becoming the un-official defacto standard now even with = Java. I have started refactoring the SOAPServer and making changes so that it = can work better with othet SOAP Clients/toolkits, this means also = supporting rpc/encoded, rpc/literal and document/literal. It seems = ironic to me that SOAP was developed to be the solution to disperate = systems interoperability and yet we have ended up with 5 different ways = of doing SOAP (only 4 types mentioned here, document/encoded type is = almost never encountered) - = http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/ Unfortunately this refactoring has been a slow process and trying to = ensure interoperability is even a painful process... Anyways, you may like to try what is currently available, as I mentioned = it should work with .Net. Let me know how you get on, if you have some = issues I would love to know as apart from a few advanced users, this is = not well tested. In the meantime, I will continue my refactorings and hopefully if = everything goes well then maybe in this eXist release or the next there = will be a full and complete SOAPServer with documentation... Thanks Adam. -----Original Message----- From: Dannes Wessels [mailto:di...@gm...] Sent: Mon 30/07/2007 19:49 To: Paul Veuve Cc: exi...@li... Subject: Re: [Exist-open] How To execute a query stored in exist with = SOAP =20 hi, On 7/30/07, Paul Veuve <ve...@cd...> wrote: > What is the way to execute a query stored in exist with SOAP. well in the upcoming release of eXist there is a very nice and powerful feature "SOAPserver" ; There is documentation on this in SVN: http://exist.svn.sourceforge.net/viewvc/exist/trunk/eXist/tools/SOAPServe= r/ I know there are some pending patches on this code. It works well with AXIS and .Net SOAP implementations (that is what I am told) regards Dannes |