|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Problem with TCPIPServerInput node parser |
« View previous topic :: View next topic » |
Author |
Message
|
artykito |
Posted: Fri Dec 16, 2011 1:24 am Post subject: Problem with TCPIPServerInput node parser |
|
|
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 |
|
 |
kimbert |
Posted: Fri Dec 16, 2011 4:56 am Post subject: |
|
|
 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 |
|
 |
fjb_saper |
Posted: Fri Dec 16, 2011 8:20 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|