ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » No valid body of the document could be found

Post new topic  Reply to topic
 No valid body of the document could be found « View previous topic :: View next topic » 
Author Message
brokerDev
PostPosted: Thu Jan 25, 2007 4:28 pm    Post subject: No valid body of the document could be found Reply with quote

Acolyte

Joined: 21 Jun 2006
Posts: 53

Hi,

We are using MB v5. I am trying to pass the following bit of xml as a parameter to a stored procedure.

<Order xmlns="http://aaa.a.xxx.com" xmlns:ns1="http://bbb.b.xxx.com" xsi:schemaLocation="http://aaa.a.xxx.com
X:\....................">
<Field1>
...
</Field1>
<Field2>
...
<Field2>
<Field3>
<RouteID>123456789</RouteID>
<GeometryDefinition>
<Status>
<Coordinates>
<ns1:coord>
<ns1:X>3.1415926535897932384626433832795</ns1:X>
<ns1:Y>3.1415926535897932384626433832795</ns1:Y>
<ns1:Z>3.1415926535897932384626433832795</ns1:Z>
</ns1:coord>
<ns1:mid>abcdef</ns1:mid>
<ns1:Name>String</ns1:Name>
</Coordinates>
<GreenLight>true</GreenLight>
</Status>
</GeometryDefinition>
</Field3>
</Order>


I have tried variations of the following bit of ESQL to cast the message as BLOB (the relevant variable of the stored proc has been so defined).

DECLARE inRef REFERENCE TO InputRoot.XMLNS.*[1];
DECLARE myNS NAMESPACE 'http://http://aaa.a.xxx.com';

MOVE inRef FIRSTCHILD NAMESPACE * NAME 'Field3';

DECLARE ab BLOB ASBITSTREAM(inRef.{myNS}:GeometryDefinition);

When I run the flow in debug mode, I keep on getting a runtime error when I get to the last line above - "No valid body of the document could be found".

Does anyone have any suggestions as to where I'm going wrong? I'm sure it's probably something very silly

Thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Jan 25, 2007 4:42 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You aren't setting all the right options on ASBITSTREAM.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
brokerDev
PostPosted: Thu Jan 25, 2007 5:29 pm    Post subject: Reply with quote

Acolyte

Joined: 21 Jun 2006
Posts: 53

Have tried the following -

DECLARE BitStream BLOB CAST(ASBITSTREAM(inRef.{myNS}:GeometryDefinition) AS BLOB CCSID InputRoot.MQMD.CodedCharSetId);

and also

DECLARE ab BLOB ASBITSTREAM(inRef.{myNS}:GeometryDefinition Encoding InputRoot.MQMD.Encoding CCSID InputRoot.MQMD.CodedCharSetId);

but still getting the same error...
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Jan 25, 2007 5:31 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You need to specify OPTIONS clause.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
KBA
PostPosted: Fri Jan 26, 2007 12:58 pm    Post subject: Reply with quote

Newbie

Joined: 29 Nov 2006
Posts: 7

Try like this .....

DECLARE Payloadstring CHARACTER;
SET Payloadstring ='Ur xml';

CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNSC') PARSE(Payloadstring CCSID 1208 ENCODING MQENC_NATIVE );
Back to top
View user's profile Send private message
KBA
PostPosted: Fri Jan 26, 2007 1:00 pm    Post subject: Reply with quote

Newbie

Joined: 29 Nov 2006
Posts: 7

Try like this .....

DECLARE Payloadstring CHARACTER;
SET Payloadstring ='Ur xml';

CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNSC') PARSE(Payloadstring CCSID 1208 ENCODING MQENC_NATIVE );
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Jan 26, 2007 1:25 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

KBA - that's entirely backwards. It will take a string and produce an XML tree.

Brokerdev wants to take an XML tree and produce a string. But only of a subsection of the message tree - which is done by specifying the FolderBitStream OPTION.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
brokerDev
PostPosted: Mon Jan 29, 2007 10:29 am    Post subject: Reply with quote

Acolyte

Joined: 21 Jun 2006
Posts: 53

Thanks again jefflowrey.

If anyone is interested, I used the bit of code below to get what I wanted.

DECLARE myChar CHAR CAST(ASBITSTREAM(inRef.{myNS}:GeometryDefinition OPTIONS FolderBitStream) AS CHAR CCSID InputRoot.MQMD.CodedCharSetId);
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » No valid body of the document could be found
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.