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 » Asbitstream error

Post new topic  Reply to topic
 Asbitstream error « View previous topic :: View next topic » 
Author Message
chris boehnke
PostPosted: Tue Oct 05, 2010 1:45 pm    Post subject: Asbitstream error Reply with quote

Partisan

Joined: 25 Jul 2006
Posts: 369

Hi Guys,

I have incoming SOAP message as below

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

<soapenv:Header>
<ToOrg>xxx</ToOrg>
<Endpoint URI> uuuuu</Endpoint URI>
</soapenv:Header>
<soapenv:Body>
<CLAIMDETAILS>
( X12 data)
</CLAIMDETAILS>
</soapenv:Body>

</soapenv:Envelope>


As per my requirement I have to extract the X12 data from Soap body.
I used soap extract node to remove the soap envelope+header.

I get XMLNS-->CLAIMDETAILS--->X12 data

I was trying to use the below code to convert the X12 data bitstream

CREATE NEXTSIBLING OF OutputRoot.MQMD DOMAIN ('BLOB');
SET OutputRoot.BLOB.BLOB = ASBITSTREAM(InputBody.CLAIMDETAILS Encoding InputRoot.Properties.Encoding CCSID InputRoot.Properties.CodedCharSetId);

I am getting an error message.


Quote:
RecoverableException BIP2488E: ('.Dental_277_Remove_SOAP_Hdr.Main', '8.8') Error detected whilst executing the SQL statement ''SET OutputRoot.BLOB.BLOB = ASBITSTREAM(InputRoot.XMLNS.soapenv:Envelope.soapenv:Body.CLAIMDETAILS ENCODING InputRoot.Properties.Encoding CCSID InputRoot.Properties.CodedCharSetId);''.
The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
See the following messages for details of the error.
2010-10-05 15:12:05.552205 4668 ParserException BIP5010E: XML Writing Errors have occurred.
Errors have occurred during writing of XML.
Review further error messages for an indication to the cause of the errors.
2010-10-05 15:12:05.552215 4668 ParserException BIP5017E: The parser cannot write the specified top level element because its type ''XML.Content'' is not one of the allowed types.
The parser must either write the entire message tree, or else the top level element must be of type XML.Element or XML.Bitstream.
Ensure that the message tree is structured correctly, and that each syntax element has a valid field type



Can you guys pls let me know if I am going in wrong direction to get a blob message.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Oct 05, 2010 1:59 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I presume that the X12 data is just a string. In which case you need CAST, not ASBITSTREAM.
Back to top
View user's profile Send private message
chris boehnke
PostPosted: Tue Oct 05, 2010 3:40 pm    Post subject: Reply with quote

Partisan

Joined: 25 Jul 2006
Posts: 369

kimbert wrote:
I presume that the X12 data is just a string. In which case you need CAST, not ASBITSTREAM.


Can I just CAST the data as BLOB?

OutputRoot.BLOB.BLOB = CAST(InputRoot.XMLNS.CLAIMDETAILS AS BLOB);

Pls correct me if I am wrong
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Oct 05, 2010 4:05 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Yes, you can.
ASBITSTREAM is for serializing a message tree. You're not doing that.
Back to top
View user's profile Send private message
chris boehnke
PostPosted: Tue Oct 05, 2010 5:25 pm    Post subject: Reply with quote

Partisan

Joined: 25 Jul 2006
Posts: 369

kimbert wrote:
Yes, you can.
ASBITSTREAM is for serializing a message tree. You're not doing that.


Kimbert,

When I try to execute the below statement

Quote:
SET OutputRoot.BLOB.BLOB = CAST(InputRoot.XMLNS.CLAIMDETAILS AS BLOB);


I am getting below error

Quote:
String is not of correct form for byte array. Must consist of only 0..9,a..f,A..Z


Not sure how to convert the X12 data in xml tags to BLOB
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 05, 2010 5:35 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You need to indicate a CCSID and/or an encoding.

This all does presume that in fact, InputRoot.XMLNS.CLAIMDETAILS is a simple element and does not have complex content.
Back to top
View user's profile Send private message
chris boehnke
PostPosted: Wed Oct 06, 2010 7:10 am    Post subject: Reply with quote

Partisan

Joined: 25 Jul 2006
Posts: 369

mqjeff wrote:
You need to indicate a CCSID and/or an encoding.

This all does presume that in fact, InputRoot.XMLNS.CLAIMDETAILS is a simple element and does not have complex content.


Hi mqjeff,

Your input of using CCSID worked. But I have one more concern. The X12 data I got after removing the soap extractnode is something like this

Quote:
\r\n\t\t\tX12 data


When I cast this string to a bitstream, I am getting blank spaces in the starting of the X12 message. This throws error as invalid input when I use WTX map.

Do I need to remove this Blank characters manually?
Pls suggest
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Oct 06, 2010 7:18 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Should the message producer be including these characters in the first place?

It's just as legal for an XML element to be in the form
Code:
<element>datadatadata</element>
as it is to be in the form
Code:
<element>
data
data
data
</element>


And from an XML point of view, everything inside the ">" and "<" is the contents of the element. But if the second form is invalid for the data structure it's representing, then maybe it's the wrong thing to send.
Back to top
View user's profile Send private message
chris boehnke
PostPosted: Wed Oct 06, 2010 7:37 am    Post subject: Reply with quote

Partisan

Joined: 25 Jul 2006
Posts: 369

mqjeff wrote:
Should the message producer be including these characters in the first place?

It's just as legal for an XML element to be in the form
Code:
<element>datadatadata</element>
as it is to be in the form
Code:
<element>
data
data
data
</element>


And from an XML point of view, everything inside the ">" and "<" is the contents of the element. But if the second form is invalid for the data structure it's representing, then maybe it's the wrong thing to send.


I am able to see \n\t\t\t before X12 message in CLAIMDETAILS XML Tag while debugging.
I don't see this when I see the actual message.
When I convert this message to BLOB I am getting "0a090909" characters in fromt of my X12 message. Not sure what to do. Pls help.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Oct 06, 2010 7:41 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The XMLNS parser isn't adding this.

Neither would the XMLNSC parser that should be being used, or the SOAP parser.

You asked if you should remove it manually - I don't know. If it shouldn't be there, then either it should not be being sent or it should be removed - perhaps by esql code.
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 » Asbitstream error
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.