logo       

AW: XPathQueryService working?: msg#00048

text.xml.exist

Subject: AW: XPathQueryService working?

Hello,

I have successfully used the XPathQueryService, but had the same problem.
It was a classpath-problem. I was testing eXist and Apache Xindice and had
another version of xmlrpc.jar in my classpath, as Xindice 1.0b4 uses
xmlrpc-1.1
but eXist uses xmlrpc-1.2.

In my case, correcting the classpath fixed the problem.

Best regards,

Wolfram

-----Ursprüngliche Nachricht-----
Von: exist-open-admin@xxxxxxxxxxxxxxxxxxxxx
[mailto:exist-open-admin@xxxxxxxxxxxxxxxxxxxxx]Im Auftrag von Dominic
Gamble
Gesendet: Donnerstag, 9. September 2004 09:13
An: exist-open@xxxxxxxxxxxxxxxxxxxxx
Betreff: [Exist-open] XPathQueryService working?


Has anyone successfully used the XPathQueryService with the XMLDB api?

I have some code which does:

ResourceSet resourceSet = service.query(query);
ResourceIterator resourceIterator = resourceSet.getIterator();
while (resourceIterator.hasMoreResources()) {
xmlResource = (XMLResource) resourceIterator.nextResource();

//get result as string
String str = (String) xmlResource.getContent();

//get result as DOM
Document doc = (Document) xmlResource.getContentAsDOM();
}

When I print out the string I get garbage mixed with xml:

���Ì?�����ä??��UÉ?������ä??��T�ɽ�Ð?
��������D�FV��###"6��t���V�S�'G'VR"6�
�t��6�FV��'G'VR"WF�?��\�OH��[�H��Ü?ï
¿½OH�Ü?X][Û?]H��Ü?Ü?\�H�^[�ded="false">
<Elements>
<Element
useDefaultLa�Õ?�����Õ?
���Í?5ձѥq�1���Õ?������Õ?
��Ù?�ͥ��!��ѽ����&�fb"��7F�'��V�wF�ï
¿½#"��S�$�FV���R"G�S�%6��v�RÆ?Û?H^��
]X�H��[�H��\]Z\��perties allowAlphabetic="ON"
allowNumeric="ON"
allowSpeci��=8�������ME����=8���(���ï¿
½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½�Í?ɥ�ѥ���Q�����FV��
�R�2W6VBF��FV�F�g���FV��B6��V�B&RV�V_
�Y����X�K�
�\�Ü?
�[�lement useDefaultLanguage="true" useMultipleLanguages="tr�Õ?
��Ù?�ͥ��!��ѽ��ô?½?������ѽ��1���Ѡ
�������%Ñ?����F��""G�S�%6��v�RÆ?�RFW
�B"7FF�3�&f�6R"&WV�&VC��\�Y\�[��[X�]Xï
¿½H�Ó?�[���umeric="ON" allowSpecial="ON" allowSpaces="ON"/>

���Í?ɥ�ѥ���Q���%Ñ?���ѡ�È?͡�ձ���

..etc..

It seems to be incomplete xml with all kinds of weird unicode
characters.

When I get the content as DOM I get a SAXParseException:

Caused by: org.xml.sax.SAXParseException: An invalid XML character
(Unicode: 0x8) was found in the value of attribute "historyLength" and
element is "Class".
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at
org.exist.xmldb.RemoteXMLResource.getContentAsDOM(RemoteXMLResource.java:168
)


All of this used to work find with Xindice's XPathQueryService, but I'm
trying to move to eXist. Does the eXist's XPathQueryService actually
work, and if so, how do I do want I want to do with eXist?

I'm using the eXist snapshot dated 20040816 running on Jetty, running on
Debian GNU Linux. The java webapp which I'm connecting to xindice from
via xmlrpc is running inside tomcat 4.

Cheers,
Dominic

--
Dominic Gamble
Director
Advancen Software Solutions & Multimedia

Phone 1300 888 680 Email dominic@xxxxxxxxxxxx
Mobile 0402 059 219 Web www.advancen.com
Global +61 1300 888 680 PO Box 558, South Melbourne
Fax +61 3 9525 3446 VIC 3205, Australia



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Exist-open mailing list
Exist-open@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/exist-open




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise