on 05-26-2008 11:57 AM
Hi.
Im sending data from a DB to a proxy using XI.
But when I get an empty response from the DB, wich gives me an empty XML tag the proxy shows me an error:
-PARSE_APPLICATION_DATA Error during XML => ABAP conversion (Response Message; error ID: CX_ST_MATCH_ELEMENT;
-Error during XML => ABAP conversion (Response Message; error ID: CX_ST_MATCH_ELEMENT;
-System expected the end of the element 'STMT_DC_response'
This is the message that originates the fail:
<ns0:MT_xxx_response xmlns:ns0="urn:s-com:xi:SD">
<STMT_response>
<row>
<c11>P</c11>
<c12>55062330</c12>
<c13>1</c13>
</row>
</STMT_response>
<STMT_DC_response />
</ns0:MT_xxx_response>
In case that the tag is filled runs ok
<ns0:MT_xxx_response xmlns:ns0="urn:s.com:xi:SD">
<STMT_response>
<row>
<c11>P</c11>
<c12>55062330</c12>
<c13>1</c13>
</row>
</STMT_response>
<STMT_DC_response>
<row>
<c21>P</c21>
<c22>55062330</c22>
<c23 />
</row>
</STMT_DC_response>
</ns0:MT_xxx_response>
The definition for the data is:
STMT_DC_response 0..1
row 0..n
tipo 0..1
Thanks for the help you can give me about my problem with empty tags.
Hello ,
Change the minimum occurence rate for that elements to 0 or u can check whether the node exists by exists node function and append a whitespace to create the element in target.
**************Reward points if found useful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are right, with the exist function I could make a new mapping to avoid sending that node.
But this is a synchronous proxy, with an input and an output, and is simpler to put it directly without making an Integration Process.
I dont understand why abap cant get that empty tag.
I have put some extra mappings to avoid those empty nodes, but with this case I would like to keep it simple because I think It would be faster and lighter.
It couldnt be implemented on that way
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
yes i have seen this problem. In the foreground it shows <STMT_DC_response /> but the source has <STMT_DC_response ></STMT_DC_response >. Option would be to suppress this tag.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The tag is a response from the DB, I dont know how to supress it, I think it cant be supressed.
On the Communication Channels, on Sender mode, I can set the advance parameter "Remove Empty tags", but on the Receiver mode, wich Im using, that parameter is not showed.
Do you know a way of doing that?
No. My scenario:
Proxy -> XI (map the input to 3 DB querys) -> DB
<- DB query response
thats a Synchronous Proxy with an input parameter. It request directly the DB using a mapping. The mapping has 3 statements (STMT1, ...) and the DB put the response back to each one (STMT1response,...) wheter the response have data or not.
hi
the XML si show as <STMT_DC_response />, but actually the XML code is:
<STMT_DC_response>
</STMT_DC_response>
My System is 7.0 SP14
does anyone have seen this error?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jean,
the problem is probably related to schema validation.
If the field is optional but is empty, it should not be created at all.
Try to validate this xml against the xsd that you described (with occurrence 0...1 for the field) and you'll see it's invalid.
You'll have to either change it in the DB so that the empty field is not sent or treat it in mapping.
Regards,
Henrique.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see....
but I cant validate it on the Integration Builder. I have maping that takes one input parameter and then makes 2 query request, like:
STMT1
. action
. access
STMT2
. action
. access
I know that the database will return
STMT1_response
. row
. . a1
STMT2_response
. row
. . b1
and if there is no data It will return:
STMT1_response
. row
. . a1
STMT2_response
now, to close the question.
Do you think there is no way that when making a query request from a proxy it will not fail in case that the query return nothing?
Thanks a lot Henrique
Is the scenario sync or async?
If async, try to test the proxy through sproxy. (mark the 'XML' flag).
Paste the response xml from DB but instead of
<STMT_DC_response />
put
<STMT_DC_response/>
(remove the blankspace).
Let me know the result.
I'm supecting that it's not being able to find the end tag mark because of this.
Anyway, removing the empty tag in the mapping would be the easiest solution.
Regards,
Henrique.
What do you think if after the query I made I put a dummy query that gaves me empty data
like:
SELECT DATA1, DATA2 FROM T1
UNION
SELECT '', ''
If theres another way please tell me.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have 6.40 SP20
XI 3.0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for your help!
yes, The definition for the data is:
STMT_DC_response 0..1
to be sure I disabled that node, so I wont get it from the DB, and It was ok
this is ok:
<ns0:MT_xxx_response xmlns:ns0="urn:s-com:xi:SD">
<STMT_response>
<row>
<c11>P</c11>
<c12>55062330</c12>
<c13>1</c13>
</row>
</STMT_response>
</ns0:MT_xxx_response>
but this is not
<ns0:MT_xxx_response xmlns:ns0="urn:s-com:xi:SD">
<STMT_response>
<row>
<c11>P</c11>
<c12>55062330</c12>
<c13>1</c13>
</row>
</STMT_response>
<STMT_DC_response />
</ns0:MT_xxx_response>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Which SP ? you are using
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
check the ouccurence for <STMT_DC_response> if its ocuurence is 1..1 change to 0..1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.