Hallo!
Ich habe zwei Anwendungen die uA. SOAP Nachrichten austauschen. Also Appl. 1 sendet SOAP Nachricht an Appl. 2, diese übernimmt sie und sendet eine SOAP Nachricht zurück. Beide Applikationen laufen am gleichen Webserver.
Appl. 2 kann die Nachricht von Appl. 1 problemlos parsen. Die Antwort von Appl. 2 kann von Appl. 1 aber nicht mehr geparst werden. Folgender Fehler tritt auf:
Code
14.12.2005 14:12:01 com.sun.xml.messaging.saaj.soap.EnvelopeFactory createEnvelope
SCHWERWIEGEND: SAAJ0511: Umschlag kann aus angegebener Quelle nicht erstellt werden
2005-12-14 14:12:01,331 ERROR [RMI TCP Connection(2)-194.37.75.123 at.lfrz.replication.utils.ReplicationHelper.getValues
ByTagName,131] - Unable to create envelope from given source:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source:
at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:111)
at com.sun.xml.messaging.saaj.soap.ver1_2.SOAPPart1_2Impl.createEnvelopeFromSource(SOAPPart1_2Impl.java:39)
at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:98)
at at.lfrz.replication.utils.ReplicationHelper.getValuesByTagName(ReplicationHelper.java:114)
at at.lfrz.replication.utils.ReplicationHelper.checkSOAPReply(ReplicationHelper.java:34)
at at.lfrz.replication.utils.QueueListener.onMessage(QueueListener.java:62)
at org.exolab.jms.client.JmsMessageConsumer.onMessage(JmsMessageConsumer.java:292)
at org.exolab.jms.client.JmsSession.execute(JmsSession.java:669)
at org.exolab.jms.client.JmsSession.onMessage(JmsSession.java:607)
at org.exolab.jms.client.rmi.RmiJmsSessionStub.onMessage(RmiJmsSessionStub.java:539)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: Premature end of file.
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:650)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:279)
at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:97)
... 20 more
Caused by: org.xml.sax.SAXParseException: Premature end of file.
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)
at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:584)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:638)
... 22 more
CAUSE:
javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: Premature end of file.
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:650)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:279)
at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:97)
at com.sun.xml.messaging.saaj.soap.ver1_2.SOAPPart1_2Impl.createEnvelopeFromSource(SOAPPart1_2Impl.java:39)
at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:98)
at at.lfrz.replication.utils.ReplicationHelper.getValuesByTagName(ReplicationHelper.java:114)
at at.lfrz.replication.utils.ReplicationHelper.checkSOAPReply(ReplicationHelper.java:34)
at at.lfrz.replication.utils.QueueListener.onMessage(QueueListener.java:62)
at org.exolab.jms.client.JmsMessageConsumer.onMessage(JmsMessageConsumer.java:292)
at org.exolab.jms.client.JmsSession.execute(JmsSession.java:669)
at org.exolab.jms.client.JmsSession.onMessage(JmsSession.java:607)
at org.exolab.jms.client.rmi.RmiJmsSessionStub.onMessage(RmiJmsSessionStub.java:539)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.xml.sax.SAXParseException: Premature end of file.
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)
at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:584)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:638)
... 22 more
---------
org.xml.sax.SAXParseException: Premature end of file.
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)
at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:584)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:638)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:279)
at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:97)
at com.sun.xml.messaging.saaj.soap.ver1_2.SOAPPart1_2Impl.createEnvelopeFromSource(SOAPPart1_2Impl.java:39)
at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:98)
at at.lfrz.replication.utils.ReplicationHelper.getValuesByTagName(ReplicationHelper.java:114)
at at.lfrz.replication.utils.ReplicationHelper.checkSOAPReply(ReplicationHelper.java:34)
at at.lfrz.replication.utils.QueueListener.onMessage(QueueListener.java:62)
at org.exolab.jms.client.JmsMessageConsumer.onMessage(JmsMessageConsumer.java:292)
at org.exolab.jms.client.JmsSession.execute(JmsSession.java:669)
at org.exolab.jms.client.JmsSession.onMessage(JmsSession.java:607)
at org.exolab.jms.client.rmi.RmiJmsSessionStub.onMessage(RmiJmsSessionStub.java:539)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:595)
CAUSE:
javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: Premature end of file.
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:650)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:279)
at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:97)
at com.sun.xml.messaging.saaj.soap.ver1_2.SOAPPart1_2Impl.createEnvelopeFromSource(SOAPPart1_2Impl.java:39)
at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:98)
at at.lfrz.replication.utils.ReplicationHelper.getValuesByTagName(ReplicationHelper.java:114)
at at.lfrz.replication.utils.ReplicationHelper.checkSOAPReply(ReplicationHelper.java:34)
at at.lfrz.replication.utils.QueueListener.onMessage(QueueListener.java:62)
at org.exolab.jms.client.JmsMessageConsumer.onMessage(JmsMessageConsumer.java:292)
at org.exolab.jms.client.JmsSession.execute(JmsSession.java:669)
at org.exolab.jms.client.JmsSession.onMessage(JmsSession.java:607)
at org.exolab.jms.client.rmi.RmiJmsSessionStub.onMessage(RmiJmsSessionStub.java:539)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.xml.sax.SAXParseException: Premature end of file.
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)
at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:584)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:638)
... 22 more
---------
org.xml.sax.SAXParseException: Premature end of file.
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)
at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:584)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:638)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:279)
at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:97)
at com.sun.xml.messaging.saaj.soap.ver1_2.SOAPPart1_2Impl.createEnvelopeFromSource(SOAPPart1_2Impl.java:39)
at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:98)
at at.lfrz.replication.utils.ReplicationHelper.getValuesByTagName(ReplicationHelper.java:114)
at at.lfrz.replication.utils.ReplicationHelper.checkSOAPReply(ReplicationHelper.java:34)
at at.lfrz.replication.utils.QueueListener.onMessage(QueueListener.java:62)
at org.exolab.jms.client.JmsMessageConsumer.onMessage(JmsMessageConsumer.java:292)
at org.exolab.jms.client.JmsSession.execute(JmsSession.java:669)
at org.exolab.jms.client.JmsSession.onMessage(JmsSession.java:607)
at org.exolab.jms.client.rmi.RmiJmsSessionStub.onMessage(RmiJmsSessionStub.java:539)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:595)
Alles anzeigen
Der Fehler tritt im getEnvelope(); von folgendem Code auf:
Code
final SOAPPart soapPart = msg.getSOAPPart();
final SOAPEnvelope envelope = soapPart.getEnvelope();
final SOAPBody soapBody = envelope.getBody();
final NodeList nodeList = soapBody.getElementsByTagName(tagName);
erzeugung einer SOAP Nachricht:
Code
final MessageFactory mf = MessageFactory.newInstance();
msg = mf.createMessage();
final SOAPPart soapPart = msg.getSOAPPart();
final SOAPEnvelope envelope = soapPart.getEnvelope();
final SOAPBody body = envelope.getBody();
ich hoffe jemand kann mir helfen, verzweifle schön langsam...