[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] XPATH problem
Hi Alexey,
the issue with XPATH and JDK1.5 has been fixed and is now available in
svn. It will also be included in the next release.
Regards
Michele
Гришков Алексей wrote:
> Hello Michele,
> sorry, but your example isn't work at my computer...
> I get this response:
>
> <!-- __________________________________ connect response
> _____________________ -
> ->
> <connect>
> <qos>
> <securityService type="htpasswd" version="1.0"><![CDATA[
> <user>thealex</user>
> <passwd>secret</passwd>
> ]]></securityService>
> <instanceId>/xmlBlaster/node/leha/instanceId/1139216397811</instanceId>
> <session name='/node/leha/client/thealex/-3' timeout='86400000'
> maxSessions='1
> 0' clearSessions='false' reconnectSameClientOnly='false'
> sessionId='sessionId:19
> 2.168.200.112-null-1139216415752-2035927574-3'/>
> <queue relating='connection' maxEntries='10000000' maxEntriesCache='1000'>
> <address type='SOCKET' dispatchPlugin='undef'>
> <attribute name='localPort'>1438</attribute>
> <attribute name='localHostname'>192.168.200.112</attribute>
> </address>
> </queue>
> <queue relating='subject' type='CACHE' version='1.0'/>
> <queue relating='callback' type='CACHE' version='1.0' maxEntries='1000'
> maxEnt
> riesCache='1000'>
> <callback type='SOCKET' dispatchPlugin='undef'>
> <attribute name='__ContextNode'
> type='String'>/xmlBlaster/node/leha/client/t
> healex/session/-3</attribute>
> </callback>
> </queue>
> </qos>
> </connect>
>
> <!-- __________________________________ publish response
> _____________________ -
> ->
> <publish>
> <qos>
> <key oid='1'/>
> <rcvTimestamp nanos='1139216415924000000'/>
> <isPublish/>
> </qos>
> </publish>
>
> <!-- __________________________________ get response
> _____________________ -->
> <get>
> </get>
>
> <!-- __________________________________ erase response
> _____________________ -->
>
> <erase>
> <qos>
> <key oid='1'/>
> <isErase/>
> </qos>
> </erase>
> [06.02.2006 12:00:46 INFO main XmlBlasterAccess-client/thealex] Successful
> disc
> onnect from /xmlBlaster/node/leha
>
> <!-- __________________________________ disconnect response
> ____________________
> _ -->
> <disconnect>
> true
> </disconnect>
>
> Maybe I configured xmlBlaster wrong?
> Please, help me.
> I work under WinXP SP1, JDK 1.5.0.6, xmlBlaster 1.1.1.
>
> There are a segments of xmlBlaster's dump after publishing:
>
> <XmlKeyDom>
> <xmlBlaster><key oid="__sys__UserList"><__sys__internal/></key><key
> oid="__sys__Login"/><key oid="__sys__Logout"/><key oid="1"><rose><color
> id=""/></rose></key></xmlBlaster>
> </XmlKeyDom>
>
> <TopicHandler id='leha/topic/1' state='ALIVE'>
> ...
> <MsgUnitWrapper id='1/2006-02-03 19:47:17.162' referenceCount='1'
> state='ALIVE'>
>
> <qos>
> <sender>/node/leha/client/thealex/-4</sender>
> <rcvTimestamp nanos='1138985237162000000'/>
> <route>
> <node id='leha' stratum='0' timestamp='1138985237162000000'
> dirtyRead='false'/>
> </route>
> <topic>
> <msgDistributor typeVersion='undef,1.0'/>
> <persistence relating='msgUnitStore' type='CACHE' version='1.0'
> maxEntries='100000000' maxEntriesCache='10000' maxBytes='2147483647'
> maxBytesCache='2097152'/>
> <queue relating='history' type='CACHE' version='1.0' maxEntries='10'
> maxEntriesCache='10'/>
> </topic>
> </qos>
>
> <key oid='1'>
> <rose><color id='green'></color></rose>
> </key>
> <content type='String'>First</content>
> </MsgUnitWrapper>
> <SubscriptionInfo>NO SUBSCRIPTIONS</SubscriptionInfo>
> <newCreated>false</newCreated>
> </TopicHandler>
>
> Do you have the same?
> Maybe there is a problem with XmlKeyDom tree? There is other tree without
> empty attributes and contents in example named "How can i query topics with
> XPath?" in xmlBlaster.org's FAQ.
>
> Tthanks a lot,
> Alexey.
>
> Michele Laghi <laghi at swissinfo.org> wrote:
>> Hi Alexey,
>> I tried it with the script:
>>
>> <!--
>> to test it invoke:
>> java javaclients.script.XmlScript -requestFile xpathTest.xml
>> -->
>>
>> <xmlBlaster>
>> <rose>
>> <color id='green'/>
>> </rose>
>>
>> <connect/>
>> <publish><key oid="1"><rose><color
>> id='green'/></rose></key><content><![CDATA[First]]></content></publish>
>>
>> <wait delay="2000" />
>> <get><key queryType="XPATH">//rose/color[ at id='green']</key><qos/></get>
>>
>> <erase><key oid="1"></key><qos><force/></qos></erase>
>> <wait delay="500" />
>> <disconnect />
>> </xmlBlaster>
>>
>>
>> And it correctly returned the published entry.
>> regards
>> Michele
>>
>>
>> Гришков Алексей wrote:
>>> Hello and sorry for my bad English :)
>>>
>>> I have a problem with getting messages(I use Java and PHP demos and my
>>> own Delphi client).
>>>
>>> For example, I publish message like:
>>>
>>> <rose>
>>> <color id='green'/>
>>> </rose>
>>>
>>> and then trying to get it with XPATH //rose/color[ at id='green'], but
>>> don't receive any matching message.
>>> However, if I subscribing first on this message and then publish it,
>>> it's works!
>>>
>>> And there is something strange. If I use //rose/color[ at id=''] i.e. empty
>>> attributes, it's also works.
>>>
>>> What I do wrong?
>>>
>>> Thanks,
>>> Alexey.
>>>
>>>
>>
>> __________ хМТНПЛЮЖХЪ NOD32 1.1392 (20060202) __________
>>
>> щРН ЯННАЫЕМХЕ ОПНБЕПЕМН юМРХБХПСЯМНИ ЯХЯРЕЛНИ NOD32.
>> http://www.eset.com
>>
>>
>
>
>