Author |
Message
|
nicojvr |
Posted: Wed Jul 02, 2003 2:50 am Post subject: mrm to xml |
|
|
 Apprentice
Joined: 04 Jun 2003 Posts: 45
|
Hi all ,
I am getting in a mrm doing some processing on it and outputing xml. this xml is stuff i coded and has no data from the incoming mrm in it.
I get the error
Quote: |
No valid body of the document could be found. |
even though i use
Code: |
SET OutputRoot.Properties.MessageFormat = 'XML'; |
any ideas?
thanks
Nico |
|
Back to top |
|
 |
shalabh1976 |
Posted: Wed Jul 02, 2003 3:59 am Post subject: |
|
|
 Partisan
Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India
|
Have you defined your MRM to have a default value of space or null ?
If no input message comes how does this map to your MRM ?
Anyway if you assign a null to a XML tag you delete it,
hence the message. |
|
Back to top |
|
 |
nicojvr |
Posted: Wed Jul 02, 2003 4:14 am Post subject: |
|
|
 Apprentice
Joined: 04 Jun 2003 Posts: 45
|
my mrm is basically just a construct for all my selfdefining elements within the Tagged/Delimited physical format.
I insert into a database and i don't assign null to any xml message :
Code: |
DECLARE c INTEGER CARDINALITY (InputBody.*[]);
DECLARE i INTEGER 1;
DECLARE tag CHARACTER;
while i < c do
SET tag = fieldname("InputBody".*[i]);
call decode ("InputBody".*[i],tag);
SET i = i + 1;
end while;
SET OutputRoot.Properties.MessageFormat = 'XML';
SET OutputRoot."XML".CARD = CAST (c as CHAR);
SET OutputRoot."XML".MEDRES = 'Processed';
CREATE PROCEDURE decode(
IN line CHARACTER,
IN tag CHARACTER)
EXTERNAL NAME "ASSUPER.mqs_decode_lines"; |
thanks
Nico |
|
Back to top |
|
 |
Craig B |
Posted: Wed Jul 02, 2003 6:50 am Post subject: |
|
|
Partisan
Joined: 18 Jun 2003 Posts: 316 Location: UK
|
You have created two root elements (CARD and MEDRES) in your XML message which is not allowed. You can only have one root element in an XML document. _________________ Regards
Craig |
|
Back to top |
|
 |
nicojvr |
Posted: Thu Jul 03, 2003 2:27 am Post subject: |
|
|
 Apprentice
Joined: 04 Jun 2003 Posts: 45
|
thanks all,
I've changed the node to only put one root now i get
Message contains no data
??
thanks
Nico |
|
Back to top |
|
 |
Craig B |
Posted: Thu Jul 03, 2003 8:55 am Post subject: |
|
|
Partisan
Joined: 18 Jun 2003 Posts: 316 Location: UK
|
Have you put a trace node before you MQOutput node to see what has actually been created in the OutputRoot message tree. This may shed some light on what message the parser is trying to construct. If this does not help solve your problem then can you show your trace node output in this thread. Thanks. _________________ Regards
Craig |
|
Back to top |
|
 |
nicojvr |
Posted: Thu Jul 03, 2003 9:00 am Post subject: |
|
|
 Apprentice
Joined: 04 Jun 2003 Posts: 45
|
I know what the parser constructs. it constructs a fully qualified and valid xml.. i can see it in the debugger field!, but after the breakpoint just before my output queue i get this Exception!
thanks
nico |
|
Back to top |
|
 |
Craig B |
Posted: Thu Jul 03, 2003 9:04 am Post subject: |
|
|
Partisan
Joined: 18 Jun 2003 Posts: 316 Location: UK
|
Well it would be help to diagnose your problem if I could see what the errors were and what your output tree looks like.
Without these I cant really say why this error may be happening. Thanks. _________________ Regards
Craig |
|
Back to top |
|
 |
nicojvr |
Posted: Thu Jul 03, 2003 9:12 am Post subject: |
|
|
 Apprentice
Joined: 04 Jun 2003 Posts: 45
|
can i mail you some screenshots ? |
|
Back to top |
|
 |
|