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 » How to transfer binary array to webservice

Post new topic  Reply to topic
 How to transfer binary array to webservice « View previous topic :: View next topic » 
Author Message
topyp
PostPosted: Wed May 21, 2014 7:17 am    Post subject: How to transfer binary array to webservice Reply with quote

Newbie

Joined: 06 Dec 2010
Posts: 7

Call a webservice in wmb 6.1, and the message includes a binary array which is generated by a java program.I use java node to output the message.There are a compute node and a httprequest node behind java node.
Code:
byte [] Qty=Main.read();   
MbElement out2=out1.createElementAsLastChild(MbXMLNSC.FIELD, "quantity", Qty);

But from java node's out terminal, the binary array changes to a hex string.I wanna know how to cast it to byte[] in compute node.But I think from compute node's out terminal , the binary arrary still is output as hex string before httprequest node.How to transfer binary array to webservice.I need help ,Thanks!
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed May 21, 2014 9:28 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Unless your Qty field holds a png or jpeg it should really be defined as either int or double or long... or float. Please don't define it as byte[].
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
topyp
PostPosted: Wed May 21, 2014 5:47 pm    Post subject: Reply with quote

Newbie

Joined: 06 Dec 2010
Posts: 7

The webservice is provided by government deparment , so we have no choice.If wmb can't realize , we only use java do it.
fjb_saper wrote:
Unless your Qty field holds a png or jpeg it should really be defined as either int or double or long... or float. Please don't define it as byte[].
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed May 21, 2014 9:57 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

WMB can write any valid XML document. If you want to send a byte array in an XML document then you need to encode the bytes as hexBinary or base64Binary.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
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 » How to transfer binary array to webservice
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.