ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Help on Value Extract:

Post new topic  Reply to topic
 Help on Value Extract: « View previous topic :: View next topic » 
Author Message
cvag
PostPosted: Tue Mar 12, 2013 11:48 am    Post subject: Help on Value Extract: Reply with quote

Centurion

Joined: 17 Mar 2008
Posts: 127

Hi, Can anyone help on extracting the attribute value of SearchHit
Need to get the URL: http://tims.com/xml/Trd1880613c/entity.svc
Tried with the below code but failed to do so.

Sample Trail
Quote:

CREATE COMPUTE MODULE AccessURL
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();

DECLARE href NAMESPACE 'http://tims.com/namespace';
DECLARE xlink NAMESPACE 'http://www.w3.org/1999/xlink';

SET OutputRoot.XMLNSC.URL = InputRoot.XMLNSC.href:Tims.href:Search.(XMLNSC.PCDataField)href:SearchHit.(XMLNSC.Attribute)href;
RETURN TRUE;
END;


InputMsg:
Quote:

<?xml version="1.0" encoding="ISO-8859-1"?>
<Tims
xsi:schemaLocation="http://tims.com/namespace http://tims.com/xsd/Tims.xsd"
xmlns="http://tims.com/namespace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<Search scope="project" root="Trd481p" entity="case"
casesensitive="false" save="true" xlink:href="http://tims.com/xml/Trd635975s/search.svc">
<DatabaseID xlink:href="http://tims.com/xml/CABLE-MOD/database.svc">CABLE-MOD</DatabaseID>
<ProjectID xlink:href="http://tims.com/xml/Trd481p/project.svc">Trd481p</ProjectID>
<SearchID xlink:href="http://tims.com/xml/Trd635975s/search.svc">Trd635975s</SearchID>
<Root>
<ID xlink:href="http://tims.com/xml/Trd481p/project.svc">Trd481p</ID>
</Root>
<DateCriterion operator="thisweek">
<FieldName><![CDATA[Created]]></FieldName>
</DateCriterion>
<DateCriterion operator="thisweek">
<FieldName><![CDATA[Modified]]></FieldName>
</DateCriterion>
<Title><![CDATA[Test Case-TRI Search]]></Title>
<Description><![CDATA[TIMS Rally Integration Search..]]></Description>
<SearchHit xlink:href="http://tims.com/xml/Trd1880613c/entity.svc">Trd1880613c</SearchHit>
</Search>
<Timestamp>2013-03-12T09:34:12-04:00</Timestamp>
<ExecutionTime>0.319</ExecutionTime>
</Tims>


Trace:
Quote:

(0x01000000:Folder):XMLNSC = ( ['xmlnsc' : 0x2207410]
(0x01000400:NamespaceDecl):XmlDeclaration = (
(0x03000100:Attribute):Version = '1.0' (CHARACTER)
(0x03000100:Attribute):Encoding = 'ISO-8859-1' (CHARACTER)
)
(0x01000000:Folder )http://tims.com/namespace:Tims = (
(0x03000102:NamespaceDecl):xmlns = 'http://tims.com/namespace' (CHARACTER)
(0x03000102:NamespaceDecl)http://www.w3.org/2000/xmlns/:xsi = 'http://www.w3.org/2001/XMLSchema-instance' (CHARACTER)
(0x03000102:NamespaceDecl)http://www.w3.org/2000/xmlns/:xlink = 'http://www.w3.org/1999/xlink' (CHARACTER)
(0x03000100:Attribute )http://www.w3.org/2001/XMLSchema-instance:schemaLocation = 'http://tims.com/namespace http://tims.com/xsd/Tims.xsd' (CHARACTER)
(0x01000000:Folder )http://tims.com/namespace:Search = (
(0x03000100:Attribute ):scope = 'project' (CHARACTER)
(0x03000100:Attribute ):root = 'Trd481p' (CHARACTER)
(0x03000100:Attribute ):entity = 'case' (CHARACTER)
(0x03000100:Attribute ):casesensitive = 'false' (CHARACTER)
(0x03000100:Attribute ):save = 'true' (CHARACTER)
(0x03000100:Attribute )http://www.w3.org/1999/xlink:href = 'http://tims.com/xml/Trd635975s/search.svc' (CHARACTER)
(0x03000000:PCDataField)http://tims.com/namespace:DatabaseID = 'CABLE-MOD' (CHARACTER)
(
(0x03000100:Attribute)http://www.w3.org/1999/xlink:href = 'http://tims.com/xml/CABLE-MOD/database.svc' (CHARACTER)
)
(0x03000000:PCDataField)http://tims.com/namespace:ProjectID = 'Trd481p' (CHARACTER)
(
(0x03000100:Attribute)http://www.w3.org/1999/xlink:href = 'http://tims.com/xml/Trd481p/project.svc' (CHARACTER)
)
(0x03000000:PCDataField)http://tims.com/namespace:SearchID = 'Trd635975s' (CHARACTER)
(
(0x03000100:Attribute)http://www.w3.org/1999/xlink:href = 'http://tims.com/xml/Trd635975s/search.svc' (CHARACTER)
)
(0x01000000:Folder )http://tims.com/namespace:Root = (
(0x03000000:PCDataField)http://tims.com/namespace:ID = 'Trd481p' (CHARACTER)
(
(0x03000100:Attribute)http://www.w3.org/1999/xlink:href = 'http://tims.com/xml/Trd481p/project.svc' (CHARACTER)
)
)
(0x01000000:Folder )http://tims.com/namespace:DateCriterion = (
(0x03000100:Attribute ):operator = 'thisweek' (CHARACTER)
(0x03000001:CDataField)http://tims.com/namespace:FieldName = 'Created' (CHARACTER)
)
(0x01000000:Folder )http://tims.com/namespace:DateCriterion = (
(0x03000100:Attribute ):operator = 'thisweek' (CHARACTER)
(0x03000001:CDataField)http://tims.com/namespace:FieldName = 'Modified' (CHARACTER)
)
(0x03000001:CDataField )http://tims.com/namespace:Title = 'Test Case-TRI Search' (CHARACTER)
(0x03000001:CDataField )http://tims.com/namespace:Description = 'TIMS Rally Integration Search..' (CHARACTER)
(0x03000000:PCDataField)http://tims.com/namespace:SearchHit = 'Trd1880613c' (CHARACTER)
(
(0x03000100:Attribute)http://www.w3.org/1999/xlink:href = 'http://tims.com/xml/Trd1880613c/entity.svc' (CHARACTER)
)
)
(0x03000000:PCDataField )http://tims.com/namespace:Timestamp = '2013-03-12T09:34:12-04:00' (CHARACTER)
(0x03000000:PCDataField )http://tims.com/namespace:ExecutionTime = '0.319' (CHARACTER)
)
)
)


Thanks in Advance.[/quote]
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Tue Mar 12, 2013 12:32 pm    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi,

It seems to me that you perhaps need namespace for the last href -attribute part too.

--
Marko
Back to top
View user's profile Send private message Visit poster's website
cvag
PostPosted: Tue Mar 12, 2013 12:47 pm    Post subject: Reply with quote

Centurion

Joined: 17 Mar 2008
Posts: 127

Thanks Marko,
It worked as you said. Attribute also requires namespace

Quote:

SET OutputRoot.XMLNSC.URL = FIELDVALUE(InputRoot.XMLNSC.href:Tims.href:Search.(XMLNSC.PCDataField)href:SearchHit.(XMLNSC.Attribute)xlink:href);


Thanks a lot.
[/quote]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Help on Value Extract:
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.