cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juan Velez (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-1785) wsdlLocation attribute and XmlBeans: Getting NullPointerException/UNMARSHALL_ERROR
Date Wed, 24 Sep 2008 15:54:44 GMT

    [ https://issues.apache.org/jira/browse/CXF-1785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634179#action_12634179
] 

Juan Velez commented on CXF-1785:
---------------------------------

Hi Sean:

Thanks for looking into this. Unfortunately besides the documentation 
provided as part of this Issue, there is no longer a test case as my team 
and I decided (some weeks ago) no longer to use XmlBeans as the XML Data 
Binding for CXF given the many issues/bugs with it. We have moved to using 
JAXB as the XML Data Binding for CXF. 

Let me know if any specific file is needed so you can recreate the problem

Thank you,

Juan Andres VELEZ CADAVID
Senior Software Engineer
AREVA T&D Inc.
10865 Willows Road NE
Redmond, WA  98052-2502
Tel: +1(425) 250-2628
Fax: +1(425) 250-1400
E-Mail: juan.velez@areva-td.com

CONFIDENTIALITY:  This e-mail and any attachments are confidential and may 
be privileged.
If  you are not a named recipient, please notify the sender immediately 
and do not disclose the 
contents to another person,  use it for any purpose or store or copy the 
information in any medium.




"Sean O'Callaghan (JIRA)" <jira@apache.org> 
24-09-08 08:30 AM

To
Juan VELEZ/USBVE01/TDE/AREVA-TD@ATD
cc

Subject
[jira] Commented: (CXF-1785) wsdlLocation attribute and XmlBeans: Getting 
NullPointerException/UNMARSHALL_ERROR







    [ 
https://issues.apache.org/jira/browse/CXF-1785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634167#action_12634167

] 

Sean O'Callaghan commented on CXF-1785:
---------------------------------------

Hi Juan,

Do you have a simple testcase which I could use to recreate this problem?

Regards,

Seán.

NullPointerException/UNMARSHALL_ERROR
----------------------------------------------------------------------------------
2.3.0, CXF 2.1
implementation classes (annotated of course). When I do not use the 
wsdlLocation attribute on jaxws:endpoint, the request I send to the 
service works fine, but when I specify the wsdlLocation attribute, I get a 
NullPointerException/UNMARSHAL_ERROR from the XmlBeans databinding used by 
CXF. Any ideas where I am not doing it correctly?
org.apache.cxf.xmlbeans.DataReaderImpl.read(DataReaderImpl.java:73)
org.apache.cxf.xmlbeans.DataReaderImpl.read(DataReaderImpl.java:43)
org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:183)
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92)
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:214)
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:151)
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:170)
org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:148)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
com.arevatd.mmi.pjm.filters.CLUProgramContextFilter.doFilter(CLUProgramContextFilter.java:56)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
doIntercept
org.apache.cxf.xmlbeans.DataReaderImpl.read(DataReaderImpl.java:81)
org.apache.cxf.xmlbeans.DataReaderImpl.read(DataReaderImpl.java:43)
org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:183)
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92)
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:214)
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:151)
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:170)
org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:148)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
com.arevatd.mmi.pjm.filters.CLUProgramContextFilter.doFilter(CLUProgramContextFilter.java:56)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
org.apache.cxf.xmlbeans.DataReaderImpl.read(DataReaderImpl.java:73)
type="tns:MMIExportRequestPortType">
http://schemas.xmlsoap.org/soap/http" />
/>
binding="tns:MMIExportRequestSoapBinding">
/>
name="application"   type="string" />
name="environment"   type="string" />
name="directoryName" type="string" />
name="filename"      type="string" />
name="requestId"     type="string" />
type="mmi:ExportRequestMessageType" />
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
class="com.arevatd.mmi.business.services.support.CmiModelDataExportWsImpl" 
scope="prototype" />
class="org.apache.cxf.xmlbeans.XmlBeansDataBinding" scope="prototype" />
class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean" 
scope="singleton">
implementor="com.arevatd.mmi.business.services.support.CmiModelDataExportWsImpl"
CMI Model Data
project
"performExportRequest")
@WebService(endpointInterface="com.arevatd.mmi.business.services.CmiModelDataExportWs",
Logger.getLogger(this.getClass().getName());
/*throws ExportRequestFault*/ {
"Client"));

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.





> wsdlLocation attribute and XmlBeans: Getting NullPointerException/UNMARSHALL_ERROR
> ----------------------------------------------------------------------------------
>
>                 Key: CXF-1785
>                 URL: https://issues.apache.org/jira/browse/CXF-1785
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1
>         Environment: WinXP Pro SP3, Java 1.6, Spring 2.5, XmlBeans 2.3.0, CXF 2.1
>            Reporter: Juan Velez
>            Assignee: Sean O'Callaghan
>         Attachments: MMI CXF.zip
>
>
> I have created my own WSDL and its corresponding service and implementation classes (annotated
of course). When I do not use the wsdlLocation attribute on jaxws:endpoint, the request I
send to the service works fine, but when I specify the wsdlLocation attribute, I get a NullPointerException/UNMARSHAL_ERROR
from the XmlBeans databinding used by CXF. Any ideas where I am not doing it correctly?
> Error
> java.lang.NullPointerException
>         at org.apache.cxf.xmlbeans.DataReaderImpl.read(DataReaderImpl.java:73)
>         at org.apache.cxf.xmlbeans.DataReaderImpl.read(DataReaderImpl.java:43)
>         at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:183)
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
>         at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92)
>         at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:214)
>         at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:151)
>         at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:170)
>         at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:148)
>         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(ApplicationFilterChain.java:290)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at com.arevatd.mmi.pjm.filters.CLUProgramContextFilter.doFilter(CLUProgramContextFilter.java:56)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>         at java.lang.Thread.run(Thread.java:595)
> Sep 4, 2008 12:35:49 PM org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: UNMARSHAL_ERROR
>         at org.apache.cxf.xmlbeans.DataReaderImpl.read(DataReaderImpl.java:81)
>         at org.apache.cxf.xmlbeans.DataReaderImpl.read(DataReaderImpl.java:43)
>         at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:183)
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
>         at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92)
>         at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:214)
>         at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:151)
>         at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:170)
>         at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:148)
>         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(ApplicationFilterChain.java:290)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at com.arevatd.mmi.pjm.filters.CLUProgramContextFilter.doFilter(CLUProgramContextFilter.java:56)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.NullPointerException
>         at org.apache.cxf.xmlbeans.DataReaderImpl.read(DataReaderImpl.java:73)
>         ... 26 more
> WSDL
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="mmi"
>                   targetNamespace="http://com.arevatd.mmi/xml/wsdl"
>                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>                   xmlns:tns="http://com.arevatd.mmi/xml/wsdl"
>                   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>                   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>                   xmlns:mmi="http://com.arevatd.mmi/xml">
>   <wsdl:types>
>     <xsd:schema targetNamespace="http://com.arevatd.mmi/xml/wsdl"
>                 xmlns="http://www.w3.org/2001/XMLSchema">
>       <import namespace="http://com.arevatd.mmi/xml"
>               schemaLocation="../xml/mmi.xsd" />
>     </xsd:schema>
>   </wsdl:types>
>   <wsdl:message name="ExportRequestMessage">
>     <wsdl:part name="request" element="mmi:ExportRequestMessage" />
>   </wsdl:message>
>   <wsdl:portType name="MMIExportRequestPortType">
>     <wsdl:operation name="performExportRequest">
>       <wsdl:input message="tns:ExportRequestMessage" />
>     </wsdl:operation>
>   </wsdl:portType>
>   <wsdl:binding name="MMIExportRequestSoapBinding" type="tns:MMIExportRequestPortType">
>     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"
/>
>     <wsdl:operation name="performExportRequest">
>       <soap:operation soapAction="performExportRequest" style="document" />
>       <wsdl:input>
>         <soap:body use="literal" />
>       </wsdl:input>
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name="MMIExportRequestService">
>       <wsdl:port name="MMIExportRequestPort" binding="tns:MMIExportRequestSoapBinding">
>       <soap:address location="http://localhost:8080/mmi/services/export" />
>     </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>
> XML SCHEMA
> <?xml version="1.0" encoding="UTF-8"?>
> <schema xmlns="http://www.w3.org/2001/XMLSchema"
>         targetNamespace="http://com.arevatd.mmi/xml"
>         xmlns:mmi="http://com.arevatd.mmi/xml"
>         elementFormDefault="qualified">
>         <complexType name="ExportRequestMessageType">
>                 <all>
>                         <element minOccurs="1" maxOccurs="1" name="application"  
type="string" />
>                         <element minOccurs="1" maxOccurs="1" name="environment"  
type="string" />
>                         <element minOccurs="1" maxOccurs="1" name="directoryName"
type="string" />
>                         <element minOccurs="1" maxOccurs="1" name="filename"     
type="string" />
>                         <element minOccurs="1" maxOccurs="1" name="requestId"    
type="string" />
>                 </all>
>         </complexType>
>         <element name="ExportRequestMessage" type="mmi:ExportRequestMessageType" />
> </schema>
> CXF-servlet.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- Configuration File for CXF -->
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xmlns:jaxws="http://cxf.apache.org/jaxws"
>        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
>        
>     <import resource="classpath:META-INF/cxf/cxf.xml" />
>     <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>     <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>    
>     <bean id="exportService" class="com.arevatd.mmi.business.services.support.CmiModelDataExportWsImpl"
scope="prototype" />
>    
>     <bean id="xmlBeansBean" class="org.apache.cxf.xmlbeans.XmlBeansDataBinding" scope="prototype"
/>
>     <bean id="exportServiceFactory" class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
scope="singleton">
>       <property name="dataBinding" ref="xmlBeansBean" />
>     </bean>
>     <jaxws:endpoint id="exportServiceEndPoint"
>                     implementor="com.arevatd.mmi.business.services.support.CmiModelDataExportWsImpl"
>                     address="/export"
>                     wsdlLocation="wsdl/mmi.wsdl" >
>         <jaxws:serviceFactory>
>             <ref bean="exportServiceFactory" />
>         </jaxws:serviceFactory>
>     </jaxws:endpoint>
> </beans>
> Service Class
> package com.arevatd.mmi.business.services;
> import javax.jws.Oneway;
> import javax.jws.WebMethod;
> import javax.jws.WebParam;
> import javax.jws.WebService;
> import javax.jws.soap.SOAPBinding;
> import mmi.arevatd.com.xml.ExportRequestMessageType;
> /**
>  * Interface for the Import Service
>  *
>  * @author jvelez
>  *
>  */
> @WebService(name="MMIExportRequestPortType",
>             targetNamespace="http://com.arevatd.mmi/xml/wsdl")
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> public interface CmiModelDataExportWs {
>     /**
>      * The actual operation for this web service: perform an export of CMI Model Data
>      *
>      * @param request The Request to export a e-terrasource export project
>      */
>     @WebMethod(operationName = "performExportRequest", action = "performExportRequest")
>     @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
>     @Oneway()
>     public void exportCmiModelData(
>         @WebParam(targetNamespace = "http://com.arevatd.mmi/xml",
>                   partName="request",
>                   name = "ExportRequestMessage")
>         ExportRequestMessageType request);
> }
> Service Implementation Class
> package com.arevatd.mmi.business.services.support;
> import java.util.logging.Logger;
> import javax.jws.WebService;
> import javax.xml.namespace.QName;
> import javax.xml.soap.SOAPException;
> import javax.xml.soap.SOAPFactory;
> import javax.xml.soap.SOAPFault;
> import javax.xml.ws.BindingType;
> import javax.xml.ws.soap.SOAPFaultException;
> import com.arevatd.mmi.business.services.CmiModelDataExportWs;
> import mmi.arevatd.com.xml.ExportRequestMessageType;
> /**
>  * Implementation for the CmiModelDataExportWs Web Service
>  *
>  * @author jvelez
>  *
>  */
> @WebService(endpointInterface="com.arevatd.mmi.business.services.CmiModelDataExportWs",
>             targetNamespace="http://com.arevatd.mmi/xml/wsdl",
>             portName="MMIExportRequestPort",
>             serviceName="MMIExportRequestService",
>             name="MMIExportRequestPortType")
> @BindingType(value=javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING)
> public class CmiModelDataExportWsImpl implements CmiModelDataExportWs {
>     private final Logger logger = Logger.getLogger(this.getClass().getName());
>     public void exportCmiModelData(ExportRequestMessageType request) /*throws ExportRequestFault*/
{
>         logger.info("Application=" + request.getApplication());
>         logger.info("Environment=" + request.getEnvironment());
>         logger.info("Directory=" + request.getDirectoryName());
>         logger.info("File=" + request.getFilename());
>         logger.info("Export Request Id=" + request.getRequestId());
>        
>         try {
>             SOAPFactory soapFactory = SOAPFactory.newInstance();
>             SOAPFault fault = soapFactory.createFault("Hello",
>                 new QName("http://schemas.xmlsoap.org/soap/envelope/", "Client"));
>             fault.setFaultString("Juan");
>             throw new SOAPFaultException(fault);
>         } catch(SOAPException se) {
>         }
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message