cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: CXF Java first service, using XMLBean generated objects as the input and output parameters
Date Thu, 21 Jul 2011 20:36:04 GMT


Well, you aren't using CXF:


at 
com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:265) 
        at 
com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:363) 

those are from the Sun reference implementation, not CXF.

Dan




On Friday, July 15, 2011 10:25:10 AM cwhistler wrote:
> So I have XML schemas from a client, and I have compiled them with XMLBeans
> 2.2.0 into java objects.  now I want to use those objects as input and
> response parameters for some CXF generated web services.  I have tried CXF
> versions 2.2.7 and 2.4.0.
> 
> I am deploying this in Weblogic 10.3.3 using Spring configuration.
> 
> So in my Java class I have tried using the generated document interface, the
> implemenation class and the type class but none of these make any
> difference.  My interface is setup as:
> 
> @WebService(name = "NasuProcessor", targetNamespace = "http://www.test.com")
> @SOAPBinding(style=Style.DOCUMENT, use=Use.LITERAL,
> parameterStyle=ParameterStyle.WRAPPED)
> public interface NasuProcessor {
> 	@WebMethod
> 	public MmmfResponseImpl wsProcess(@WebParam(name = "nasu") 
MmmfAccountImpl
> nasuInput);
> 
> }
> 
> 
> Most of the details that I can find simply state that I have to add the
> XmlBeansDataBinding to my service configuration:
>     <jaxws:endpoint id="NasuProcessorBasicAuth"
>         implementor="#nasuProcessor"
>         address="/NasuProcessorBasicAuth">
>         <jaxws:dataBinding>
>             <bean class="org.apache.cxf.xmlbeans.XmlBeansDataBinding" />
>         </jaxws:dataBinding>
>         <jaxws:inInterceptors>
>             <ref bean="securityInterceptor"/>
>         </jaxws:inInterceptors>
>     </jaxws:endpoint>
> 
> so I've tried this but I continue to receive the following exceptions.  it
> just seems that the dataBinding is not being used.
> 
> 
> Jul 15, 2011 12:03:20 PM
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromClass
> INFO: Creating Service {http://www.test.com}NasuProcessorImplService from
> class com.test.processors.nasu.NasuProcessor
> Jul 15, 2011 12:03:20 PM org.apache.cxf.endpoint.ServerImpl initDestination
> INFO: Setting the server's publish address to be /NasuProcessorBasicAuth
> 
> Caused By: java.security.PrivilegedActionException:
> com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 7 counts of
> IllegalAnnotationExceptions
> noNamespace.impl.MmmfAccountDocumentImpl$MmmfAccountImpl does not have a
> no-arg default constructor.
> 	this problem is related to the following location:
> 		at noNamespace.impl.MmmfAccountDocumentImpl$MmmfAccountImpl
> 		at public noNamespace.impl.MmmfAccountDocumentImpl$MmmfAccountImpl
> com.test.processors.maint.jaxws.WsProcess.maint
> 		at com.test.processors.maint.jaxws.WsProcess
> noNamespace.MmmfAccountDocument$MmmfAccount$AddressInfo is an interface, and
> JAXB can't handle interfaces.
> 	this problem is related to the following location:
> 		at noNamespace.MmmfAccountDocument$MmmfAccount$AddressInfo
> 		at public noNamespace.MmmfAccountDocument$MmmfAccount$AddressInfo[]
> noNamespace.impl.MmmfAccountDocumentImpl$MmmfAccountImpl.getAddressInfoArray
> () at noNamespace.impl.MmmfAccountDocumentImpl$MmmfAccountImpl
> 		at public noNamespace.impl.MmmfAccountDocumentImpl$MmmfAccountImpl
> com.test.processors.maint.jaxws.WsProcess.maint
> 		at com.test.processors.maint.jaxws.WsProcess
> noNamespace.MmmfAccountDocument$MmmfAccount$AddressInfo does not have a
> no-arg default constructor.
> 	this problem is related to the following location:
> 		at noNamespace.MmmfAccountDocument$MmmfAccount$AddressInfo
> 		at public noNamespace.MmmfAccountDocument$MmmfAccount$AddressInfo[]
> noNamespace.impl.MmmfAccountDocumentImpl$MmmfAccountImpl.getAddressInfoArray
> () at noNamespace.impl.MmmfAccountDocumentImpl$MmmfAccountImpl
> 		at public noNamespace.impl.MmmfAccountDocumentImpl$MmmfAccountImpl
> com.test.processors.maint.jaxws.WsProcess.maint
> 		at com.test.processors.maint.jaxws.WsProcess
> org.apache.xmlbeans.impl.values.XmlComplexContentImpl does not have a no-arg
> default constructor.
> 	this problem is related to the following location:
> 		at org.apache.xmlbeans.impl.values.XmlComplexContentImpl
> 		at noNamespace.impl.MmmfAccountDocumentImpl$MmmfAccountImpl
> 		at public noNamespace.impl.MmmfAccountDocumentImpl$MmmfAccountImpl
> com.test.processors.maint.jaxws.WsProcess.maint
> 		at com.test.processors.maint.jaxws.WsProcess
> org.apache.xmlbeans.StringEnumAbstractBase does not have a no-arg default
> constructor.
> 	this problem is related to the following location:
> 		at org.apache.xmlbeans.StringEnumAbstractBase
> 		at public org.apache.xmlbeans.StringEnumAbstractBase
> org.apache.xmlbeans.impl.values.XmlObjectBase.getEnumValue()
> 		at org.apache.xmlbeans.impl.values.XmlObjectBase
> 		at org.apache.xmlbeans.impl.values.XmlComplexContentImpl
> 		at noNamespace.impl.MmmfAccountDocumentImpl$MmmfAccountImpl
> 		at public noNamespace.impl.MmmfAccountDocumentImpl$MmmfAccountImpl
> com.test.processors.maint.jaxws.WsProcess.maint
> 		at com.test.processors.maint.jaxws.WsProcess
> org.apache.xmlbeans.GDate does not have a no-arg default constructor.
> 	this problem is related to the following location:
> 		at org.apache.xmlbeans.GDate
> 		at public org.apache.xmlbeans.GDate
> org.apache.xmlbeans.impl.values.XmlObjectBase.getGDateValue()
> 		at org.apache.xmlbeans.impl.values.XmlObjectBase
> 		at org.apache.xmlbeans.impl.values.XmlComplexContentImpl
> 		at noNamespace.impl.MmmfAccountDocumentImpl$MmmfAccountImpl
> 		at public noNamespace.impl.MmmfAccountDocumentImpl$MmmfAccountImpl
> com.test.processors.maint.jaxws.WsProcess.maint
> 		at comtest.processors.maint.jaxws.WsProcess
> noNamespace.impl.MmmfResponseDocumentImpl$MmmfResponseImpl does not have a
> no-arg default constructor.
> 	this problem is related to the following location:
> 		at noNamespace.impl.MmmfResponseDocumentImpl$MmmfResponseImpl
> 		at public noNamespace.impl.MmmfResponseDocumentImpl$MmmfResponseImpl
> com.test.processors.maint.jaxws.WsProcessResponse._return
> 		at com.test.processors.maint.jaxws.WsProcessResponse
> 
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at
> com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModel
> Impl.java:151) at
> com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.j
> ava:94) at
> com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:26
> 5) at
> com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:36
> 3) Truncated. see log file for complete stacktrace
> 
> Can someone help?
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/CXF-Java-first-service-using-XMLBean-genera
> ted-objects-as-the-input-and-output-parameters-tp4591548p4591548.html Sent
> from the cxf-dev mailing list archive at Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com

Mime
View raw message