cancel
Showing results for 
Search instead for 
Did you mean: 

Decoding BLOB data obtained from the JAVA stack for PI 7.1

Former Member
0 Kudos

Hi,

I am extracting a BLOB from table BC_MSG from PI Java Stack.

In the Open SQL Browser, I see that this is a binary stream.

I have tried normal decoding of binary stream to String,

but i get lots of "junk" characters(which are probably not decoded)

Is this data stored in some particular encoded format?

Cheers,

Earlence

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Any ideas???

former_member181985
Active Contributor
0 Kudos

check my reply @ [Decoding BLOB data from Adapter engine Java Stack |]

Former Member
0 Kudos

yes i've seen that.

But i manage to get a lot of supposedly junk characters in the decoded stream

Main text parts of the messages are decode properly, but others are present which prevent me from parsing the data.

Example output:

fOzw(v) ?8  {^ 07m4-'!zf 8 m^?il?zZ){igl07m4-'!zf{-jw 8  ribzWQzhig (nj_j{ ur 9[Lcom.sap.engine.messaging.impl.util.auditlog.AuditEntry;U 7 t( xp sr 6com.sap.engine.messaging.impl.util.auditlog.AuditEntry * Z

msgExists_[ params_t [Ljava/lang/String;L status_t ALcom/sap/engine/interfaces/messaging/api/auditlog/AuditLogStatus;L textKey_t Ljava/lang/String;L

timestamp_t Ljava/sql/Timestamp;xp ur [Ljava.lang.String;V {G xp t TBDLppppsr ?com.sap.engine.interfaces.messaging.api.auditlog.AuditLogStatus * I hashCodeL valueq ~ xpt St STATUS_SET_SUCCESSsr java.sql.Timestamp& Se I nanosxr java.util.Datehj KYt xpw ( i x @sq ~ uq ~ t 3ppppq ~ t

RECEIVE_RETRYsq ~ w ( i x GOsq ~ uq ~ pppppq ~ t RECEIVE_QUEUE_GET_SUCCESSsq ~ w ( i x GOsq ~ uq ~ t DLNGppppq ~ q ~ sq ~ w ( i x sq ~ uq ~ t lcom.sap.aii.af.service.administration.impl.AdminPersistenceException: Failed to mark message for re-deliveryppppsq ~ t Et AFW_MARK_FOR_RETRY_FAILEDsq ~ w ( i x

,1@sq ~ uq ~ t Mail_http://sap.com/xi/XI/Systemt com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.af.service.administration.api.cpa.CPAChannelStoppedException: Channel stopped by administrative task.pppq ~ "t RECEIVE_DELIVER_ERRORsq ~ w ( i x

,1@sq ~ uq ~ t NDLVppppq ~ "q ~ sq ~ w ( i x /oyE]E){ 8  r8  {^

As u can see, main error messages are present, but lots of extraneous chars are also present.

Cheers,

Earlence

former_member181985
Active Contributor
0 Kudos

what exactly you want to do with this binary stream from table BC_MSG of PI Java Stack.

If it is already a binary stream why you are converting that to string. you can directly use it in next stage right. (say to file interface)

Regards,

Praveen Gujjeti.

Former Member
0 Kudos

I want to display it as a message.

Thats why I need to decode to string.

Former Member
0 Kudos

I think that AUDIT_DATA field is stored in some special format.

When I decode MSG_BYTES from BC_MSG using the same technique, proper data is decoded.

Hence, would anyone know what it is?

Would it be zipped or hashed etc etc?

Cheers,

Earlence

former_member181985
Active Contributor
0 Kudos

>>I want to display it as a message.

I didnt get this. Where you want to display.

Former Member
0 Kudos

I am returning the stream via a web service which is in an EJB

I base64 encode this data and send.

I have a java client which Base64 decodes the data to get the original stream

this can then be displayed in a text box or whatever.

the problem is that when I use the same approach for MSG_BYTES from BC_MSG, there is no problem.

Only when I try it with AUDIT_DATA from BC_MSG_AUDIT, all jumbled characters are returned.

Surely, data must be encoded in some way.

Cheers,

Earlence

former_member181985
Active Contributor
0 Kudos

Hi Earlence,

XI_AF_MSG --> stores incoming and outgoing messages

XI_AF_MSG_AUDIT --> audit log entries for messages stored in XI_AF_MSG

BC_MSG --> AF PI 7.1 Message

BC_MSG_AUDIT --> PI 7.1 audit log entries (**)

So, BC_MSG_AUDIT contains only audit log entries in some propritory format, it doesnt contain the actual message.

So, u should only consider BC_MSG.

Check this link: https://wiki.sdn.sap.com/wiki/display/XI/XI%20Tables

Regards,

Praveen Gujjeti.

Former Member
0 Kudos

Hi,

Thanks for that.

Yes I am able to get the payload from BC_MSG, but for extended error monitoring, AUDIT LOG ENTRIES as present in BC_MSG_AUDIT.

Where did u read about this propietary format?

Is there some document I can refer to to decode the data?

Cheers,

Earlence