on 11-28-2007 4:14 AM
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>
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
u cannot have same node LAST_NAME with the node ROW
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.