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 » Problem with TCPIPServerInput node parser

Post new topic  Reply to topic
 Problem with TCPIPServerInput node parser « View previous topic :: View next topic » 
Author Message
artykito
PostPosted: Fri Dec 16, 2011 1:24 am    Post subject: Problem with TCPIPServerInput node parser Reply with quote

Apprentice

Joined: 24 Jun 2010
Posts: 33

Hi experts,

I am having problems with TCPIPServerInput node. My scenario is the following:

- TCPIPServerInput node is listening on a port.
- Client java class send a message to that port.
- TCPIPServerInput receives the message and send it to MQOutput node.

I am able to connect with the Server node, but my problem is the message this node receives because it content error. See the XMLNSC part:

Code:
Message
   Properties
         MessageSet:CHARACTER:
         MessageType:CHARACTER:
         MessageFormat:CHARACTER:
         Encoding:INTEGER:546
         CodedCharSetId:INTEGER:850
         Transactional:BOOLEAN:false
         Persistence:BOOLEAN:false
         CreationTime:TIMESTAMP:java.util.GregorianCalendar[time=1324017385851,
areFieldsSet=true,areAllFieldsSet=false,lenient=true,
zone=sun.util.calendar.ZoneInfo[id="Europe/Paris",offset=3600000,dstSavings=3600000,
useDaylight=true,transitions=184,lastRule=java.util.SimpleTimeZone[id=Europe/Paris,
offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,
startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,
startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,
endTime=3600000,endTimeMode=2]],firstDayOfWeek=2,minimalDaysInFirstWeek=4,
ERA=?,YEAR=2011,MONTH=11,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,
DAY_OF_MONTH=16,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,
AM_PM=0,HOUR=7,HOUR_OF_DAY=7,MINUTE=36,SECOND=25,
MILLISECOND=851,ZONE_OFFSET=?,DST_OFFSET=?]
         ExpirationTime:INTEGER:-1
         Priority:INTEGER:0
         ReplyIdentifier:BLOB:[B@48524852
         ReplyProtocol:CHARACTER:
         Topic:UNKNOWN:null
         ContentType:CHARACTER:
         IdentitySourceType:CHARACTER:
         IdentitySourceToken:CHARACTER:
         IdentitySourcePassword:CHARACTER:
         IdentitySourceIssuedBy:CHARACTER:
         IdentityMappedType:CHARACTER:
         IdentityMappedToken:CHARACTER:
         IdentityMappedPassword:CHARACTER:
         IdentityMappedIssuedBy:CHARACTER:
   XMLNSC
   CHARACTER:XML Parsing Errors have occurred


I have tested with BLOB (sending byte array from java class), MRM + message set (sending String) and XMLNSC (sending String). The error is always the same for all domains.

The message I sent is:

Code:
<myXML>
 <field1>test</field1>
</myXML>


Anyway, is not an exception, so I can browse the message in the output queue. It containts weird characters at the beginning, don't know why:

Code:
t$
<myXML>
 <field1>test</field1>
</myXML>


What are those characters?

I am not sure if the problem is in the java Client class or if is a configuration problem of the server node. My java class, after stablish connection, do the following:

Code:
private ObjectOutputStream output;
private String msg = "<myXML><field1>test</field1></myXML>";
...
private void sendMsg {
   output = new ObjectOutputStream( clientSocket.getOutputStream() );     
   output.flush();
   try {
         output.writeObject(msg); // I tried with write(byte[] buf), writeUTF(String str), writeChars(String str)
         output.flush();
         System.out.printf( "\nCLIENT>>> " + msg);
    } catch ( IOException exc ) {
         System.out.printf( "\nError when trying to send message." );
    }
}


I've never got an exception, but the message is not well parsed in the Server node...do you have an idea what I am doing wrong?

Thank you very much in advance!
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Dec 16, 2011 4:56 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You cannot diagnose an error that says 'XML Parsing Errors have occurred'. You need much more information than that.

Please check the Windows Event Viewer - it usually contains the full text of the error. If not, take a user trace - it always outputs the entire error message.

My guess is that this is a problem with the character encoding of your XML. What encoding were you *trying* to use?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Dec 16, 2011 8:20 am    Post subject: Reply with quote

Grand High Poobah

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

Not enough information about your java stuff.
What type of message are you writing to?
What type of object are you writing /writing to?

Realize that you do not want to use writeUTF which should only be used with its equivalent readUTF....

Once you have clarified your MQ interaction with Java everything will start to flow...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Problem with TCPIPServerInput node parser
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.