Questions tagged [cxf]

Apache CXF helps you build and develop services using frontend programming APIs, like JAX-WS and JAX-RS. These services can speak a variety of protocols such as SOAP, XML/HTTP, RESTful HTTP, or CORBA and work over a variety of transports such as HTTP, JMS or JBI.

Apache CXF is an open source services framework. CXF helps you build and develop services using frontend programming APIs, like JAX-WS and JAX-RS. These services can speak a variety of protocols such as SOAP, XML/HTTP, RESTful HTTP, or CORBA and work over a variety of transports such as HTTP, JMS or JBI. Here are some of the reasons you might want to use CXF:

  1. JAX-WS Support:

CXF implements the JAX-WS APIs which make building web services easy. JAX- WS encompasses many different areas:

  • Generating WSDL from Java classes and generating Java classes from WSDL
  • Provider API which allows you to create simple messaging receiving server endpoints
  • Dispatch API which allows you to send raw XML messages to server endpoints
  • Much more...

    1. Spring Integration:

Spring is a first class citizen with Apache CXF. CXF supports the Spring 2.0 XML syntax, making it trivial to declare endpoints which are backed by Spring and inject clients into your application.

  1. Aegis Databinding:

Aegis Databinding (2.0.x) is our own databinding library that makes development of code-first web services incredibly easy. Unlike JAXB, you don't need annotations at all. It also works correctly with a variety of datatypes such as Lists, Maps, Dates, etc. right out of the box. If you're building a prototype web services that's really invaluable as it means you have to do very little work to get up and running (and one of the primary reasons XFire was started a while back).

  1. RESTful services:

CXF enables the development of RESTful services via annotations using the HTTP Binding. Using URI templates and annotations you can bind a service operation to arbitrary URL/verb combinations. For instance, you can annotate a getCustom method with @Get @HttpResource("/customers/{id}"). CXF will then listen for GET requests on that URL and using the parameter at the {id} location as a parameter to the service.

  1. List item:

CXF supports a variety of web service specifications including WS-Addressing, WS-Policy, WS-ReliableMessaging and WS-Security.

For more information please refer:

Home Page: http://cxf.apache.org/

Apache CXF Software Architecture Guide: http://cxf.apache.org/docs/cxf-architecture.html

Downloads: http://cxf.apache.org/download.html

5478 questions
24
votes
2 answers

exception when trying to call webservice

I am getting the below exception when trying to call service from SOAPUI. When I open the endpoint in browser, it displays the wsdl fine. WARN org.apache.cxf.phase.PhaseInterceptorChain - Interceptor for…
Mahi G
  • 391
  • 1
  • 7
  • 16
23
votes
6 answers

@JsonFilter throws "JsonMappingException: Can not resolve BeanPropertyFilter"

Is it possible to selectively determine when the @JsonFilter annotation gets used at runtime? I'm getting JsonMappingException exception (see below) when I don't provide the filter. Background: I learned from a recent StackOverflow post that I can…
Justin
  • 6,031
  • 11
  • 48
  • 82
23
votes
2 answers

What's wrong with my Apache CXF client?

This is part of my pom.xml: org.apache.cxf cxf-rt-frontend-jaxws ${cxf.version} runtime
yegor256
  • 102,010
  • 123
  • 446
  • 597
23
votes
4 answers

Extended server_name (SNI Extension) not sent with jdk1.8.0 but send with jdk1.7.0

I have implemented a JAX-WS client by using ApacheCXF (v3.0.4) and everything works successfully but the problem comes when I want to use a secure connection (SSL/TLS) with java 8 (jdk1.8.0_25). I see the following exception in log…
hints4dev
  • 231
  • 1
  • 2
  • 3
23
votes
2 answers

Custom package names cxf-codegen-plugin

Imagine this scenario. I have a wsdl file with namespace a/b/c and it imports another wsdl whose namespace is m/n/o. Unfortunately, both of them have same ComplexTypes XYZ defined in them. Now, when I use cxf-codegen-plugin to generate Java code…
Gopal
  • 1,292
  • 3
  • 19
  • 41
22
votes
8 answers

CXF 2.4.2: No conduit initiator was found for the namespace http://schemas.xmlsoap.org/soap/http

I have a service client generated from wsdl. I am trying to call the remote service and I recieve the conduit initiator error seen below. I have tried numerous solutions without success. I found solutions (old posts) that recommend using the…
Dan Barber
  • 549
  • 2
  • 7
  • 11
22
votes
1 answer

Using Spring Security on a JAX-RS bundle in Karaf

I have an OSGi bundle that uses JAX-RS to handle some REST services. This bundle is running in Karaf with Apache CXF. I need to apply basic http authentication to certain path/method combinations. I've been tinkering with Spring Security and it…
Jon7
  • 7,165
  • 2
  • 33
  • 39
22
votes
2 answers

How to merge common parts of WSDL and XSD from different services?

I have to interact with a set of web-services that each come with their own WSDL and XSD. The XSD are sometimes merged in a single file sometimes spread along multiple files (20-30). However, from experience I know that most of the message…
Newtopian
  • 7,543
  • 4
  • 48
  • 71
22
votes
2 answers

Exclude Models or properties from swagger response

I used swagger in my apache cxf project , used @Api and @ApiOperations and @ApiParam annotations and generated a api doc for the rest services. But I want to exclude some of the fields like EntityTag, StatusType and MediaType etc from Models…
LazyGuy
  • 715
  • 4
  • 12
  • 27
21
votes
6 answers

How To Modify The Raw XML message of an Outbound CXF Request?

I would like to modify an outgoing SOAP Request. I would like to remove 2 xml nodes from the Envelope's body. I managed to set up an Interceptor and get the generated String value of the message set to the endpoint. However, the following code…
kiwifrog
  • 764
  • 3
  • 10
  • 23
21
votes
3 answers

How to reduce memory size of Apache CXF client stub objects?

My web service client application uses Apache CXF to generate client stubs for talking to several web services. The generated CXF web service stub objects have quite a large memory footprint (10 - 15 web service objects take more than 64 MB of…
Jeremy Raymond
  • 5,817
  • 3
  • 31
  • 33
20
votes
1 answer

Closing JAX-RS StreamingOutput's OutputStream

Should the StreamingOutput's OutputStream be closed by the implementing class? The java-doc does not give any recommendations. I guess it just delegates to the underlying ServletOutputStream which means it should not be closed, but my guess might…
Svetlin Zarev
  • 14,713
  • 4
  • 53
  • 82
20
votes
3 answers

How to inject ServletContext for JUnit tests with Spring?

I want to unit test a RESTful interface written with Apache CXF. I use a ServletContext to load some resources, so I have: @Context private ServletContext servletContext; If I deploy this on Glassfish, the ServletContext is injected and it works…
Juri Glass
  • 88,173
  • 8
  • 33
  • 46
19
votes
4 answers

Apache CXF client loads fine in Eclipse but standalone jar throws NullpointerException in WSDLServiceFactory

My goal is to create a Web Service client that runs in a standalone jar with all the dependencies using mvn assembly:single I generated the client using CXF codegen wsdl2java, creating a @WebServiceClient called NetBanxAutostatementService For the…
André Ricardo
  • 3,051
  • 7
  • 23
  • 32
19
votes
4 answers

WSP0075: Policy assertion "TransportBinding" was evaluated as "UNKNOWN". Why?

I am a client to a SOAP service I do not control (implemented in .NET). The service provides a WSDL. I use Apache CXF to generate the java client from the WSDL (specifically, I am using the cxf-codegen-plugin for Maven, which uses wsdl2java under…
Francis Avila
  • 31,233
  • 6
  • 58
  • 96