cxf

Get reference to spring bean from @WebService

Hi, I'm using CXF to generate a web service from wsdl. The generated web service has the annotation @WebService How do i get a reference to spring bean from the web service? All my spring beans are annotated with @Service, and I can access them in my web application. How do I access them also from my web service? I've tried the follow...

How to keep Apache CXF from converting primatives to object types?

I'm evaluating Apache CXF for a project so I wrote a small demo application to try a few things out. Following the CXF user's guide, I was able to get my application up and running pretty quickly. One thing I wanted to test was how well CXF is able to handle a method that returns a large array of primitives. So I defined a method 'flo...

Is javax.xml.soap better then apache cxf?

This week I had to look into a Java WebService project which was using SOAP packages javax.xml.soap.*. I have not used this before but the Apache CXF library to create a SOAP webservice. I have a question on javax.xml.soap.* Is it better then CXF in terms of performance? In terms of coding I see CXF is amazing as no need to worry a...

How can I cache the marshalled SOAP XML generated by Apache CXF for a particular Java Object to improve performance?

In my application, we have a webservice method called getFoo() which returns a Foo object. The getFoo() method is called several hundred times a second. The Foo object is Marshalled from our Java object to the SOAP XML response using Apache CXF. From profiling our application, we determined that the marshalling of this object (java ...

CXF maven plugin generate classes in wrong directory

Hi, I'm using maven cxf-codegen-plugin to generate java web service files from wsdl. The plugin works fine if I'm trying to generate the files in the default output directory (target\generated-sources\cxf), but if I'm trying to generate them in other directory by using: <sourceRoot>src/main/myOtherDir</sourceRoot> in my pom.xml, the...

How to terminate CXF webservice call within Callable upon Future cancellation

Edit This question has gone through a few iterations by now, so feel free to look through the revisions to see some background information on the history and things tried. I'm using a CompletionService together with an ExecutorService and a Callable, to concurrently call the a number of functions on a few different webservices throug...

how to configure hibernate to work with apache cxf

To my application I need to use hibernate with apache cxf. Problem is after I configure hibernate to apache cxf, application didn't start. It gives an error saying it cannot find the LocalSessionFactoryBean class from the springframework (which I used to create the factorySession). I'm new to apache cxf, so it could be an error in my par...

Using xmlbeans bindings for cxf wsdl2java

I am getting started with using apache CXF 2.1.5 and xmlbeans to generate a web service client. The FAQ page shows how to use jaxb bindings to have java.util.Date binding for xsd:dateTime: <jaxws:bindings wsdlLocation="YOUR_WSDL_LOCATION" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:xs="http://www.w3.org/20...

How to visualize sent XML stream with a CXF generated client

Hi ! I would like to be able to see the XML Stream generated by my CXF generated from WSDL client. Is there a way to do this ? For example, I'm building my request with Java objects, and I would like to see the XML stream built by CXF before it sends it to the server. Thank you for your answer ! ...

Return XML Response in REST Service

Hi. I am writing a RESTful web service where in I want to return a XML containing some resultset. I have used XSTREAM and parsed the object into XML string. Since I need to return this string, I need to know how to pass it back to the calling client. One way is to return the RESPONSE to the calling client. And my sample code here show...

Difference between Apache CXF and Axis

What are the advantages of using Apache CXF over Apache Axis and vice versa? ...

CXF autogenerated wsdl

Hi I am developing webservices usin CXF-WS 2.2.1. I had developed and tested the services earlier but now the generated wsdl is different from the earlier one here is the old one <?xml version="1.0" ?> - <wsdl:definitions name="ICodeTableServiceService" targetNamespace="http://codetable.service.esps.cvs.com/" xmlns:ns1="http://cxf.apa...

CXF Web Service Error - javax.xml.ws.soap.SOAPFaultException: Unconnected sockets not implemented

I get the following error when attempting to connect to a web service via SSL. javax.xml.ws.soap.SOAPFaultException: Unconnected sockets not implemented ...

Calling a web service from Oracle (10g) stored procedure

Hi All. Can anybody point me out on working example of calling web service (e.g. CXF based) from Oracle 10g stored procedure. ...

CXF and when should I use JaxWsProxyFactoryBean or JAX-WS Proxy

Hi when I should use JaxWsProxyFactoryBean and when I should use Java stub generated from wsdl or JAX-WS Proxy? Are there any advantages or disadvantages? thanks ...

Deploying a CXF web service in Spring Framework

After running through the CXF samples I had a simple web service up and running fine. However I would like to integrate it with a Spring web application inside a servlet container. After updating the servlet.xml config file: <jaxws:endpoint id="HelloWorldService" implementor="path.to.webservice.HelloWorldImpl" endpointName="e:HelloEndp...

How do I change the address used by a CXF Web Service to one different than the one specified in the wsdl file?

I've got it working when I get the wsdl based on configuration, but I'd like to just tell it to use a specific address for the service call and use a local copy of the wsdl. MyWebService serviceDefinition = new MyWebService(new URL(wsdlLocation)); service = serviceDefinition.getMyWebServicePort(); Does anyone know the best practice fo...

Enum "does not have a no-arg default constructor" with Jaxb and cxf

A client is having an issue running java2ws on some of their code, which uses & extends classes that are consumed from my SOAP web services. Confused yet? :) I'm exposing a SOAP web service (JBoss5, Java 6). Someone is consuming that web service with Axis1 and creating a jar out of it with the data types and client stubs. They are then ...

Add Response Header to JAX-RS Webservice

I am trying add some response headers to some of my webservice calls. I wrote my webservice using CXF 2.1.2 and JAX-RS. I need to return an object and I also want to add some headers to the Response. Without returning a javax.ws.rs.core.Response object, how do I add a header to the response and still return my javabean? ...

Catching webservice exception with CXF: NoClassDefFoundError: SOAPFaultBuilder

Hey all, I've been using Apache CXF wsdl2java generated code to call methods from a webservice for some time now, which so far has been working fine.. The problem I'm having is that when the webservice (implemented just down the hall from me) legitimately throws a soap exception, CXF comes up with the following Error message: Could ...