You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Thierry.M" <mo...@neuf.fr> on 2008/08/31 17:08:50 UTC

Error unmarshalling arguments in tomcat only

Hi, I am in trouble. I wrote a simple web service from a wsdl. It works fine
when I use the eclipse Tomcat with the generated client and a proxy client
written as well. When I package and deploy it on Tomcat, I am able to get
the wsdl description from the url (see below for the wsdl…) I try to invoke
the service with the same client as before (with the right url hopefully !)
and I get :

31 ao¹t 2008 16:40:33 org.apache.cxf.interceptor.LoggingInInterceptor
logging
INFO: Inbound Message
----------------------------
Encoding: UTF-8
Headers: {connection=[keep-alive], cache-control=[no-cache],
host=[localhost:808
0], user-agent=[Java/1.5.0_15], transfer-encoding=[chunked],
pragma=[no-cache],
content-type=[text/xml; charset=UTF-8], accept=[*], soapaction=[""]}
Messages:
Message:

Payload:
--------------------------------------
31 ao¹t 2008 16:40:33 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
        at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handle
Message(ReadHeadersInterceptor.java:183)
        at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handle
Message(ReadHeadersInterceptor.java:54)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
orChain.java:221)
        at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
ationObserver.java:78)
        at
org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDes
tination.java:92)
        at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(
ServletController.java:279)
        at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletCont
roller.java:161)
        at
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCX
FServlet.java:174)
        at
org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCX
FServlet.java:152)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:175)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:128)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:286)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:844)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
7)
        at java.lang.Thread.run(Thread.java:595)
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]
        at
com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:6
61)
        at
com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:21
34)
        at
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.ja
va:2040)
        at
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
        at
com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095
)
        at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handle
Message(ReadHeadersInterceptor.java:83)
        ... 22 more
31 ao¹t 2008 16:40:34
org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCa
llback onClose
INFO: Outbound Message
---------------------------
Encoding: UTF-8
Headers: {}
Messages:
Payload: <soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><
soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Error
readi
ng XMLStreamReader.</faultstring></soap:Fault></soap:Body></soap:Envelope>

Nothing no arguments received.

Any idea ? Thanks for any help.

The wsdl read from tomcat :

<?xml version="1.0" encoding="UTF-8" ?> 
- <wsdl:definitions name="PobiServiceService"
targetNamespace="http://pmodec.bdf.fr/webservice/pobi"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://pmodec.bdf.fr/webservice/pobi"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
- <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://pmodec.bdf.fr/webservice/pobi"
xmlns:pobi="http://pmodec.bdf.fr/webservice/pobi/types"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://pmodec.bdf.fr/webservice/pobi"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <!-- 
 Generic types to exchange message with POBI 
  --> 
  <xs:import namespace="http://pmodec.bdf.fr/webservice/pobi/types"
schemaLocation="http://localhost:8080/pmodec-wspobi/services/Pobi?xsd=pobi_common_types.xsd"
/> 
- <!-- 
 Business types to marshall and unmarshall
			<xs:import
				namespace="http://pmodec.bdf.fr/common/types"
				schemaLocation="pmodec_common_types.xsd" />
			
  --> 
  <xs:element name="getFinancialFirm" type="pobi:PobiRequestArgumentType" /> 
  <xs:element name="getFinancialFirmByIdAtDateResponse"
type="pobi:PobiResponseReturnType" /> 
  <xs:element name="pobiWSException" type="pobi:PobiDetailExceptionType" /> 
- <!-- 
 To unmarshall the detail of arguments from POBI 
  --> 
  <xs:element name="arguments" type="pobi:PobiArgumentDetailType" /> 
  </xs:schema>
  </wsdl:types>
- <wsdl:message name="getFinancialFirmByIdAtDateResponse">
  <wsdl:part element="tns:getFinancialFirmByIdAtDateResponse"
name="parameters" /> 
  </wsdl:message>
- <wsdl:message name="getFinancialFirmByIdAtDate">
  <wsdl:part element="tns:getFinancialFirm" name="arguments" /> 
  </wsdl:message>
- <wsdl:message name="pobiWSException">
  <wsdl:part element="tns:pobiWSException" name="pobiException" /> 
  </wsdl:message>
- <wsdl:portType name="pobiService">
- <wsdl:operation name="getFinancialFirm">
  <wsdl:input message="tns:getFinancialFirmByIdAtDate"
name="getFinancialFirmByIdAtDate" /> 
  <wsdl:output message="tns:getFinancialFirmByIdAtDateResponse"
name="getFinancialFirmByIdAtDateResponse" /> 
  <wsdl:fault message="tns:pobiWSException" name="PobiWSException" /> 
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:binding name="PobiServiceSoapBinding" type="tns:pobiService">
  <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" /> 
- <wsdl:operation name="getFinancialFirm">
  <soap:operation soapAction="" style="document" /> 
- <wsdl:input name="getFinancialFirmByIdAtDate">
  <soap:body use="literal" /> 
  </wsdl:input>
- <wsdl:output name="getFinancialFirmByIdAtDateResponse">
  <soap:body use="literal" /> 
  </wsdl:output>
- <wsdl:fault name="PobiWSException">
  <soap:fault name="PobiWSException" use="literal" /> 
  </wsdl:fault>
  </wsdl:operation>
  </wsdl:binding>
+ <wsdl:service name="PobiServiceService">
  </wsdl:definitions>





-- 
View this message in context: http://www.nabble.com/Error-unmarshalling-arguments-in-tomcat-only-tp19243071p19243071.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Error unmarshalling arguments in tomcat only

Posted by Daniel Kulp <dk...@apache.org>.
It looks like the incoming message is empty.   There is no payload from the 
LoggingInInterceptor printed.   That's definitely a problem.

Is this on Windows?   If so, can you try turning off any firewall things?   I 
know Kaspersky Personal Firewall has a tendency to cause this problem.

Otherwise, you might want to try wireshark or tcpdump or something to capture 
the raw wire transfers.   Also, add the logging out interceptor on the client 
to make sure it's sending something.   Finally, maybe try turning off 
chunking.   

Dan


On Sunday 31 August 2008 11:08:50 am Thierry.M wrote:
> Hi, I am in trouble. I wrote a simple web service from a wsdl. It works
> fine when I use the eclipse Tomcat with the generated client and a proxy
> client written as well. When I package and deploy it on Tomcat, I am able
> to get the wsdl description from the url (see below for the wsdl…) I try to
> invoke the service with the same client as before (with the right url
> hopefully !) and I get :
>
> 31 ao¹t 2008 16:40:33 org.apache.cxf.interceptor.LoggingInInterceptor
> logging
> INFO: Inbound Message
> ----------------------------
> Encoding: UTF-8
> Headers: {connection=[keep-alive], cache-control=[no-cache],
> host=[localhost:808
> 0], user-agent=[Java/1.5.0_15], transfer-encoding=[chunked],
> pragma=[no-cache],
> content-type=[text/xml; charset=UTF-8], accept=[*], soapaction=[""]}
> Messages:
> Message:
>
> Payload:
> --------------------------------------
> 31 ao¹t 2008 16:40:33 org.apache.cxf.phase.PhaseInterceptorChain
> doIntercept INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
>         at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handle
> Message(ReadHeadersInterceptor.java:183)
>         at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handle
> Message(ReadHeadersInterceptor.java:54)
>         at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
> orChain.java:221)
>         at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
> ationObserver.java:78)
>         at
> org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDes
> tination.java:92)
>         at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(
> ServletController.java:279)
>         at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletCont
> roller.java:161)
>         at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCX
> FServlet.java:174)
>         at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCX
> FServlet.java:152)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:290)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:206)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> alve.java:233)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
> alve.java:175)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
> ava:128)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
> ava:102)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
> ve.java:109)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
> a:286)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
>
> :844)
>
>         at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
> ss(Http11Protocol.java:583)
>         at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
> 7)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
>  at [row,col {unknown-source}]: [1,0]
>         at
> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:6
> 61)
>         at
> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:21
> 34)
>         at
> com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.ja
> va:2040)
>         at
> com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
>         at
> com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095
> )
>         at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handle
> Message(ReadHeadersInterceptor.java:83)
>         ... 22 more
> 31 ao¹t 2008 16:40:34
> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCa
> llback onClose
> INFO: Outbound Message
> ---------------------------
> Encoding: UTF-8
> Headers: {}
> Messages:
> Payload: <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><
> soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Error
> readi
> ng XMLStreamReader.</faultstring></soap:Fault></soap:Body></soap:Envelope>
>
> Nothing no arguments received.
>
> Any idea ? Thanks for any help.
>
> The wsdl read from tomcat :
>
> <?xml version="1.0" encoding="UTF-8" ?>
> - <wsdl:definitions name="PobiServiceService"
> targetNamespace="http://pmodec.bdf.fr/webservice/pobi"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://pmodec.bdf.fr/webservice/pobi"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> - <wsdl:types>
> - <xs:schema attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="http://pmodec.bdf.fr/webservice/pobi"
> xmlns:pobi="http://pmodec.bdf.fr/webservice/pobi/types"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://pmodec.bdf.fr/webservice/pobi"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> - <!--
>  Generic types to exchange message with POBI
>   -->
>   <xs:import namespace="http://pmodec.bdf.fr/webservice/pobi/types"
> schemaLocation="http://localhost:8080/pmodec-wspobi/services/Pobi?xsd=pobi_
>common_types.xsd" />
> - <!--
>  Business types to marshall and unmarshall
> 			<xs:import
> 				namespace="http://pmodec.bdf.fr/common/types"
> 				schemaLocation="pmodec_common_types.xsd" />
>
>   -->
>   <xs:element name="getFinancialFirm" type="pobi:PobiRequestArgumentType"
> /> <xs:element name="getFinancialFirmByIdAtDateResponse"
> type="pobi:PobiResponseReturnType" />
>   <xs:element name="pobiWSException" type="pobi:PobiDetailExceptionType" />
> - <!--
>  To unmarshall the detail of arguments from POBI
>   -->
>   <xs:element name="arguments" type="pobi:PobiArgumentDetailType" />
>   </xs:schema>
>   </wsdl:types>
> - <wsdl:message name="getFinancialFirmByIdAtDateResponse">
>   <wsdl:part element="tns:getFinancialFirmByIdAtDateResponse"
> name="parameters" />
>   </wsdl:message>
> - <wsdl:message name="getFinancialFirmByIdAtDate">
>   <wsdl:part element="tns:getFinancialFirm" name="arguments" />
>   </wsdl:message>
> - <wsdl:message name="pobiWSException">
>   <wsdl:part element="tns:pobiWSException" name="pobiException" />
>   </wsdl:message>
> - <wsdl:portType name="pobiService">
> - <wsdl:operation name="getFinancialFirm">
>   <wsdl:input message="tns:getFinancialFirmByIdAtDate"
> name="getFinancialFirmByIdAtDate" />
>   <wsdl:output message="tns:getFinancialFirmByIdAtDateResponse"
> name="getFinancialFirmByIdAtDateResponse" />
>   <wsdl:fault message="tns:pobiWSException" name="PobiWSException" />
>   </wsdl:operation>
>   </wsdl:portType>
> - <wsdl:binding name="PobiServiceSoapBinding" type="tns:pobiService">
>   <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http" />
> - <wsdl:operation name="getFinancialFirm">
>   <soap:operation soapAction="" style="document" />
> - <wsdl:input name="getFinancialFirmByIdAtDate">
>   <soap:body use="literal" />
>   </wsdl:input>
> - <wsdl:output name="getFinancialFirmByIdAtDateResponse">
>   <soap:body use="literal" />
>   </wsdl:output>
> - <wsdl:fault name="PobiWSException">
>   <soap:fault name="PobiWSException" use="literal" />
>   </wsdl:fault>
>   </wsdl:operation>
>   </wsdl:binding>
> + <wsdl:service name="PobiServiceService">
>   </wsdl:definitions>



-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog