Author |
Message
|
tmpost |
Posted: Wed Jul 08, 2009 10:51 am Post subject: Problem referencing value after MRM-XML parse |
|
|
Newbie
Joined: 26 Jan 2007 Posts: 4 Location: Greensboro
|
Hopefully this is an easy one.
I'm having problems getting getting the value after an MRM/XML parse
I have found that I can get value a parse that has
(0x0300000D:NameValue+)
but not from one that looks like:
(0x01000013:Name+)
(0x0200000B:Value+):
--------------------------------------------------------------------------------------
(0x01000021:Name+):MRM = ( ['mrm' : 0x4735868]
(0x0300000B:NameValue+):releaseID = '' (CHARACTER)
(0x01000013:Name+ )(some url):DataArea = (
(0x01000013:Name+)(some url):Requisition = (
(0x01000013:Name+)(some url):RequisitionHeader = (
(0x01000013:Name+)(some url):DocumentReference = (
(0x01000013:Name+)(some url):Type = (
(0x0200000B:Value+): = 'PG' (CHARACTER)
)
)
(0x01000013:Name+)(some url):Status = (
(0x01000013:Name+)(some url):Code = (
(0x0200000B:Value+): = '01' (CHARACTER)
)
)
(0x01000013:Name+)(some url):SupplierParty = (
(0x01000013:Name+)(some url):PartyIDs = (
(0x0300000D:NameValue+)(some url):ID = 'T132' (CHARACTER)
)
)
--------------------------------------------------------------------------------------
**** HERE'S MY CODE **** Used THROW to Demonstrate
DECLARE oa NAMESPACE '(some url)';
DECLARE ref REFERENCE TO InputRoot.MRM.oa:DataArea.oa:Requisition.oa:RequisitionHeader;
THROW USER EXCEPTION MESSAGE 2957 VALUES ('Code',ref.oa:Status.oa:Code),'ID',ref.oa:SupplierParty.oa:PartyIDs.oa:ID);
I’ve also tried using the FIELDVALUE function and had the same results.
THROW USER EXCEPTION MESSAGE 2957 VALUES ('Code',FIELDVALUE(ref.oa:Status.oa:Code),'ID',FIELDVALUE(ref.oa:SupplierParty.oa:PartyIDs.oa:ID));
--------------------------------------------------------------------------------------
**** HERE'S EXCEPTION TRACE ****
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = 'THROW EXCEPTION MESSAGE 2957 VALUES( 'Code', ref.oa:Status.oa:Code, 'ID', ref.oa:SupplierParty.oa:PartyIDs.oa:ID);' (CHARACTER)
)
(0x01000000:Name ):UserException = (
(0x03000000:NameValue):File = 'F:\build\S610_P\src\DataFlowEngine\ImbRdl\ImbRdlThrowExceptionStatements.cpp' (CHARACTER)
(0x03000000:NameValue):Line = 224 (INTEGER)
(0x03000000:NameValue):Function = 'SqlThrowExceptionStatement::execute' (CHARACTER)
(0x03000000:NameValue):Type = 'ComIbmComputeNode' (CHARACTER)
(0x03000000:NameValue):Name = 'esb/VFC_ESB_PROCESSREQUISITION_ADAPT#FCMComposite_1_10' (CHARACTER)
(0x03000000:NameValue):Label = 'esb.VFC_ESB_PROCESSREQUISITION_ADAPT.Compute' (CHARACTER)
(0x03000000:NameValue):Catalog = 'BIPv610' (CHARACTER)
(0x03000000:NameValue):Severity = 1 (INTEGER)
(0x03000000:NameValue):Number = 2957 (INTEGER)
(0x03000000:NameValue):Text = 'User generated exception' (CHARACTER)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = 'Code' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 0 (INTEGER)
(0x03000000:NameValue):Text = '' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = 'ID' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = 'T132' (CHARACTER)
) |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 08, 2009 1:26 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Thanks for taking the time to post a good, clear problem description.
Quote: |
I'm having problems getting getting the value after an MRM/XML parse |
Take a user trace. It will identify the path segment that is failing to match the message tree. As I'm always saying, user trace is a very powerful debugging tool.
Code: |
DECLARE ref REFERENCE TO InputRoot.MRM.oa:DataArea.oa:Requisition.oa:RequisitionHeader; |
You should always check LASTMOVE after declaring or moving a reference. |
|
Back to top |
|
 |
tmpost |
Posted: Fri Jul 10, 2009 7:00 am Post subject: |
|
|
Newbie
Joined: 26 Jan 2007 Posts: 4 Location: Greensboro
|
Sorry for the late response....I had to spend the time getting it to work. I used XMLNSC parser and everything is fine now.
I have run a UserTrace and here are the results it's telling me the field (Code) is resulting in NULL...which is the problem..I've reposted the parse below trace for reference again.
UserTrace BIP2539I: Node 'esb.VFC_I2SC_PROCESSREQUISITION_MRMXML.Compute_MRMXML': Evaluating expression ''ref.oa:Status.oa:Code'' at ('esb.VFC_I2SC_PROCESSREQUISITION_MRMXML_Compute.Main', '29.55'). This resolved to ''ref.http://www.openapplications.org/oagis/9:Status.http://www.openapplications.org/oagis/9:Code''. The result was ''NULL''.
UserTrace BIP2539I: Node 'esb.VFC_I2SC_PROCESSREQUISITION_MRMXML.Compute_MRMXML': Evaluating expression ''ref.oa:SupplierParty.oa:PartyIDs.oa:ID'' at ('esb.VFC_I2SC_PROCESSREQUISITION_MRMXML_Compute.Main', '29.82'). This resolved to ''ref.http://www.openapplications.org/oagis/9:SupplierParty.http://www.openapplications.org/oagis/9:PartyIDs.http://www.openapplications.org/oagis/9:ID''. The result was '''T132'''.
(0x01000021:Name+):MRM = ( ['mrm' : 0x720c808]
(0x0300000B:NameValue+):releaseID = '' (CHARACTER)
(0x01000013:Name+ )http://www.openapplications.org/oagis/9:ApplicationArea = (
(0x01000013:Name+ )http://www.openapplications.org/oagis/9:Sender = (
(0x01000013:Name+)http://www.openapplications.org/oagis/9:LogicalID = (
(0x0200000B:Value+): = '(host name determine dynamically)' (CHARACTER)
)
(0x01000013:Name+)http://www.openapplications.org/oagis/9:ComponentID = (
(0x0200000B:Value+): = 'I2SC' (CHARACTER)
)
(0x01000013:Name+)http://www.openapplications.org/oagis/9:TaskID = (
(0x0200000B:Value+): = '(program or module name)' (CHARACTER)
)
(0x01000013:Name+)http://www.openapplications.org/oagis/9:ReferenceID = (
(0x0200000B:Value+): = '(uniquie instance id of TaskID, if available)' (CHARACTER)
)
(0x01000013:Name+)http://www.openapplications.org/oagis/9:ConfirmationCode = (
(0x0200000B:Value+): = 'Never' (CHARACTER)
)
)
(0x0300000B:NameValue+)http://www.openapplications.org/oagis/9:CreationDateTime = TIMESTAMP '1967-08-13 08:00:00' (TIMESTAMP)
(0x01000013:Name+ )http://www.openapplications.org/oagis/9:BODID = (
(0x0200000B:Value+): = '(generated GUID)' (CHARACTER)
)
)
(0x01000013:Name+ )http://www.openapplications.org/oagis/9:DataArea = (
(0x01000013:Name+)http://www.openapplications.org/oagis/9:Process = (
(0x01000013:Name+)http://www.openapplications.org/oagis/9:ActionCriteria = (
(0x03000013:NameValue+)http://www.openapplications.org/oagis/9:ActionExpression = 'token' (CHARACTER)
(
(0x0300000B:NameValue+):actionCode = '' (CHARACTER)
)
)
)
(0x01000013:Name+)http://www.openapplications.org/oagis/9:Requisition = (
(0x01000013:Name+)http://www.openapplications.org/oagis/9:RequisitionHeader = (
(0x01000013:Name+)http://www.openapplications.org/oagis/9:DocumentReference = (
(0x01000013:Name+)http://www.openapplications.org/oagis/9:Type = (
(0x0200000B:Value+): = 'PG' (CHARACTER)
)
)
(0x01000013:Name+)http://www.openapplications.org/oagis/9:Status = (
(0x01000013:Name+)http://www.openapplications.org/oagis/9:Code = (
(0x0200000B:Value+): = '01' (CHARACTER)
)
)
(0x01000013:Name+)http://www.openapplications.org/oagis/9:SupplierParty = (
(0x01000013:Name+)http://www.openapplications.org/oagis/9:PartyIDs = (
(0x0300000D:NameValue+)http://www.openapplications.org/oagis/9:ID = 'T132' (CHARACTER)
)
)
Thanks |
|
Back to top |
|
 |
kimbert |
Posted: Fri Jul 10, 2009 7:14 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I used XMLNSC parser and everything is fine now. |
So you stopped using MRM XML and started using XMLNSC, and everything suddenly got better...  |
|
Back to top |
|
 |
tmpost |
Posted: Fri Jul 10, 2009 9:34 am Post subject: |
|
|
Newbie
Joined: 26 Jan 2007 Posts: 4 Location: Greensboro
|
Sure did...here's the XMLNSC parse, of just the 2 relevent fields (Code and ID)...I also have just those 2 fields on the MRM/XML parse below that.
Bottom line is that on MRM/XML parse if value is represented next to (0x0300000D:NameValue+) I can map it fine (ex: ID) ....if it parses to (0x01000013:Name+) on 1 line and (0x0200000B:Value+) on second line, a map to it returns NULL (ex:Code) ...It's that way with every field where Name and Value are on different lines....This XSD was imported from OAGIS.
(0x01000000:Folder)http://www.openapplications.org/oagis/9:Status = (
(0x03000000:PCDataField)http://www.openapplications.org/oagis/9:Code = '01' (CHARACTER)
)
(0x01000000:Folder)http://www.openapplications.org/oagis/9:SupplierParty = (
(0x01000000:Folder)http://www.openapplications.org/oagis/9:PartyIDs = (
(0x03000000:PCDataField)http://www.openapplications.org/oagis/9:ID = 'T132' (CHARACTER)
)
Here's the MRM/XML parse with message set/message applied
(0x01000013:Name+)http://www.openapplications.org/oagis/9:Status = (
(0x01000013:Name+)http://www.openapplications.org/oagis/9:Code = (
(0x0200000B:Value+): = '01' (CHARACTER)
)
)
(0x01000013:Name+)http://www.openapplications.org/oagis/9:SupplierParty = (
(0x01000013:Name+)http://www.openapplications.org/oagis/9:PartyIDs = (
(0x0300000D:NameValue+)http://www.openapplications.org/oagis/9:ID = 'T132' (CHARACTER)
) |
|
Back to top |
|
 |
kimbert |
Posted: Fri Jul 10, 2009 12:30 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Please can you post the snippet of XML which is causing the two-line version of the trace. |
|
Back to top |
|
 |
tmpost |
Posted: Fri Jul 10, 2009 12:42 pm Post subject: |
|
|
Newbie
Joined: 26 Jan 2007 Posts: 4 Location: Greensboro
|
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2009 sp1 (http://www.altova.com) by Software Administrator (VF Services) -->
<!--Sample XML file generated by XMLSpy v2009 sp1 (http://www.altova.com)-->
<ProcessRequisition releaseID="" xsi:schemaLocation="http://www.openapplications.org/oagis/9 VFProcessRequisition.xsd" xmlns="http://www.openapplications.org/oagis/9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ApplicationArea>
<Sender>
<LogicalID>(host name determine dynamically)</LogicalID>
<ComponentID>I2SC</ComponentID>
<TaskID>(program or module name)</TaskID>
<ReferenceID>(uniquie instance id of TaskID, if available)</ReferenceID>
<ConfirmationCode>Never</ConfirmationCode>
</Sender>
<CreationDateTime>1967-08-13T08:00:00.123Z</CreationDateTime>
<BODID>(generated GUID)</BODID>
</ApplicationArea>
<DataArea>
<Process>
<ActionCriteria>
<ActionExpression actionCode="">token</ActionExpression>
</ActionCriteria>
</Process>
<Requisition>
<RequisitionHeader>
<DocumentReference>
<Type>PG</Type>
</DocumentReference>
<Status>
<Code>01</Code>
</Status>
<SupplierParty>
<PartyIDs>
<ID>T132</ID>
</PartyIDs>
</SupplierParty>
<ShipToParty>
<PartyIDs>
<ID>T936</ID>
</PartyIDs>
</ShipToParty>
</RequisitionHeader>
<RequisitionLine>
<Item>
<ManufacturerItemID>
<ID>A193U50:L</ID>
</ManufacturerItemID>
</Item>
<Quantity>30</Quantity>
<RequiredDeliveryDateTime>2009-08-01T23:00:00.123Z</RequiredDeliveryDateTime>
<RequiredStartDateTime>2009-06-01T12:00:00Z</RequiredStartDateTime>
<RequiredExitDateTime>2009-07-01T15:30:15Z</RequiredExitDateTime>
<RequiredBuyMonth>AUG</RequiredBuyMonth>
</RequisitionLine>
<RequisitionLine>
<Item>
<ManufacturerItemID>
<ID>A193U50:M</ID>
</ManufacturerItemID>
</Item>
<Quantity>40</Quantity>
<RequiredDeliveryDateTime>2009-08-01T23:00:00.123Z</RequiredDeliveryDateTime>
<RequiredStartDateTime>2009-06-01T12:00:00Z</RequiredStartDateTime>
<RequiredExitDateTime>2009-07-01T15:30:15Z</RequiredExitDateTime>
<RequiredBuyMonth>AUG</RequiredBuyMonth>
</RequisitionLine>
<RequisitionLine>
<Item>
<ManufacturerItemID>
<ID>A193U50:S</ID>
</ManufacturerItemID>
</Item>
<Quantity>20</Quantity>
<RequiredDeliveryDateTime>2009-08-01T23:00:00.123Z</RequiredDeliveryDateTime>
<RequiredStartDateTime>2009-06-01T12:00:00Z</RequiredStartDateTime>
<RequiredExitDateTime>2009-07-01T15:30:15Z</RequiredExitDateTime>
<RequiredBuyMonth>AUG</RequiredBuyMonth>
</RequisitionLine>
</Requisition>
</DataArea>
</ProcessRequisition> |
|
Back to top |
|
 |
|