From: Dominik P. <do...@ar...> - 2008-07-01 14:14:14
|
Hi all. This is my first message to the list. First I'll introduce my idea: A few days ago I've found eXist to be just ideal combination with Flex and it's web services interface. Flex has great tools for working with XML data and (in small applications) communication with an XML DB via web services could allow me avoiding server side software - it's pretty much, I don't have to use yet another language like Java, PHP, and so on. BUT (the problem) : Well, I cannot get proper response from xquery operation. I really really tried to manage it in many ways. SOME FACTS: * xquery is the first web services' operation on my way that does not work. Some other do, like getVersion (here's the whole flex's web service definition): <mx:WebService wsdl="http://localhost:8080/exist/services/Version?wsdl" id="eXistVersionWS" result="queryWSResultHandler(event)" fault="queryWSFaultHandler(event)" useProxy="false"> <mx:operation name="getVersion" /> </mx:WebService> * Another working operations: <mx:operation name="connect" result="connectQueryWSResultHandler(event)"> <mx:request xmlns=""> <userId>admin</userId> <password>admin</password> (here I've changed password from default null) </mx:request> </mx:operation> <mx:operation name="disconnect"> <mx:request xmlns=""> <sessionId>{this.sessionId}</sessionId> </mx:request> </mx:operation> <mx:operation name="getResourceData"> <mx:request xmlns=""> <sessionId>{this.sessionId}</sessionId> <path>{inputReourcePath.text}</path> <indent>true</indent> <xinclude>false</xinclude> <processXSLPI>false</processXSLPI> </mx:request> </mx:operation> * And this is the problematic operation: <mx:operation name="xquery" result="xqueryQueryWSResultHandler(event)"> <mx:request xmlns=""> <sessionId>{this.sessionId}</sessionId> <xquery>{encodedInput.text}</xquery> </mx:request> </mx:operation> I've checked the request several times, it's encoded properly (I've decoded it to be sure), sessionId works fine with getResourceData operation, so it's fine. I always get the message: [RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://localhost:8080/exist/services/Query"]. URL: http://localhost:8080/exist/services/Query"] THE QUESTION(s): * Is it a problem with a query I'm sending? It's true that these are my first steps with xquery language, but I've tried sooo many examples from eXist resources and xquery sandbox that it's unlikely I couldn't just have one lucky shot :) * Could you give me some examples of <xquery> parameter that have to work (with existing default examples). * Do you see any other mistakes I could make? * Has anybody any experiences with combining Flex with such XML DBs? It seems to be so natural that it's just strange to me that I don't see any working examples. Help me, please, I'm stuck. But the idea is too elegant I would like to give up. Greetings -- Dominik Piekarczyk www.araneo.pl |