You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Cencio <ce...@gmail.com> on 2007/10/15 11:25:35 UTC

Re: Message level service .. Attachment problems

Now that i solve config problems to work with SOAPMessage i found problems to
work with attachments...

If i send a simple message everything works fine, if i send a message with
attachments it throws this error:

 11:00:41,080 ERROR [STDERR] 15-ott-2007 11.00.41
com.sun.xml.messaging.saaj.soap.EnvelopeFactory createEnvelope
GRAVE: SAAJ0511: Unable to create envelope from given source
11:00:41,083 ERROR [STDERR] 15-ott-2007 11.00.41
org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unable to create envelope from given
source: 
        at
org.apache.cxf.jaxws.interceptors.DispatchInDatabindingInterceptor$PostDispatchSOAPHandlerInterceptor.handleMessage(DispatchInDatabindingInterceptor.java:191)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
        at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73)
        at
org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:79)
        at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:235)
        at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:140)
        at
org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:278)
        at
org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:256)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
        at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
        at java.lang.Thread.run(Thread.java:595)
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create
envelope from given source: 
        at
com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:114)
        at
com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.createEnvelopeFromSource(SOAPPart1_1Impl.java:71)
        at
com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:125)
        at
org.apache.cxf.jaxws.interceptors.DispatchInDatabindingInterceptor$PostDispatchSOAPHandlerInterceptor.handleMessage(DispatchInDatabindingInterceptor.java:189)
        ... 28 more
Caused by: javax.xml.transform.TransformerException:
org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:501)
        at
com.sun.xml.messaging.saaj.util.transform.EfficientStreamingTransformer.transform(EfficientStreamingTransformer.java:390)
        at
com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:102)
        ... 31 more
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)
        at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
        ... 33 more



Seems that the message isn't well formed, but it's from the same client i
used for axis and it worked for that service... anyway i get it from tcpmon:

---------------------------------------------------------------------------

POST /CFX/PD HTTP/1.0

Content-Type: multipart/related; type="text/xml";
start="<9E6FB5249459452EB530C3A40AEFC7F4>"; 
boundary="----=_Part_0_32755292.1192438840754"

Accept: application/soap+xml, application/dime, multipart/related, text/*

User-Agent: Axis/1.4

Host: 127.0.0.1:8000

Cache-Control: no-cache

Pragma: no-cache

SOAPAction: ""

Content-Length: 1443





------=_Part_0_32755292.1192438840754

Content-Type: text/xml; charset=UTF-8

Content-Transfer-Encoding: binary

Content-Id: <9E6FB5249459452EB530C3A40AEFC7F4>



<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><eseguiServizio
xmlns="http://spcoop.it/cart/pdd-test"><Richiesta>&lt;persona
nome=&quot;mario&quot;
cognome=&quot;rossi&quot;/&gt;</Richiesta><attachInZIP1
href="cid:0B6916D312D20D28FE2B5CF258B0E31A" xmlns=""/><attachInZIP2
href="cid:63B400D58A8EE701B9355C32D456896C"
xmlns=""/></eseguiServizio></soapenv:Body></soapenv:Envelope>

------=_Part_0_32755292.1192438840754

Content-Type: application/octet-stream

Content-Transfer-Encoding: binary

Content-Id: <0B6916D312D20D28FE2B5CF258B0E31A>



PK
------------------------------------------------------------------------------

Copy 'n Paste attachment's data mess it in this text box and i loose the
second attachment, but it's ok..


Any idea to solve it?



-- 
View this message in context: http://www.nabble.com/Message-level-service-tf4607880.html#a13209370
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Message level service .. Attachment problems

Posted by Cencio <ce...@gmail.com>.
This is the tcpmon... The response error should be a Soap Envelope... why it
heaven't envelope and body tags?






==============
Listen Port: 8000
Target Host: 127.0.0.1
Target Port: 8080
==== Request ====
POST /CFX/PD HTTP/1.0^M
Content-Type: multipart/related; type="text/xml";
start="<9E6FB5249459452EB530C3A40AEFC7F4>";  
boundary="----=_Part_0_32755292.1192438840754"^M
Accept: application/soap+xml, application/dime, multipart/related, text/*^M
User-Agent: Axis/1.4^M
Host: 127.0.0.1:8000^M
Cache-Control: no-cache^M
Pragma: no-cache^M
SOAPAction: ""^M
Content-Length: 1443^M
^M
^M
------=_Part_0_32755292.1192438840754^M
Content-Type: text/xml; charset=UTF-8^M
Content-Transfer-Encoding: binary^M
Content-Id: <9E6FB5249459452EB530C3A40AEFC7F4>^M
^M
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><eseguiServizio
xmlns="http://spcoop.it/cart/pdd-test"><Richiesta>&lt;persona
nome=&quot;mario&quot;
cognome=&quot;rossi&quot;/&gt;</Richiesta><attachInZIP1
href="cid:0B6916D312D20D28FE2B5CF258B0E31A" xmlns=""/><attachInZIP2
href="cid:63B400D58A8EE701B9355C32D456896C"
xmlns=""/></eseguiServizio></soapenv:Body></soapenv:Envelope>^M
------=_Part_0_32755292.1192438840754^M
Content-Type: application/octet-stream^M
Content-Transfer-Encoding: binary^M
Content-Id: <0B6916D312D20D28FE2B5CF258B0E31A>^M
^M
PK^C^D^T^@^@^@^H^@�US5^N~S�^W^@^@^@^X^@^@^@     ^@^U^@prova.xmlUT      
^@^C$;7E$;7EUx^D^@^V^@d^@�I�L̷�H���^O�/�I��^G^Kp^A^@PK^A^B^W^C^T^@^@^@^H^@�US5^N~S�^W^@^@^@^X^@^@^@     
^@^M^@^@^@^@^@^A^@^@^@�^@^@^@^@prova.xmlUT^E^@^C$;7EUx^@^@PK^E^F^@^@^@^@^A^@^A^@D^@^@^@S^@^@^@^@^@^M
------=_Part_0_32755292.1192438840754^M
Content-Type: application/octet-stream^M
Content-Transfer-Encoding: binary^M
Content-Id: <63B400D58A8EE701B9355C32D456896C>^M
^M
PK^C^D^T^@^@^@^H^@�US5^N~S�^W^@^@^@^X^@^@^@     ^@^U^@prova.xmlUT      
^@^C$;7E$;7EUx^D^@^V^@d^@�I�L̷�H���^O�/�I��^G^Kp^A^@PK^A^B^W^C^T^@^@^@^H^@�US5^N~S�^W^@^@^@^X^@^@^@     
^@^M^@^@^@^@^@^A^@^@^@�^@^@^@^@prova.xmlUT^E^@^C$;7EUx^@^@PK^E^F^@^@^@^@^A^@^A^@D^@^@^@S^@^@^@^@^@^M
------=_Part_0_32755292.1192438840754--^M
==== Response ====
HTTP/1.1 500 Internal Server Error^M
Server: Apache-Coyote/1.1^M
X-Powered-By: Servlet 2.4; JBoss-4.0.5.GA (build: CVSTag=Branch_4_0
date=200610162339)/Tomcat-5.5^M
Content-Type: text/xml;charset=UTF-8^M
Content-Length: 182^M
Date: Mon, 15 Oct 2007 09:00:41 GMT^M
Connection: close^M
^M
<ns1:Fault
xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>ns1:Server</faultcode><faultstring>Unable
to create envelope from given source: </faultstring></ns1:Fault>
==============




-- 
View this message in context: http://www.nabble.com/Message-level-service-tf4607880.html#a13209530
Sent from the cxf-user mailing list archive at Nabble.com.