You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by dale77 <Da...@trimble.co.nz> on 2009/02/11 06:01:29 UTC
Which CXF maven artifacts to include?
Hi,
I have a maven based project that includes a CXF wsdl2java generated web
service client library.
My question is, which cxf artifact or artifacts should i include in my
pom.xml? The list here is quite long:
http://mvnrepository.com/artifact/org.apache.cxf
Currently I am using:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle-minimal</artifactId>
<version>2.0.9</version>
</dependency>
But this pulls in a bunch of geronimo jars which do not play well with our
Tomcat 5.5/jdk1.6 hosted application. javax.mail no longer works, and the
geronimo 2.5 servlet spec jar fails to load in the container.
I have removed all these geronimo jars manually, which seems to solve these
problems, but I'd prefer to just have maven pull in the absolute minimum
dependencies i need. What are they?
Thanks
Dale
--
View this message in context: http://www.nabble.com/Which-CXF-maven-artifacts-to-include--tp21948466p21948466.html
Sent from the cxf-user mailing list archive at Nabble.com.
How to consolidate various generated exception classes into same exception class?
Posted by "Petr V." <gr...@yahoo.com>.
We published some service last year using C# and WCF.
Now we are porting code into java and we need to keep wsdl compatibility.
Some one gave me wsdl generated from C# code.
It looked real ugly. Each method was throwing its own version of same exception.
I used CXF wsdl2Java to general my code and I see 10s of exception representing same exceptiong.
For e.g Look at function definition generated via CXF wsdl2java
public ComputerInfo getComputers(
@WebParam(name = "groupId", targetNamespace = "XXX")Integer groupId,
@WebParam(name = "onlyActiveComputers", targetNamespace = "XXX") Boolean onlyActiveComputers,
@WebParam(name = "minComputerId", targetNamespace = "XXX")Integer minComputerId,
@WebParam(name = "maxResults", targetNamespace = "XXX")Integer maxResults
)
throws GetComputersObjectNotFoundFaultFaultFaultMessage,
GetComputersInvalidDataFaultFaultFaultMessage,
GetComputersGeneralFaultFaultFaultMessage,
GetComputersDataAccessFaultFaultFaultMessage;
I should have only four exception classes (ObjectNotFoundFault, InvalidDataFault, GeneralFault, DataAccessFault) but there are 100 opeartions in wsdl and each of them throw those same 4 exceptions but generated code has 100 * 4 = 400 exception classes :-(. Each exception has prefixed method name + exception name + FaultFaultMessage"
We should have never publised such ugly wsdl but now nothing can't be done. Is there any to consoliodate those 400 exceptions into 4 same exception classes when I am generating code via CXF wsdl2java.
Any help would be really appreciated.
Thanks,
Re: Which CXF maven artifacts to include?
Posted by dale77 <Da...@trimble.co.nz>.
The answer seems to be:
<dependencies>
<!-- Apache CXF JAX-WS Impl -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>2.0.10</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>2.0.10</version>
</dependency>
</dependencies>
I found I had to exclude some geronimo dependencies of the
cxf-rt-frontend-jaxws artifact for Tomcat5.5.
dale77 wrote:
>
> Hi,
>
> I have a maven based project that includes a CXF wsdl2java generated web
> service client library.
>
> My question is, which cxf artifact or artifacts should i include in my
> pom.xml? The list here is quite long:
>
> http://mvnrepository.com/artifact/org.apache.cxf
>
> Currently I am using:
>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-bundle-minimal</artifactId>
> <version>2.0.9</version>
> </dependency>
>
> But this pulls in a bunch of geronimo jars which do not play well with our
> Tomcat 5.5/jdk1.6 hosted application. javax.mail no longer works, and the
> geronimo 2.5 servlet spec jar fails to load in the container.
>
> I have removed all these geronimo jars manually, which seems to solve
> these problems, but I'd prefer to just have maven pull in the absolute
> minimum dependencies i need. What are they?
>
> Thanks
>
> Dale
>
>
--
View this message in context: http://www.nabble.com/Which-CXF-maven-artifacts-to-include--tp21948466p22109989.html
Sent from the cxf-user mailing list archive at Nabble.com.