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 » setting field from inputroot

Post new topic  Reply to topic
 setting field from inputroot « View previous topic :: View next topic » 
Author Message
brgmo
PostPosted: Thu Oct 25, 2007 7:41 am    Post subject: setting field from inputroot Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

Hi All,

I am trying to set a field from the inputroot but it doesn't seem to work. Following is the code:

Declare refid Character;
Set refid = InputRoot.os:a.os:b.of:c

i can't see any variable generated.can someone please tell me why. The data is coming as a namespace aware.

Regards
brgmo.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Oct 25, 2007 7:57 am    Post subject: Re: setting field from inputroot Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

brgmo wrote:
Set refid = InputRoot.os:a.os:b.of:c


I would have expected InputRoot.MRM.os:a or InputRoot.XMLNS(C).os:a

Or something of that ilk
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Oct 25, 2007 7:58 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

That would only work if there was a direct child of InputRoot that was named 'a' and in the 'os' namespace.

This would only be true if you specifically created said thing in a previous node on the OutputRoot.

Message data should always be under a Parser tree that is the LAST CHILD of InputRoot. So InputRoot.MRM, InputRoot.XMLNS, InputRoot.BLOB, etc.

You probably want 'InputRoot.XMLNS.os:a.os:b.of:c".
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
brgmo
PostPosted: Thu Oct 25, 2007 8:17 am    Post subject: Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

yes it is like Inputroot.xml.os:a.os:bf.c. any idea why there is no population of this field.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Oct 25, 2007 8:32 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

brgmo wrote:
yes it is like Inputroot.xml.os:a.os:bf.c. any idea why there is no population of this field.


The XML parser is not namespace aware, so none of the tags match.

As previously posted, it needs to be XMLNS or XMLNSC.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
scravr
PostPosted: Thu Oct 25, 2007 10:43 am    Post subject: XMLNSC parshing Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 391
Location: NY NY USA 10021

I have problem using XMLNSC in ESQL. can you please see what is I am doing wrong.

DECLARE NS1 NAMESPACE 'http://www.nyc.ny.gov/enterprise';
DECLARE NS2 NAMESPACE 'http://www.w3.org/2001/XMLSchema';
DECLARE MN REFERENCE TO InputRoot.XMLNSC;
DECLARE ED REFERENCE TO InputRoot.XMLNSC.NS1:EnterpriseDatashareDocument;
DECLARE DB REFERENCE TO InputRoot.NS1:XMLNSC.NS1:EnterpriseDatashareDocument.NS1:DocumentBody;
DECLARE AIB REFERENCE TO InputRoot.XMLNSC.NS1:EnterpriseDatashareDocument.NS1:DocumentBody.NS1:AgencyIntegrationBc;
DECLARE DeptNo REFERENCE TO AIB.NS1:REQUESTTYPE;


always gets error: element #2 is wrong
------------------
Executing statement ''DECLARE NS1 NAMESPACE 'http://www.nyc.ny.gov/enterprise';'' at ('.SHAREPOINT_MF_V102307_DBinsertCompute.Main', '8.3').
Executing statement ''DECLARE NS2 NAMESPACE 'http://www.w3.org/2001/XMLSchema';'' at ('.SHAREPOINT_MF_V102307_DBinsertCompute.Main', '9.3').
Executing statement ''DECLARE MN REFERENCE TO InputRoot.XMLNSC;'' at ('.SHAREPOINT_MF_V102307_DBinsertCompute.Main', '10.3').
('.SHAREPOINT_MF_V102307_DBinsertCompute.Main', '10.28') : Failed to navigate to path element number '2' because it does not exist.
Executing statement ''DECLARE ED REFERENCE TO InputRoot.XMLNSC.NS1:EnterpriseDatashareDocument;'' at ('.SHAREPOINT_MF_V102307_DBinsertCompute.Main', '11.3').
('.SHAREPOINT_MF_V102307_DBinsertCompute.Main', '11.28') : Failed to navigate to path element number '2' because it does not exist.
Executing statement ''DECLARE DB REFERENCE TO InputRoot.NS1:XMLNSC.NS1:EnterpriseDatashareDocument.NS1:DocumentBody;'' at ('.SHAREPOINT_MF_V102307_DBinsertCompute.Main', '12.3').
('.SHAREPOINT_MF_V102307_DBinsertCompute.Main', '12.28') : Failed to navigate to path element number '2' because it does not exist.
Executing statement ''DECLARE AIB REFERENCE TO InputRoot.XMLNSC.NS1:EnterpriseDatashareDocument.NS1:DocumentBody.NS1:AgencyIntegrationBc;'' at ('.SHAREPOINT_MF_V102307_DBinsertCompute.Main', '13.3').
('.SHAREPOINT_MF_V102307_DBinsertCompute.Main', '13.28') : Failed to navigate to path element number '2' because it does not exist.
Executing statement ''DECLARE DeptNo REFERENCE TO AIB.NS1:REQUESTTYPE;'' at ('.SHAREPOINT_MF_V102307_DBinsertCompute.Main', '14.3').
('.SHAREPOINT_MF_V102307_DBinsertCompute.Main', '14.31') : Failed to navigate to path element number '2' because it does not exist.



here is the XSD file:
---------------------
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="EnterpriseDatashareDocument" targetNamespace="http://www.nyc.ny.gov/enterprise"
xmlns:mstns="http://www.nyc.ny.gov/enterprise"
xmlns="http://www.nyc.ny.gov/enterprise"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="EnterpriseDatashareDocument" msdata:IsDataSet="true" msdata:Prefix="e">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="DocumentHeader" msdata:Prefix="e">
<xs:complexType>
<xs:sequence>
<xs:element name="DocumentServiceID" msdata:Prefix="e" type="xs:string" minOccurs="0" />
<xs:element name="DocumentBusinessHeader" msdata:Prefix="e" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="timestamp" form="unqualified" type="xs:string" minOccurs="0" />
<xs:element name="DocumentPostDate" form="unqualified" type="xs:string" minOccurs="0" />
<xs:element name="DocumentPostTime" form="unqualified" type="xs:string" minOccurs="0" />
<xs:element name="count" form="unqualified" type="xs:string" minOccurs="0" />
<xs:element name="seqno" form="unqualified" type="xs:string" minOccurs="0" />
<xs:element name="batch" form="unqualified" type="xs:string" minOccurs="0" />
<xs:element name="linecount" form="unqualified" type="xs:string" minOccurs="0" />
<xs:element name="filename" form="unqualified" type="xs:string" minOccurs="0" />
<xs:element name="sendtime" form="unqualified" type="xs:string" minOccurs="0" />
<xs:element name="header" form="unqualified" type="xs:string" minOccurs="0" />
<xs:element name="headerLine" form="unqualified" type="xs:string" minOccurs="0" />
<xs:element name="AGENCYDATA" form="unqualified">
<xs:complexType>
<xs:sequence>
<xs:element name="CSMSSRNUMBER" form="unqualified" type="xs:string" minOccurs="0" />
<xs:element name="AGENCYSRNUMBER" form="unqualified" type="xs:string" minOccurs="0" />
<xs:element name="REQUESTTYPE" form="unqualified" type="xs:string" minOccurs="0" />
<xs:element name="RESOLUTIONACTION" form="unqualified" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="DocumentBody" msdata:Prefix="e">
<xs:complexType>
<xs:sequence>
<xs:element name="AgencyIntegrationBc" form="unqualified">
<xs:complexType>
<xs:sequence>
<xs:element name="REQUESTTYPE" form="unqualified" type="xs:string" minOccurs="0" />
<xs:element name="ADDITIONALCOMMENTS" form="unqualified" type="xs:string" minOccurs="0" />
<xs:element name="ANONNOTALLOWEDFLAG" form="unqualified" type="xs:string" minOccurs="0" />
<xs:element name="INCIDENTBBL" form="unqualified" type="xs:string" minOccurs="0" />
<xs:element name="INCIDENTBIN" form="unqualified" type="xs:string" minOccurs="0" />





I am on :
---------
C:\Program Files\IBM\MQSI\6.0>mqsiservice -v
BIPv600 en US
ucnv Console CCSID 437 dft ucnv CCSID 5348
ICUW ibm-5348_P100-1997 ICUA ibm-5348_P100-1997
BIP8996I: Version: 6003
BIP8997I: Product: WebSphere Message Brokers
BIP8998I: CMVC Level: S600-CSD03 DH600-L60821.1
BIP8999I: Build Type: Production
BIP8071I: Successful command completion.
C:\Program Files\IBM\MQSI\6.0>


please contact:
Moshe Avraham
914-484-0203
mosheavraham2002@yahoo.com
Back to top
View user's profile Send private message Send e-mail MSN Messenger
jefflowrey
PostPosted: Thu Oct 25, 2007 11:33 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

InputRoot.XMLNSC doesn't exist.

That's why the DECLARE MN REFERENCE TO statement fails.

That's why every reference after that fails.

Also, it's completely invalid to specify NS1:XMLNSC.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
scravr
PostPosted: Thu Oct 25, 2007 11:46 am    Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 391
Location: NY NY USA 10021

well, obviously InputRoot.XMLNSC doesn't exist. And you are correct, all could not be parshed.
what do you think i should change it to: Root.XMLNSC, Body.XMLNSC, or anything else?
I tried NS1:XMLNSC and other combinations, just incase parsher gets bogose, bananess, and i may be locky.

any ideas?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
jefflowrey
PostPosted: Thu Oct 25, 2007 12:10 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Why doesn't InputRoot.XMLNSC exist?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Oct 25, 2007 1:38 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Hi scravr,

Please describe the settings on your input node. Especially the 'Domain' setting.
Please put a Trace node just after you input node, and post the results here. ( a Trace node is one of the most useful diagnostic tools for a message flow developer. So it's a good idea to get to know it, if you don't already ).
Back to top
View user's profile Send private message
scravr
PostPosted: Thu Oct 25, 2007 1:59 pm    Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 391
Location: NY NY USA 10021

good. yes it works.

like these:

DECLARE NS1 NAMESPACE 'http://www.nyc.ny.gov/enterprise';
DECLARE NS2 NAMESPACE 'http://www.w3.org/2001/XMLSchema';
DECLARE ED REFERENCE TO InputRoot.XMLNSC.NS1:EnterpriseDatashareDocument;
DECLARE DB REFERENCE TO InputRoot.XMLNSC.NS1:EnterpriseDatashareDocument.NS1:DocumentBody;
DECLARE AIB REFERENCE TO InputRoot.XMLNSC.NS1:EnterpriseDatashareDocument.NS1:DocumentBody.AgencyIntegrationBc;
DECLARE DeptNo REFERENCE TO AIB.REQUESTTYPE;


not all element have NS attached.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » setting field from inputroot
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.