Author |
Message
|
msilva18 |
Posted: Wed Nov 23, 2005 7:51 pm Post subject: Problems with attributes |
|
|
Apprentice
Joined: 25 Aug 2004 Posts: 31
|
Hi all:
I need help, I have a transformation from CWF type to XML, but my message definition file was created by a wsdl archive and this file have attributes like @class, @type, etc. The problem is that the attributes in the result message are like fields and not like attribute.
For example:
I need this message:
<?xml version="1.0"?>
<SAT_SELLO_REQ>
<FieldTypes>
<SAT_SELLO class="R">
<SAT_ORIGINAL type="CHAR"/>
</SAT_SELLO>
<PSCAMA class="R">
<LANGUAGE_CD type="CHAR"/>
<AUDIT_ACTN type="CHAR"/>
<BASE_LANGUAGE_CD type="CHAR"/>
<MSG_SEQ_FLG type="CHAR"/>
<PROCESS_INSTANCE type="NUMBER"/>
<PUBLISH_RULE_ID type="CHAR"/>
<MSGNODENAME type="CHAR"/>
</PSCAMA>
</FieldTypes>
<MsgData>
<Transaction>
<SAT_SELLO class="R">
<SAT_ORIGINAL>fgnhbgndgfhn</SAT_ORIGINAL>
</SAT_SELLO>
<PSCAMA class="R">
<LANGUAGE_CD>ENG</LANGUAGE_CD>
<AUDIT_ACTN/>
<BASE_LANGUAGE_CD>ENG</BASE_LANGUAGE_CD>
<MSG_SEQ_FLG/>
<PROCESS_INSTANCE>0</PROCESS_INSTANCE>
<PUBLISH_RULE_ID/>
<MSGNODENAME/>
</PSCAMA>
</Transaction>
</MsgData>
</SAT_SELLO_REQ>
And the message result is:
<?xml version="1.0"?>
<SAT_SELLO_REQ>
<FieldTypes>
<SAT_SELLO>
<class>R</class>
<SAT_ORIGINAL>
<type>CHAR</type>
</SAT_SELLO>
<PSCAMA>
<class>R</class>
<LANGUAGE_CD/>
<type>CHAR</type>
<AUDIT_ACTN/>
<type>CHAR</type>
<BASE_LANGUAGE_CD/>
<type>CHAR</type>
<MSG_SEQ_FLG/>
<type>CHAR</type>
<PROCESS_INSTANCE/>
<type>NUMBER</type>
<PUBLISH_RULE_ID>
<type>CHAR</type>
<MSGNODENAME/>
<type>CHAR</type>
</PSCAMA>
</FieldTypes>
<MsgData>
<Transaction>
<SAT_SELLO>
<class>R</class>
<SAT_ORIGINAL>fgnhbgndgfhn</SAT_ORIGINAL>
</SAT_SELLO>
<PSCAMA>
<class>R</class>
<LANGUAGE_CD>ENG</LANGUAGE_CD>
<AUDIT_ACTN/>
<BASE_LANGUAGE_CD>ENG</BASE_LANGUAGE_CD>
<MSG_SEQ_FLG/>
<PROCESS_INSTANCE>0</PROCESS_INSTANCE>
<PUBLISH_RULE_ID/>
<MSGNODENAME/>
</PSCAMA>
</Transaction>
</MsgData>
</SAT_SELLO_REQ>
I'm using Message Broker 6.0 and MQ 6.0.
Anyone knows if I need any special configuration? Or how can i do it manually by ESQL code?
Thanks all. _________________ Ing. Manuel Silva Zaldivar |
|
Back to top |
|
 |
elvis_gn |
Posted: Wed Nov 23, 2005 8:25 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi msilva18,
When you say the result message is wrong, it means that u r coding something for it ?.... Can we see the code ?
Regards. |
|
Back to top |
|
 |
msilva18 |
Posted: Wed Nov 23, 2005 8:28 pm Post subject: |
|
|
Apprentice
Joined: 25 Aug 2004 Posts: 31
|
I'm using the Mapping node and the message result is wrong, now i'm trying to do it by code, but i couldnt yet. _________________ Ing. Manuel Silva Zaldivar |
|
Back to top |
|
 |
elvis_gn |
Posted: Wed Nov 23, 2005 8:45 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi msilva18,
When ur using the mapping node, u should be able to see the attributes in green color with a "@"...right ??
Are you mapping it with a field or hard coding....??
In the mapping which you do,
1. map the input to the output....
2. A new entry will be made in the Overview
3. In the new entry select the Target Value and click it to find a box with "..." popping up. Click that again.
4. In the new page which pops up...select the Target field, Field Functions and Field Value to map to the input....
In this way u'll make sure that only the value of the output is mapped to the input Type....
Hope it works
Regards. |
|
Back to top |
|
 |
msilva18 |
Posted: Wed Nov 23, 2005 8:52 pm Post subject: |
|
|
Apprentice
Joined: 25 Aug 2004 Posts: 31
|
Im using a mapping node but i cant find the box ...
Regards _________________ Ing. Manuel Silva Zaldivar |
|
Back to top |
|
 |
elvis_gn |
Posted: Wed Nov 23, 2005 8:58 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
U've done the input to output mapping by dragging the input field to the output....right.
You got a new entry in your Overview page...right.
In that you can see the input Column, output Column and a Target Value Column....click on the Target Value.....It would become grey in color with a small box at the end......click that again....
Hope you got it.
Regards. |
|
Back to top |
|
 |
msilva18 |
Posted: Wed Nov 23, 2005 9:08 pm Post subject: |
|
|
Apprentice
Joined: 25 Aug 2004 Posts: 31
|
Can you tell me if your comments are in the Message broker 5.0? Because im using v. 6.0.
And in the v. 6.0 i cant see the options that you told me. But i remember that in v. 5.0 exists something like ... box option in the mapping node. That's right? _________________ Ing. Manuel Silva Zaldivar |
|
Back to top |
|
 |
elvis_gn |
Posted: Wed Nov 23, 2005 9:16 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Oh...My apologies.
But I guess the functionality cannot be lost. Maybe u can double-click or right-click and try
If you eventually dont find anything and plan to move to coding then try a search in this forum, u'll find hundreds of examples on how to code an attribute....
But I feel you should first dig to the roots of what the guys at IBM have done to the good old Mapping node
Regards. |
|
Back to top |
|
 |
msilva18 |
Posted: Wed Nov 23, 2005 10:09 pm Post subject: |
|
|
Apprentice
Joined: 25 Aug 2004 Posts: 31
|
Dont worry, i'll trying to find the way. Thanks a lot for your colaboration.
Regards. _________________ Ing. Manuel Silva Zaldivar |
|
Back to top |
|
 |
kimbert |
Posted: Thu Nov 24, 2005 1:42 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
When you output the XML message, which domain are you using? ( presumably one of MRM/XMLNS/XMLNSC)
If you are using the MRM domain, you can control the element/attribute rendering via the XML properties of the element in the message set. |
|
Back to top |
|
 |
wooda |
Posted: Thu Nov 24, 2005 3:31 am Post subject: |
|
|
 Master
Joined: 21 Nov 2003 Posts: 265 Location: UK
|
In WBIMB v6.0 regardless if you are using the MRM or an XML domain whether a field is a logical attribute or element in the mxsd file determines whether the target field will be output as an element or an attribute.
In the case of the MRM domain a logical attribute in the model will be rendered as an attribute in MRM XML (by default). (kimbert - Yes you can render an element as an attribute using the properties, but if it is defined as an attribute in the first place then there is no need to?)
In the case of the XML domains if the target field is defined in the message set as an attribute then the appropriate mapping (generated ESQL) should ensure it is output as such.
So the question is in your mxsd file is your target field defined as an attribute or an element ?
The WSDL import should have imported any attributes as atrributes so the mxsd ought to match your WSDL/schema. |
|
Back to top |
|
 |
vvchan |
Posted: Mon Jul 24, 2006 11:19 am Post subject: Is there a solution for this issue? |
|
|
Newbie
Joined: 18 Jul 2006 Posts: 1
|
Hello,
I know this thread is pretty old, but is there a resolution for this issue for MB6? I'm seeing the same issue when I use the mapping node. All of the attributes in the source msg becomes elements in the target msg.
Right now, I'm trying to do a pass-thru mapping (i.e. source and target is the same messgae). In the msg definition file, the "moodCode" is defined as an XMLAttribute, but during runtime, this:
Code: |
<controlActProcess moodCode="EVN">
... |
becomes:
Code: |
<NS1:controlActProcess>
<moodCode>EVN</moodCode>
... |
(this happens for every other attribute defined in the message).
Is there some limitations in the mapping nodes that is documented in some another threads? I haven't found anything through my search.
Thanks in advance,
Vince. |
|
Back to top |
|
 |
Gralgrathor |
Posted: Mon Oct 18, 2010 12:15 am Post subject: Re: Is there a solution for this issue? |
|
|
Master
Joined: 23 Jul 2009 Posts: 297
|
vvchan wrote: |
I know this thread is pretty old, but is there a resolution for this issue for MB6? |
And four years later... You're probably using the MRM parser on the target. Switch to XMLNSC. |
|
Back to top |
|
 |
|