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 » Changing the TCPIPSERVERRECEIVE node length property

Post new topic  Reply to topic
 Changing the TCPIPSERVERRECEIVE node length property « View previous topic :: View next topic » 
Author Message
PEPERO
PostPosted: Mon Jul 11, 2011 6:33 am    Post subject: Changing the TCPIPSERVERRECEIVE node length property Reply with quote

Disciple

Joined: 30 May 2011
Posts: 177

Hi;
I couldn't change the length property of the TCPIPSERVERRECEIVE node.
i'm using a java compute node to achive that but some thing must be wrong.The input message is a binary message with a 4 byte len of the message.
Here is the code :

.
.
.
MbElement BLOBel = inMessage.getRootElement().getLastChild().getFirstElementByPath("BLOB");

byte[] blobData = (byte[])BLOBel.getValue();

int msgLen = 0, pow =6, temp;
for (int i = 0; i < 4 ; i++)
{
temp = (int) blobData[i];
if (temp < 0)
temp += 256;
msgLen += temp * (16 ^ pow);
pow -= 2;
}

msgLen -= 4;

MbElement localEnv = contact admin.getLocalEnvironment(). getRootElement();
MbElement Tcpip_server = localEnv.getFirstElementByPath("TCPIP");
Tcpip_server.getFirstElementByPath("Receive").getFirstElementByPath("Length").setValue(msgLen);
.
.
.


the flow is some thing link this :

TCPIPServerInput------>Java_Compute-------------->TCPIPServerReceive -----------> ...
Back to top
View user's profile Send private message
PEPERO
PostPosted: Mon Jul 11, 2011 7:05 am    Post subject: Reply with quote

Disciple

Joined: 30 May 2011
Posts: 177

Sorry but please consider (java.lang.Math.pow(16,pow)) instead of 16 ^ pow;
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 » Changing the TCPIPSERVERRECEIVE node length property
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.