cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: can't send request to WS with MINOCCURS=0
Date Wed, 17 Mar 2010 13:47:11 GMT

Can you package your little testcase into a project and attach to a JIRA?   
That will help get it into a state to debug.

Thoughts:
1) What version of CXF?
2) Can you try removing the ASM jar from the classpath and see if the stack 
trace is different?
3) Was the service interface generated from the wsdl?   What is the full 
method signature (with annotations) for GetMDEStatus method?


Dan



On Wednesday 17 March 2010 9:19:44 am 0vermind wrote:
> Hi there,
> i've got a wsdl (see below), with the minoccurs=0 attribute in the request
> parameter set.
> I have generated the java classes with cxf from eclipse and deployed the
> service on tomcat 5.5.
> The WS works correctly if I send the minoccurs-element in the request.
> If I leave it out completely i get the following error:
> 
> 
> 
> 17.03.2010 13:53:30 org.apache.cxf.interceptor.LoggingInInterceptor logging
> INFO: Inbound Message
> ----------------------------
> ID: 2
> Address: /test3/services/MDEStatusServiceSoap
> Encoding: UTF-8
> Content-Type: text/xml;charset=UTF-8
> Headers: {content-type=[text/xml;charset=UTF-8], host=[localhost:8083],
> Content-Length=[271], SOAPAction=[""], user-agent=[Jakarta
> Commons-HttpClient/3.1], Content-Type=[text/xml;charset=UTF-8]}
> 
> Payload: <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:mde="http://mde_stats.webservices.lbbw.de/">
>    <soapenv:Header/>
>    <soapenv:Body>
>       <mde:GetMDEStatus>
> 
>       </mde:GetMDEStatus>
>    </soapenv:Body>
> </soapenv:Envelope>
> 
> 
> --------------------------------------
> 17.03.2010 13:53:30 org.apache.cxf.phase.PhaseInterceptorChain
> doDefaultLogging
> WARNUNG: Interceptor for
> {http://mde_stats.webservices.lbbw.de/}MDEStatusService#{http://mde_stats.w
> ebservices.lbbw.de/}GetMDEStatus has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault
> 	at
> org.apache.cxf.jaxws.interceptors.WrapperClassInInterceptor.handleMessage(W
> rapperClassInInterceptor.java:168) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
> n.java:243) at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationO
> bserver.java:109) at
> org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestinati
> on.java:98) at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(Servle
> tController.java:406) at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController
> .java:178) at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServl
> et.java:142) at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(Abstract
> HTTPServlet.java:179) at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPSer
> vlet.java:103) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> 	at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPSe
> rvlet.java:159) at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
> nFilterChain.java:252) at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
> hain.java:173) at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
> ava:213) at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j
> ava:178) at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12
> 6) at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10
> 5) at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav
> a: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.process
> Connection(Http11BaseProtocol.java:664) at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.ja
> va:527) at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerW
> orkerThread.java:80) at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja
> va:684) at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.NullPointerException
> 	at
> de.lbbw.webservices.mde_stats.GetMDEStatus_WrapperTypeHelper1.getWrapperPar
> ts(Unknown Source)
> 	at
> org.apache.cxf.jaxws.interceptors.WrapperClassInInterceptor.handleMessage(W
> rapperClassInInterceptor.java:135) ... 24 more
> 17.03.2010 13:53:30
> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose
> 
> 
> 
> INFO: Outbound Message
> ---------------------------
> ID: 2
> Response-Code: 500
> Encoding: UTF-8
> Content-Type: text/xml
> Headers: {}
> Payload: <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fau
> lt><faultcode>soap:Server</faultcode><faultstring>Fault occurred
while
> processing.</faultstring></soap:Fault></soap:Body></soap:Envelope>
> 
> 
> 
> 
> The wsdl is this (i think any HelloWorld with minoccurs=0 should do):
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="http://mde_stats.webservices.lbbw.de/"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
> xmlns:s="http://www.w3.org/2001/XMLSchema"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:tns="http://mde_stats.webservices.lbbw.de/"
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">
>   <wsdl:types>
>     <xs:schema elementFormDefault="qualified"
> targetNamespace="http://mde_stats.webservices.lbbw.de/">
>             <xs:element name="GetMDEStatus">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element minOccurs="0" name="process_name"
> nillable="true" type="xs:string"/>
> 
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>             <xs:element name="GetMDEStatusResponse">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element maxOccurs="1" minOccurs="0"
> name="process_result" type="xs:string"/>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
> 
>         </xs:schema>
>   </wsdl:types>
>   <wsdl:message name="GetMDEStatusSoapIn">
>     <wsdl:part name="parameters" element="tns:GetMDEStatus">
>     </wsdl:part>
>   </wsdl:message>
>   <wsdl:message name="GetMDEStatusSoapOut">
>     <wsdl:part name="parameters" element="tns:GetMDEStatusResponse">
>     </wsdl:part>
>   </wsdl:message>
>   <wsdl:portType name="MDEStatusServiceSoap">
>     <wsdl:operation name="GetMDEStatus">
>       <wsdl:input message="tns:GetMDEStatusSoapIn">
>     </wsdl:input>
>       <wsdl:output message="tns:GetMDEStatusSoapOut">
>     </wsdl:output>
>     </wsdl:operation>
>   </wsdl:portType>
>   <wsdl:binding name="MDEStatusServiceSoap"
> type="tns:MDEStatusServiceSoap"> <soap:binding
> transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation
> name="GetMDEStatus">
>       <soap:operation soapAction=""/>
>       <wsdl:input>
>         <soap:body use="literal"/>
>       </wsdl:input>
>       <wsdl:output>
>         <soap:body use="literal"/>
>       </wsdl:output>
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name="MDEStatusService">
>     <wsdl:port name="MDEStatusServiceSoap"
> binding="tns:MDEStatusServiceSoap">
>       <soap:address
> location="http://localhost:8083/test/services/MDEStatusServiceSoap"/>
>     </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>

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

Mime
View raw message