cancel
Showing results for 
Search instead for 
Did you mean: 

message mapping

Former Member
0 Kudos

My interface is the sync webserver (soap) -> xi -> (jdbc) database. I am using sql query to select the databse. It work on a simple query when I have one to one mapping between the database request and database request_response but in my query, I also need have the employee last name and supervisor last name valure return but in the database, the last name field is the same for both employee and manager, but in the datatype, it is not allow me to have duplicate fields call LAST_NAME. Any suggestion?

<?xml version="1.0" encoding="utf-8" ?>

- <ns0:MT_EmployeeInfoDatabaseRequest_response xmlns:ns0="urn:test.finance:EmployeeHierarchy">

- <STATEMENT_response>

- <row>

<EMPLID>1230</EMPLID>

<<b>LAST_NAME</b>>Yguen</LAST_NAME>

<FIRST_NAME>Ha</FIRST_NAME>

<N_RACF_ID />

<EMAIL_ADDR />

<GRADE>V</GRADE>

<EMPL_STATUS>A</EMPL_STATUS>

<DEPTNAME>Factory Store</DEPTNAME>

<SUPERVISOR_ID>1239</SUPERVISOR_ID>

<<b>LAST_NAME</b>>Negn</LAST_NAME>

<FIRST_NAME>Diana</FIRST_NAME>

<MIDDLE_NAME />

<GRADE>U</GRADE>

<N_RACF_ID>DNEGRO</N_RACF_ID>

<EMAIL_ADDR></EMAIL_ADDR>

</row>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can qualify the query with A.LAST_NAME and B.LAST_NAME

In your data type you must create two distinguishable elements to map the above to

Former Member
0 Kudos

Hi Mike,

I qualified the employee and supervisor in my query and it work. Thanks. Now, if I don't have any row return on my search, I would like to have a message say "no row select". Where do I map that message to?Here is my response mapping currently show

MT_databaserequest_response - MTinformationResponse

statement_response - response

row - row

Answers (4)

Answers (4)

Former Member
0 Kudos

Michelle,

In your graphical mapping set the input message occurance to 0:1 and the output message occurance to 1

Create a UDF with one input string and use code similar to

if(a.equals("") || a.equals(null))

a = "No query data returned";

return a;

Map LHS (input) row --> UDF --> RHS (output) row

If LHS row has returned a value from the database then this value will populate the RHS row

If LHS row is empty then the message set in the UDF will populate the RHS row

Regards,

Mike

Former Member
0 Kudos

Thanks Mike.

prabhu_s2
Active Contributor
0 Kudos

u cannot have same node LAST_NAME with the node ROW

Former Member
0 Kudos

Michelle,

Declaring the occurence of node <LAST_NAME> to 1..unbunded should solve the issue. Have you declared the data type this way and still facing this issue?

Regards,

Jai Shankar

Former Member
0 Kudos

Hi Michelle,

You can't duplicate the fields in Datatype. So choose like this First Last Name use as <EMP_LAST_NAME>Yguen</EMP_LAST_NAME>

Second one declare like this <SUP_LAST_NAME>Negn</SUP_LAST_NAME>

Datatype won't accept duplicate fields.

Regards

Ramidi S