|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
|
|
|
Re: SOAP interface and FlexHave you tried this with a really simple XQuery? e.g.
xquery version "1.0"; <dateTime>{current-dateTime()}</dateTime> I would also recommend that you try this outside of Adobe Flex, do you have something like Web Service Studio or oXygen (it has a Web Service test tool). Try connecting to the service and sending your simple query request from there, the nice thing about this is then that you can see the SOAP Request and Response. Also, you may find the REST interface easier than the SOAP interface. With the REST interface you can GET for simple queries with a querystring parameter _query or for more complex queries you can POST an XQuery. There is also a SOAPServer in eXist which is different to the default SOAP Webservices you are using, you can find details in EXIST_HOME/tools/SOAPServer - this will enable you to write and store xqueries in the database and expose them as SOAP Webservices. Thanks Adam 2008/7/1 Dominik Piekarczyk <dominik@...>: > 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 > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Exist-open mailing list > Exist-open@... > https://lists.sourceforge.net/lists/listinfo/exist-open > > -- Adam Retter eXist Developer { England } adam@... irc://irc.freenode.net/existdb ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
|
|
Re: SOAP interface and FlexThanks for your answer, Adam. My reply's below:
Have you tried this with a really simple XQuery? e.g. This is a smart idea, no data is included so I don't have to worry about data paths. But the result is the same, unfortunately. I've tried that date function and even just to push <a>b</a> to the client. I would also recommend that you try this outside of Adobe Flex, do you So I tried. I used SoapUI tool and I've sent some requests. The result is the more less the same: I can connect, get resource, but I still don't have satisfying response while sending xquery. This is an example of request and response: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:exist"> <soapenv:Header/> <soapenv:Body> <urn:xquery> <urn:sessionId>4630104</urn:sessionId> <urn:xquery>eHF1ZXJ5IHZlcnNpb24gIjEuMCI7DQ08ZGF0ZVRpbWU+e2N1cnJlbnQtZGF0ZVRpbWUoKX08L2RhdGVUaW1lPg==</urn:xquery> </urn:xquery></soapenv:Body> </soapenv:Envelope> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <xqueryResponse xmlns="urn:exist"> <xqueryReturn> <collections/> <hits>1</hits> <queryTime>0</queryTime> </xqueryReturn> </xqueryResponse> </soapenv:Body> </soapenv:Envelope> Is this what I was supposed to get as an answer? I expected rather current datetime, like in xquery sandbox. I've tried to broke the base64 data string and the server response with an exception. So it's good. Also, you may find the REST interface easier than the SOAP interface. I will probably go to the REST interface. I preferred SOAP, it's much more elegant and handy in Flex. There is also a SOAPServer in eXist which is different to the default I don't see it in my folder, but even if - I will rather use REST interface which is documented and I can count for some help from other developers. Thanks Adam Thanks Adam :) Dominik
-- -- Dominik Piekarczyk www.araneo.pl ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
|
|
|
| Free Forum Powered by Nabble | Forum Help |