cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jayakumar <jay.vaz...@gmail.com>
Subject Re: java.lang.UnsupportedOperationException - aegis + jaxws
Date Wed, 19 Dec 2007 02:08:25 GMT

Yes, the issue is fixed in 2.0.4, but the issue gone to the next level throws
the following exception

TypeClassInfo.getGenericType() - ClassCastException


<Dec 18, 2007 9:01:17 PM EST> <Warning> <HTTP> <BEA-101162> <User
defined
listener org.springframework.web.context.ContextLoaderListener failed:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'example1': Invocation of init method failed; nested exception is
java.lang.ClassCastException:
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'example1': Invocation of init method failed; nested exception is
java.lang.ClassCastException:
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1174)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
	Truncated. see log file for complete stacktrace
java.lang.ClassCastException:
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
	at
org.apache.cxf.aegis.type.AbstractTypeCreator.createHolderType(AbstractTypeCreator.java:146)
	at
org.apache.cxf.aegis.type.AbstractTypeCreator.createTypeForClass(AbstractTypeCreator.java:112)
	at
org.apache.cxf.aegis.databinding.AegisDatabinding.getParameterType(AegisDatabinding.java:448)
	at
org.apache.cxf.aegis.databinding.AegisDatabinding.initializeMessage(AegisDatabinding.java:255)
	at
org.apache.cxf.aegis.databinding.AegisDatabinding.initializeOperation(AegisDatabinding.java:216)
	Truncated. see log file for complete stacktrace
> 
<Dec 18, 2007 9:01:17 PM EST> <Error> <Deployer> <BEA-149231> <Unable
to set
the activation state to true for the application '_appsdir_CXF203_dir'.
weblogic.application.ModuleException: 
	at
weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:950)
	at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:353)
	at
weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
	at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
	at
weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
	Truncated. see log file for complete stacktrace
java.lang.ClassCastException:
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
	at
org.apache.cxf.aegis.type.AbstractTypeCreator.createHolderType(AbstractTypeCreator.java:146)
	at
org.apache.cxf.aegis.type.AbstractTypeCreator.createTypeForClass(AbstractTypeCreator.java:112)
	at
org.apache.cxf.aegis.databinding.AegisDatabinding.getParameterType(AegisDatabinding.java:448)
	at
org.apache.cxf.aegis.databinding.AegisDatabinding.initializeMessage(AegisDatabinding.java:255)
	at
org.apache.cxf.aegis.databinding.AegisDatabinding.initializeOperation(AegisDatabinding.java:216)
	Truncated. see log file for complete stacktrace
> 
 

dkulp wrote:
> 
> 
> I'm pretty sure I fixed this on trunk (and 2.0.4 snapshot branch) last 
> week.   Can you try the latest snapshots and see if it really is fixed?
> 
> Thanks!
> Dan
> 
> 
> On Sunday 16 December 2007, Jayakumar wrote:
>> I have the Endpoint Interface and generated wsdl as below. When i try
>> to send the soap request  i throws the UnsupportedOperationException.
>> Check the soap message below.
>>
>> Is there any solution, It throws this exception because of the Header
>> element in the soap, if i remove the header elementm then it throws
>> the "argument type mismatch exception" for Holder Object.
>>
>>
>> Dec 16, 2007 11:46:58 AM org.apache.cxf.phase.PhaseInterceptorChain
>> doIntercept
>> INFO: Interceptor has thrown exception, unwinding now
>> java.lang.UnsupportedOperationException
>> 	at
>> org.apache.cxf.aegis.databinding.AegisDatabinding.createReader(AegisDa
>>tabinding.java:109) at
>> org.apache.cxf.interceptor.AbstractInDatabindingInterceptor.getDataRea
>>der(AbstractInDatabindingInterceptor.java:69) at
>> org.apache.cxf.interceptor.AbstractInDatabindingInterceptor.getNodeDat
>>aReader(AbstractInDatabindingInterceptor.java:87) at
>> org.apache.cxf.binding.soap.interceptor.SoapHeaderInterceptor.handleMe
>>ssage(SoapHeaderInterceptor.java:94) at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>>rChain.java:207) at
>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitia
>>tionObserver.java:73) at
>> org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletD
>>estination.java:79) at
>> org.apache.cxf.transport.servlet.ServletController.invokeDestination(S
>>ervletController.java:256) at
>> org.apache.cxf.transport.servlet.ServletController.invoke(ServletContr
>>oller.java:160) at
>> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXF
>>Servlet.java:170) at
>> org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXF
>>Servlet.java:148) at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at
>> weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(
>>StubSecurityHelper.java:226) at
>> weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurit
>>yHelper.java:124) at
>> weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java
>>:283) at
>> weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java
>>:175) at
>> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction
>>.run(WebAppServletContext.java:3370) at
>> weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticated
>>Subject.java:321) at
>> weblogic.security.service.SecurityManager.runAs(Unknown Source) at
>> weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppSe
>>rvletContext.java:2117) at
>> weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletCo
>>ntext.java:2023) at
>> weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.ja
>>va:1359) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
>> at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
>>
>>
>> @javax.jws.WebService (targetNamespace="http://example.com/")
>> @javax.xml.ws.BindingType(value =
>> "http://www.w3.org/2003/05/soap/bindings/HTTP/")
>> @SOAPBinding(style=SOAPBinding.Style.DOCUMENT,
>> use=SOAPBinding.Use.LITERAL,
>> parameterStyle=SOAPBinding.ParameterStyle.BARE)
>> public interface IExample {
>>
>> 	@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
>> 	public IResponseParameter getExample(@WebParam(name = "parameters")
>> 	IRequestParameter a, @WebParam(name = "C", header=true,
>> mode=Mode.INOUT) String c);
>>
>> }
>>
>> WSDL :
>>
>>
>>  <?xml version="1.0" encoding="utf-8" ?>
>> - <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>> xmlns:tns="http://example.com/"
>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ExampleService"
>> targetNamespace="http://example.com/">
>> - <wsdl:types>
>> - <xsd:schema xmlns:tns="http://example.com"
>> attributeFormDefault="qualified" elementFormDefault="qualified"
>> targetNamespace="http://example.com">
>> - <xsd:complexType name="IResponseParameter">
>> - <xsd:sequence>
>>   <xsd:element minOccurs="0" name="age" nillable="true"
>> type="xsd:string" /> <xsd:element minOccurs="0" name="name"
>> nillable="true" type="xsd:string" />
>>   </xsd:sequence>
>>   </xsd:complexType>
>> - <xsd:complexType name="IRequestParameter">
>> - <xsd:sequence>
>>   <xsd:element minOccurs="0" name="age" nillable="true"
>> type="xsd:string" /> <xsd:element minOccurs="0" name="name"
>> nillable="true" type="xsd:string" />
>>   </xsd:sequence>
>>   </xsd:complexType>
>>   </xsd:schema>
>> - <xsd:schema xmlns:ns0="http://example.com"
>> attributeFormDefault="unqualified" elementFormDefault="qualified"
>> targetNamespace="http://example.com/">
>>   <xsd:import namespace="http://example.com" />
>>   <xsd:element name="parameters" nillable="true"
>> type="ns0:IRequestParameter" />
>>   <xsd:element name="C" nillable="true" type="xsd:string" />
>>   <xsd:element name="getExampleResponse" nillable="true"
>> type="ns0:IResponseParameter" />
>>   </xsd:schema>
>>   </wsdl:types>
>> - <wsdl:message name="getExampleResponse">
>>   <wsdl:part element="tns:getExampleResponse"
>> name="getExampleResponse" /> <wsdl:part element="tns:C" name="C" />
>>   </wsdl:message>
>> - <wsdl:message name="getExample">
>>   <wsdl:part element="tns:parameters" name="parameters" />
>>   <wsdl:part element="tns:C" name="C" />
>>   </wsdl:message>
>> - <wsdl:portType name="IExample">
>> - <wsdl:operation name="getExample">
>>   <wsdl:input message="tns:getExample" name="getExample" />
>>   <wsdl:output message="tns:getExampleResponse"
>> name="getExampleResponse" /> </wsdl:operation>
>>   </wsdl:portType>
>> - <wsdl:binding name="ExampleServiceSoapBinding" type="tns:IExample">
>>   <soap:binding style="document"
>> transport="http://schemas.xmlsoap.org/soap/http" />
>> - <wsdl:operation name="getExample">
>>   <soap:operation soapAction="" style="document" />
>> - <wsdl:input name="getExample">
>>   <soap:header message="tns:getExample" part="C" use="literal" />
>>   <soap:body parts="parameters" use="literal" />
>>   </wsdl:input>
>> - <wsdl:output name="getExampleResponse">
>>   <soap:header message="tns:getExampleResponse" part="C" use="literal"
>> /> <soap:body parts="getExampleResponse" use="literal" />
>>   </wsdl:output>
>>   </wsdl:operation>
>>   </wsdl:binding>
>> - <wsdl:service name="ExampleService">
>> - <wsdl:port binding="tns:ExampleServiceSoapBinding"
>> name="ExamplePort"> <soap:address
>> location="http://localhost:7001/CXF203/cxf203/example1" />
>> </wsdl:port>
>>   </wsdl:service>
>>   </wsdl:definitions>
>>
>>
>> Soap Message
>>
>> <SOAP-ENV:Envelope
>> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:H
>>eader><C
>> xmlns="http://example.com/">123</C></SOAP-ENV:Header><SOAP-ENV:Body><g
>>etExample> <IRequestParameter>
>> 		<age>Welcome</age>
>> 		<name>To This World</name>
>> 	</IRequestParameter>
>> </getExample></SOAP-ENV:Body></SOAP-ENV:Envelope>
> 
> 
> 
> -- 
> J. Daniel Kulp
> Principal Engineer, IONA
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://www.nabble.com/java.lang.UnsupportedOperationException---aegis-%2B-jaxws-tp14363719p14409728.html
Sent from the cxf-user mailing list archive at Nabble.com.


Mime
View raw message