on 2006 Apr 05 4:01 PM
Hello -
I have a java mapping and a message mapping implemented in one interface.
Java mapping basically adds a header and does nothing else.
Message mapping has all the mapping. Its not complex but straight.
I have the Message mapping first and then the Java mapping in the Interface Mapping.
what happens is i could see the headers written through Java mapping in my output xml file which is good but i cannot view the message mapping output in the file.
Any ideas.
Thanks,
Tirumal
Hi Tirumal,
i think there might be cache problem (or you forgot to activate your changed Interface Mapping). Copy the Interface Mapping and refer the copy in Inteface Determination to check out.
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Is your output of Message Mapping is input to Java Mapping? If so, then i think there will not be any problem.
Also check the checkbox of Maintain Order at Runtime in the Interface Determination ?
Are you able to test in the Interface Mapping Editor ? Test with giving data (first input i.e input to Message Mapping)and check are you getting required output after your Java Mapping.
Hope this helps.
Regards,
Moorthy
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 generating the headers in the java mapping using this:
public void startDocument ()
throws SAXException {
write("<?xml version='1.0' encoding='UTF-8'?>");
write("<!DOCTYPE cXML SYSTEM 'http://xml.cxml.org/schemas/cXML/1.1.008/cXML.dtd'>");
}
Maintain Order at Runtime is checked in the Interface Determination.
Ok, in the interface Mapping Editor i get 2 messages:
1.
11:09:48 Start of test
Call method execute of the application Java mapping com.sap.xi.tf._Orders_MM_
Java mapping com/sap/xi/tf/_Orders_MM_ completed. (execute() of com.sap.xi.tf._Orders_MM_
Call method execute of the application Java mapping com.sap.aii.mapping.api.SampleWithSaxParser
Java mapping com/sap/aii/mapping/api/SampleWithSaxParser completed. (execute() of com.sap.aii.mapping.api.SampleWithSaxParser
Executed successfully
11:09:48 End of test
2. XML not well formed
None of the above messages seem to be of Message Mapping don't know why its not getting written in the output.
Thanks,
Tirumal
HI,
As suggested , check for Cache First.
And one more thing, just check your Java Mapping independently, so that you will make sure that java mapping is working fine. While testing Java Mapping independenty, give the output of Message Mapping and check are you getting required output or not>>
You can check the cache in SXI_CACHE in XI ABAP stack.
Regards,
Moorthy
Hi -
Lets say this is the output from the message mapping:
<Orders_MT>
<OrderID>123123</OrderID>
<OrderDate>2006-04-05</OrderDate>
<Amount>100</Amount>
</Orders_MT>
How do i give the above message mapping output to the Java input? I mean should i fill in the functions for the startelement, endelement in the java program(sax parser).
Thanks,
Tirumal
I think , in your case, it is happening in this way. You are doing Message Mapping and in the Java Mapping you are just writing headers. So you are getting output like that. Am I right ? So it is overwriting your message mapping
You can use multiple mappings for the interface, provided output of first mapping will be input to next mapping like this. Then only, I think purpose will be solved.
In your case, in the Java Mapping, you need to parse entire xml message (i.e ouput of Message Mapping), and while writing the output , produce the message such way that, you get the header first and rest all next.
If , Java Mapping means, you need to use SAX/DOM parser. and all the events. But in your case, you can easily write the output message in the endDocument Event...
Pls acknowledge
Regards,
Moorthy
Hi,
You are right. I am doing message mapping and then the Java mapping.
In this scenario i have modified the java functions startElement, endElement, endDocument, startDocument to get the output.
Then i supplied this output to my Java Mapping program. It worked here independently.
I made up the jar file and imported it again and tested the mapping.
This time it worked.
I did get the output as desired. Now the real part comes as testing with the real file a very huge file.
Thanks for your patience. Will award you points.
Thanks,
Tirumal
Hi,
You are right. I am doing message mapping and then the Java mapping.
In this scenario i have modified the java functions startElement, endElement, endDocument, startDocument to get the output.
Then i supplied this output to my Java Mapping program. It worked here independently.
I made up the jar file and imported it again and tested the mapping.
This time it worked.
I did get the output as desired. Now the real part comes as testing with the real file a very huge file.
Thanks for your patience. Will award you points.
Thanks,
Tirumal
Hi,
Gerat, Nice to hear that it worked.
You can store entire document into a list and then populate the entire list in the endDocument event. This store should happen in the startElement event while pasrisng the message (Message Mapping output).
Anyway it is depend on the complexity of the mapping, logic,feasibilit etc.
Thanks,
Moorthy
User | Count |
---|---|
59 | |
11 | |
7 | |
7 | |
6 | |
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.