cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stetska, Iryna" <istet...@ebay.com>
Subject Problems with CXF web services on Linux
Date Fri, 30 Jan 2009 16:35:54 GMT
Hi guys,

My team has recently encountered some severe problems when running CXF
server on different OS platforms. And we'd be grateful for any
support/help from you guys.  

WSDL files get generated differently on Windows and Linux platforms (Win
XP SP2/Debian)

SXF cannot properly generate WSDL markup when dealing with complex
objects. Consider the following web method ComplexObject1
method(ComplexObject1 param1) declaration, where
ComplexObject1/ComplexObject2 classes have three-level aggregation
structure.  This means that ComplexObject1/ComplexObject2 actually
reference some ComplexObject11/ComplexObject22 respectively and the same
rule applies for latter complex types. Having analyzed the differences
between two WSDL documents - one generated on Linux platform and another
on Windows we noticed several major errors on Linux:

*         When describing ComplexObject1 class that has reference to
ComplexObject22 class WSDL markup states that its xsd:element has type
of its base-most interface, let's name it as BaseInterface. The same
rule applies when the reference is Java array of ComplexObject22.
Besides generating definition of ArrayOfComplexObject22 CXF generates
definition for ArrayOfBaseInterface where the type of each sequence
element is defined as of BaseInterface

*         When describing ComplexObject2 class that has reference to
object of the third level of aggregation, which is ComplexObject222 if
to follow the pattern, the situation becomes even worse.
ComplexObject222 gets no definition at all. WSDL document will simply
tell you that corresponding xml:element has type of anyType, and
ArrayOfAnyType if we use Java array of ComplexObject222 as type of
reference

*         Needless to say that those types of third level of aggregation
level (ComplexObject111/ComplexObject222) don't get any WSDL description
at all.

In order to somehow resolve the errors mentioned above we've tried out
different approaches:

1.      To define serialization rules through CXF annotations.
Annotations were added to each of types on each level of aggregation.
This didn't help.

2.      To run the solution on different versions of CXF platform -
2.0.9 and 2.1.3. This didn't help either.

3.      To deploy the solution on Tomcat and Jetty web servers. No
effect.

 

We included proper WSDL files and made reference on the. In this case
web server return correct wsdl files, but CXF still cannot read complex
types. Exception:

org.apache.cxf.interceptor.Fault: Could not determine how to read type:
{http://model.messaging.csba.marktplaats.nl}instanceId

        at
org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataR
eader.java:49)

        at
org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataR
eader.java:34)

        at
org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInI
nterceptor.java:235)

        at
org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLite
ralInInterceptor.java:120)

        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:220)

        at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiati
onObserver.java:78)

        at
org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestin
ation.java:92)

        at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(Ser
vletController.java:285)

        at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletControl
ler.java:168)

        at
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFSe
rvlet.java:175)

        at
org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFSe
rvlet.java:153)

        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(Applica
tionFilterChain.java:290)

        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)

        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:233)

        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.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:2
86)

        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:84
4)

        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(Unknown Source)

Caused by: org.apache.cxf.aegis.DatabindingException: Could not
determine how to read type:
{http://model.messaging.csba.marktplaats.nl}instanceId

        at
org.apache.cxf.aegis.type.basic.ObjectType.readObject(ObjectType.java:12
2)

        at
org.apache.cxf.aegis.type.basic.BeanType.readObject(BeanType.java:146)

        at
org.apache.cxf.aegis.type.basic.BeanType.readObject(BeanType.java:146)

        at
org.apache.cxf.aegis.AegisXMLStreamDataReader.read(AegisXMLStreamDataRea
der.java:82)

        at
org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataR
eader.java:47)

        ... 24 more

 

Regards, 

Iryna Stetska

CSBizApp - Dev Team Lead

Marktplaats NL | CSBizApp | istetska@ebay.com <mailto:istetska@ebay.com>
| Skype: istetska

 

 

 

 

 

 


Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message