|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Attribute creation |
« View previous topic :: View next topic » |
Author |
Message
|
ihatelovestories |
Posted: Tue Dec 27, 2011 10:03 pm Post subject: Attribute creation |
|
|
Novice
Joined: 27 Dec 2011 Posts: 14
|
Hi all,
I am not able to find the possible mistake in my code..
in my expected output xml i am expecting an attribute to one of the xml element, but it cmg as element.
Expected output:
Quote: |
<?xml version="1.0" encoding="UTF-8" ?><tns:DataPDU xmlns:tns="urn:swift:saa:xsd:saa.2.0"><tns:Revision>2.0.2</tns:Revision><tns:Header><tns:Message><tns:SenderReference>20111215104521</tns:SenderReference><tns:MessageIdentifier>7.0</tns:MessageIdentifier><tns:Format>AnyXML</tns:Format><tns:SubFormat>Input</tns:SubFormat><tns:Sender><tns:DN>xxxxxxx</tns:DN><tns:FullName><tns:X1>xxxxxX</tns:X1></tns:FullName></tns:Sender><tns:Receiver><tns:DN>xxxxx</tns:DN><tns:FullName><tns:X1>xxxx</tns:X1></tns:FullName></tns:Receiver><tns:InterfaceInfo><tns:UserReference>20111215104521</tns:UserReference></tns:InterfaceInfo><tns:NetworkInfo><tns:Service>xxxx</tns:Service><tns:SWIFTNetNetworkInfo><tns:PayloadAttributes><tns:PayloadAttribute><tns:Name>type</tns:Name><tns:Value>com.swift.inaws.swclasses.SwSelectionRequest</tns:Value></tns:PayloadAttribute></tns:PayloadAttributes></tns:SWIFTNetNetworkInfo></tns:NetworkInfo></tns:Message></tns:Header><tns:Body><mTaskRefS>myNewTask_1</mTaskRefS><mSwCriteriaA type="com.swift.inaws.swclasses.SwTaskCriterium"><mValueS>U</mValueS><mOperatorS>EQL</mOperatorS><mFieldNameS>xxxxx</mFieldNameS><mKeywordS/></mSwCriteriaA><mSwCriteriaA type="com.swift.inaws.swclasses.SwTaskCriterium"><mValueS>1</mValueS><mOperatorS>EQL</mOperatorS><mFieldNameS>xxxxx</mFieldNameS><mKeywordS/></mSwCriteriaA><mBlockSizeI>3</mBlockSizeI><mEntityS>XXX</mEntityS><mTableS>xxx_300</mTableS><mMatchAllCriteriaB>FALSE</mMatchAllCriteriaB><mFunctionS>sssss</mFunctionS><mTypeFormatB>TRUE</mTypeFormatB></tns:Body></tns:DataPDU> |
but output cmg as:
Quote: |
<?xml version="1.0" encoding="UTF-8" ?>
<NS1:DataPDU xmlns:NS1="urn:swift:saa:xsd:saa.2.0">
<NS1:Revision>2.0.2</NS1:Revision>
<NS1:Header>
<type>com.swift.inaws.swclasses.SwTaskCriterium</type>
<NS1:Message>
<NS1:SenderReference>35407560-310f-11e1-9420-000000000000</NS1:SenderReference>
<NS1:MessageIdentifier>.0</NS1:MessageIdentifier>
<NS1:Format>AnyXML</NS1:Format>
<NS1:SubFormat>Input</NS1:SubFormat>
<NS1:Sender>
<NS1:DN>xxxx</NS1:DN>
<NS1:FullName>
<NS1:X1>xxx</NS1:X1>
</NS1:FullName>
</NS1:Sender>
<NS1:Receiver>
<NS1:DN>xxxx</NS1:DN>
<NS1:FullName>
<NS1:X1>xxxx</NS1:X1>
</NS1:FullName>
</NS1:Receiver>
<NS1:InterfaceInfo>
<NS1:UserReference>35408fa0-310f-11e1-9420-000000000000</NS1:UserReference>
</NS1:InterfaceInfo>
<NS1:NetworkInfo>
<NS1:Service>xxxx</NS1:Service>
<NS1:SWIFTNetNetworkInfo>
<NS1:PayloadAttributes>
<NS1:PayloadAttribute>
<NS1:Name>type</NS1:Name><NS1:Value>com.swift.inaws.swclasses.SwSelectionRequest</NS1:Value> </NS1:PayloadAttribute>
</NS1:PayloadAttributes>
</NS1:SWIFTNetNetworkInfo>
</NS1:NetworkInfo>
</NS1:Message>
</NS1:Header>
<NS1:Body>
<mTaskRefS>35409d06-310f-11e1-9420-000000000000</mTaskRefS>
<mSwCriteriaA>
<type>com.swift.inaws.swclasses.SwTaskCriterium</type>
<mValueS>U</mValueS>
<mOperatorS>EQL</mOperatorS>
<mFieldNameS>DEAL_Deal_Status</mFieldNameS>
<mKeywordS></mKeywordS>
</mSwCriteriaA>
<mSwCriteriaA>
<type>com.swift.inaws.swclasses.SwTaskCriterium</type>
<mValueS>1</mValueS>
<mOperatorS>EQL</mOperatorS>
<mFieldNameS>sss</mFieldNameS>
<mKeywordS></mKeywordS>
</mSwCriteriaA>
<mBlockSizeI>25</mBlockSizeI>
<EntityS>xxxxXX</EntityS>
<mTableS>deal_300</mTableS>
<mMatchAllCriteriaB>true</mMatchAllCriteriaB>
<mFunctionS>xxxxxx</mFunctionS>
<mTypeFormatB>true</mTypeFormatB>
</NS1:Body>
</NS1:DataPDU> |
Code I am using:
Quote: |
DECLARE iLRef REFERENCE TO InputLocalEnvironment.Variable.Data;
SET iLRef.ns:DataPDU.ns:Revision = '2.0.2';
SET iLRef.ns:DataPDU.ns:Header.ns:Message.ns:SenderReference = SUBSTRING(UUIDASCHAR FROM 1 FOR 50);
SET iLRef.ns:DataPDU.ns:Header.ns:Message.ns:MessageIdentifier = 'xxx7.0';
SET iLRef.ns:DataPDU.ns:Header.ns:Message.ns:Format='AnyXML';
SET iLRef.ns:DataPDU.ns:Header.ns:Message.ns:SubFormat = 'Input';
SET iLRef.ns:DataPDU.ns:Header.ns:Message.ns:Sender.ns:DN = 'xxxx';
SET iLRef.ns:DataPDU.ns:Header.ns:Message.ns:Sender.ns:FullName.ns:X1= 'xxxx';
SET iLRef.ns:DataPDU.ns:Header.ns:Message.ns:Receiver.ns:DN= 'xxxx';
SET iLRef.ns:DataPDU.ns:Header.ns:Message.ns:Receiver.ns:FullName.ns:X1= 'xxxx';
SET iLRef.ns:DataPDU.ns:Header.ns:Message.ns:InterfaceInfo.ns:UserReference = UUIDASCHAR;
SET iLRef.ns:DataPDU.ns:Header.ns:Message.ns:NetworkInfo.ns:Service = 'xxxxx';
SET iLRef.ns:DataPDU.ns:Header.ns:Message.ns:NetworkInfo.ns:SWIFTNetNetworkInfo.ns:PayloadAttributes.ns:PayloadAttribute.ns:Name = 'type';
SET iLRef.ns:DataPDU.ns:Header.ns:Message.ns:NetworkInfo.ns:SWIFTNetNetworkInfo.ns:PayloadAttributes.ns:PayloadAttribute.ns:Value = 'com.swift.inaws.swclasses.SwSelectionRequest';
SET iLRef.ns:DataPDU.ns:Body.mTaskRefS = UUIDASCHAR;
SET iLRef.ns:DataPDU.ns:Body.mSwCriteriaA[1].(XMLNSC.Attribute)type = 'com.swift.inaws.swclasses.SwTaskCriterium';
SET iLRef.ns:DataPDU.ns:Body.mSwCriteriaA[1].mValueS='U';
SET iLRef.ns:DataPDU.ns:Body.mSwCriteriaA[1].mOperatorS = 'EQL';
SET iLRef.ns:DataPDU.ns:Body.mSwCriteriaA[1].mFieldNameS = 'xxxx';
SET iLRef.ns:DataPDU.ns:Body.mSwCriteriaA[1].mKeywordS ='';
SET iLRef.ns:DataPDU.ns:Body.mSwCriteriaA[2].(XMLNSC.Attribute)type = 'com.swift.inaws.swclasses.SwTaskCriterium';[/b]
SET iLRef.ns:DataPDU.ns:Body.mSwCriteriaA[2].mValueS='1';
SET iLRef.ns:DataPDU.ns:Body.mSwCriteriaA[2].mOperatorS = 'EQL';
SET iLRef.ns:DataPDU.ns:Body.mSwCriteriaA[2].mFieldNameS = 'xxx;
SET iLRef.ns:DataPDU.ns:Body.mSwCriteriaA[2].mKeywordS ='';
SET iLRef.ns:DataPDU.ns:Body.mBlockSizeI=25;
SET iLRef.ns:DataPDU.ns:Body.EntityS = 'xxx';
SET iLRef.ns:DataPDU.ns:Body.mTableS = 'xxx_300';
SET iLRef.ns:DataPDU.ns:Body.mMatchAllCriteriaB = TRUE;
SET iLRef.ns:DataPDU.ns:Body.mFunctionS = 'FCT_GET_SELECTED';
SET iLRef.ns:DataPDU.ns:Body.mTypeFormatB=TRUE; |
not sure what couldbe the wrong in my code.... please look at the[b] blod part of the quotes.. |
|
Back to top |
|
 |
marko.pitkanen |
Posted: Tue Dec 27, 2011 10:35 pm Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
Hi,
Quote: |
DECLARE iLRef REFERENCE TO InputLocalEnvironment.Variable.Data; |
Did you assign XMLNSC parser/domain to your logical subtree Data?
--
marko |
|
Back to top |
|
 |
ihatelovestories |
Posted: Tue Dec 27, 2011 11:15 pm Post subject: |
|
|
Novice
Joined: 27 Dec 2011 Posts: 14
|
marko.pitkanen wrote: |
Hi,
Did you assign XMLNSC parser/domain to your logical subtree Data?
|
Hi Marko,
no I didn't .. do I need to define it if i want to add attribute?
without that can't I create attribute ? |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Dec 28, 2011 5:17 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
ihatelovestories wrote: |
marko.pitkanen wrote: |
Hi,
Did you assign XMLNSC parser/domain to your logical subtree Data?
|
Hi Marko,
no I didn't .. do I need to define it if i want to add attribute?
without that can't I create attribute ? |
Yes you do. The environment tree has no parser by default. You need to assign your part of the tree a parser if you want to use attributes...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
ihatelovestories |
Posted: Wed Dec 28, 2011 5:43 pm Post subject: |
|
|
Novice
Joined: 27 Dec 2011 Posts: 14
|
[quote="fjb_saper"][quote="ihatelovestories"]
marko.pitkanen wrote: |
Hi,
Did you assign XMLNSC parser/domain to your logical subtree Data?
|
Thanks Marko,fjb_saper it worked ... |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|