on 06-13-2006 10:52 AM
Hi all
I have my source and target xml like:
<Person>
<Gender>1</Gender>
<Surname>ABC</Surname>
</Person> </Passenger>
and target is
<Passenger>
<Title>Mr.</Title>
<Name>ABC</Name>
</Passenger>
How do i convert using Java Mapping in IR->Message mapping.
<b>If gender is 1 then Title will be Mr if it is 0 then Title will Mrs. How do i do represent the same graphically using Java Mapping</b>
Ganesh,
I have a document that deals with this same exact scenario. Drop me a mail for the document on Java Mapping.
My mail id is in my business card.
Regards,
bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ganesh,
No of arguments passed in UDF is 1 i.e Gender.
Use following code in user defined function:
String Str = null;
if(Gender.equals(1))
{
Str = "Mr"
return Str;
}else
{
if(Gender.equals(0))
{
Str = "Mrs"
return Str;
}
}
Thanks,
Yaseen Mahammad
Message was edited by: Yaseen Mahammad
Message was edited by: Yaseen Mahammad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If what you need is this
<b>
0 : Mr.
1 : Mrs.</b>
then no need for java mapping.... why are you going for that?
Instead try Constant-> FixValues in the graphical mapping. There give the above mentioned logic. And you will get the needed output.
Regards
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try this
<gender>
constant (value is 1) use compare function in message mapping
the use a if then else and pass Mr or Mrs as required.
You can aviod any custom java func. itself
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the need of java mapping for this?
use function fixvalue for doing thz kind of value mapping!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.