on 02-16-2007 11:10 AM
Hi,
How to read XI Data type in Java code and populate as array list, using UDF?
Is there any API using which the XI data types can be read?
Kindly reply.
Richa
Thanks for the prompt reply,
Could anyone please tell me about the source code for how do I achieve this.
For example how do I read the input value , as explained in the previous reply, and place in the an Array/Hashmap?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure I follow the question.
You create the datatype using a datatype editor or you import the datatype as a WSDL, or XSD or DTD.
Can you give more details as to what you are trying to achieve and why?
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,
I am not very well versed in XI.I work on EP(java)
Actually this question is more Java specific.
My questtion is,
1) input data types are already created using the the editor (left hand side input mappings).The requirement is to write a user defined function to read the input data type structure of XI using java code.
2) Once it is read , this needs to be populated as output structure as arrayList (which is normally done using editor only in XI).
I hope I was able to explain what I need.
Thanks,
Richa
Okie, got it.
You wnat to read the entire XML message and so are looking to write a UDF to handle this.
Well , unfortunately you cannot handle this using Graphical mapping.
Use Java Mapping and the Java Mapping gives the input XML as an InputStream and now convert this Input Stream in your mapping prgogram into a String and you have the entire XML as a string. Now, you can add this to your target element by creating the target strcuture.
Just search on SDN for "Java Mapping" + blogs and you will find a series by Prasad Ullagappan and you can use that to understand the approach.
Regards
Bhavesh
Input Structure:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:CustomerCreateResp xmlns:ns0="urn:bp:xi:up:re:cust_mdm:cmdm:pr5:100">
<CUSTOMER>
<item>
<CUSTOMERNO/>
<MDMCUSTOMER/>
<CREATE_DATE/>
<RETURN>
<TYPE/>
<MESSAGE/>
</RETURN>
<PT_CONTPART_RETURN>
<item>
<MDM_CONTACT/>
<CONTACT/>
</item>
</PT_CONTPART_RETURN>
<PARTNERS>
<item>
<CUSTOMERNO/>
<PARTNER_FUNCTION/>
<PARTNER_NUMBER/>
<DEFAULT_PARTNER/>
</item>
</PARTNERS>
</item>
</CUSTOMER>
</ns0:CustomerCreateResp>
Output structure
(Sample output structure.This actually needs to be mapped and generated using UDF)
<?xml version="1.0" encoding="UTF-8"?>
<ns1:updateCustomer xmlns:ns1="urn:xiSericeVi"><ns1:customer><ns2:ArrayList xmlns:ns2="java:sap/standard">[]</ns2:ArrayList></ns1:customer><ns1:name>2344566</ns1:name></ns1:updateCustomer>
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.