on 04-25-2007 4:10 AM
hi forum i have a problem in message mapping...
i have a file to file scenario...with a BPM..
the components are:
1. one outbound async MI:-> MI_OA_fileSender
2. one abstract async MI:-> MI_AA_fileSender
the above two has messsage structure as:
<ns0:MT_sourceFile xmlns:ns0="http://zpoc.com.test/rana3">
<recordset> 1...1
<record> 1..unbound
<batch_num/> 1..1
<quantity/> 1..1
</record>
</recordset>
</ns0:MT_sourceFile>
*******************************************************
3. one abstract async MI: -> MI_AA_fileDestination
4. one inbound async MI:-> MI_IA_fileDestination..
the above two has messsage structure as:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_destinationFile xmlns:ns0="http://zpoc.com.test/rana3">
<recordset> 1..1
<record> 1..unbound
<rec_number/> 1...1
<qty/> 1...1
</record>
</recordset>
</ns0:MT_rana3_destinationFile>
inside the BPM i m doing a simple one to one interface mapping between MI_AA_fileSender and MI_AA_fileDestination AND then use a send step to send it to receiver service. But inside the graphical editor, for the message maaping in the interface mapping, i change the target structure a bit by duplicating <rec_number> making it:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_destinationFile xmlns:ns0="http://zpoc.com.test/rana3">
<recordset> 1..1
<record> 1.. unbound
<rec_number/> 0..1
<rec_number/> 0..1 //did right click and "duplicate sub-tree, so it becomes 0...0"
<qty/>
</record>
</recordset>
</ns0:MT_destinationFile>
But i dont change the original structure of MT_destinationFile.
Now in the resultant file in the receiver side i recive two <rec_number> tags....
but since i didnt change the original structure of MT_destinationFile.....but i only made a change in the mapping by duplicating the node <rec
_number>(right click and done "duplicate sub tree").............SHOULD IT NOT THROW AN ERROR
Message was edited by:
sudeep dhar
Message was edited by:
sudeep dhar
>.............SHOULD IT NOT THROW AN ERROR
Not necessarily.
See, XI won't realize, by default, a schema validation in your messages. If you want a validation, you'll have to implement one, as described in
http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/e1343e8c7f6329e10000000a114084/frameset.htm
However, for some particular steps in BPM, I have observed that an invalid XML will some times result in a error in BPM execution. In particular, if you have switch steps, container operation steps and/or correlations where you use a particular field of that message, it may throw some exception when you have an invalid xml. Also, I have observed some errors with conditional receiver determination for invalid messages.
As a best practice, if you have any kind of dependency on a particular message inside your system (like switches, container operations, correlations, condition in receiver or interface determination etc), it is a good idea to implement a schema validation.
Also, if you do want to create a thrustable scenario, you might want to perform schema validation for all your output messages.
Regards,
Henrique.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi pinto,,...
that means whatever i wrote...is not abnormal..isint it.....but it should be.....coz my MI that is used in the receiver service(to put the file)....has the messgae strucuture that is not following the structure generated by the message mapping...
but its being written correctly....isint it strange???
Yeah, I do aggree it is a kind of a flaw to let those messages to be successfully created.
But you can see it like this: it will only increase the responsability of (and, directly, the necessity of competency of, and, indirectly, the ammount you should pay for) the XI consultant. 😄
Regards,
Henrique.
pinto it was quite motivating............but the question remains there....
u said something about XML-validation......but how can i apply it in Graphical-mapping....
i think i can apply it during java-mapping ..isint it....?
>>>>>can i get an example of message-mapping using java mapping....its better if its very simple file to file with few nodes..
Yeah, for a full schema validation, you'll have to use java mapping.
If you already have a message mapping, you can use the message mapping and the validation java mapping in the same interface mapping.
If you want instructions on java implementation of schema validation, create a new thread.
Regards,
Henrique.
Hi,
when you save the mapping,the newly created element or node(if you dont map) in target structure in Message mappings will be lost.
it shouldnt give any error.
Cheers,
Jag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi jagadish.....the <rec_node> which was in the original structure 1...1, after doing duplicate subtree...became 0...1 and 0..1 twice.....and even the mapping got successful...
and when i used the inbound async MI to send it to target service.....(with the original structure with <rec_node> 1...1)
it reached there with 2 <rec_node>..... it was successful...
even i used to think so...but it happened....
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.