apache-cxf

Which framework is better CXF or Spring-WS?

I am in the process of researching/comparing CXF and Spring-WS for web services? I need to function both as a provider and a consumer of WS. In a nutshell, I have been told that Spring-WS is more configurable, but CXF is easier to get up and running. This question is subjective, but will help direct me in my research. What experience d...

glassfish can't find my wsdl when WAR is deployed

I have a CXF service service that I created WSDL first and when I deploy the WAR into glassfish app server 2.1.1, I get the following exception: java.io.FileNotFoundException: C:\Sun\AppServer\domains\domain1\config\TestService.wsdl If I put the WSDL in that location, everything works fine. How do I setup my WAR so that the TestServic...

How can I include apache-cxf as a dependency in my Maven pom?

Apache CXF "syncs" their releases to the Maven central repository. When I look at the CXF entries, there are no jar files, just the pom. If I include the following section in my pom, the build fails because it can't download the cxf dependency: <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf</artifactId> <ve...

How to create an Apache cxf simple web-service consumer ?

I'm able to generate a client from a wsdl file. Now I need to run it in Eclipse. When I create a Axis2 Client using Eclipse, I just create an DynamicWebProject and it automatically adds the neccessary libraries to the ClassPath. What about ApacheCXF? Does anyone have the list of all the neccessary libraries one needs to add to the BUIL...

CXF webservice client.

i created one cxf webservice application. and client application also i put in the same project. i want take it out client application from the server application. so i am facing some problem. that is in my client application i mentioned the service class. it is possible becoz it residing in same project. but when i take it out from th...

Why I get this error in CXF

I want to make dynamic web service invoker in JSF with CXF. But when I load this simple code I get error. The code: JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); Client client = dcf.createClient("http://ws.strikeiron.com/IPLookup2?wsdl"); The error: No Factories configured for this Application. This happens...

JSF and CXF not working together

I want to make dynamic web service invoker in JSF with CXF. But when I load this simple code I get error. The code: JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); Client client = dcf.createClient("http://ws.strikeiron.com/IPLookup2?wsdl"); The error: No Factories configured for this Application. This happens...

Apache CXF 2.0.12 to 2.2.7 upgrade issue

I have upgraded a CXF web service implementation from Apache CXF 2.0.12 to 2.2.7 and now I can't connect from a remote computer. http://localhost:9000/Data?wsdl works on the installed computer. http://computername:9000/Data?wsdl from a remote computer does not work anymore (worked before upgrade). The service is configured in cod...

Get rid of redundant cast to javax.xml.bind.JAXBElement<java.lang.Boolean> warning from CXF-generated code

I generate some code using CXF from a WSDL-file. When compiling the code with version "1.6.0_16" with the flag -Xlint I get the following warning: warning: [cast] redundant cast to javax.xml.bind.JAXBElement<java.lang.Boolean> [javac] this.r = ((JAXBElement<Boolean> ) value); What does the warning mean, should I be worried?...

How to inject ServletContext for JUnit tests with Spring?

Hi 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 like expected. But I don't know how to inject the ServletContext in my service class...

Custom Date Format with jax-rs in apache cxf?

Hi, I have been googling to figure out how I can customize the Date format when I use jax-rs on apache CXF. I looked at the codes, and it seems that it only support primitives, enum and a special hack that assume the type associated with @ForumParam has a constructor with a single string parameter. This force me to use String instead ...

Low overhead Java Web Services container?

I want to provide a Java-based Web Service, but I don't require the features of a full-blown J2EE Application Server. I would like it to start as quickly as possible, though that's not a hard requirement. The Web Service will handle multiple connections and require access to an Oracle database so it will at least require a thread pool ...

How to access a MTOM payload when using document oriented SOAP?

I need to integrate an external SOAP Service into my system. I have only the wsdl and no test server so far. I figured out how to generate stubs for the server using CXF in order to build a mocking server to implement against. On the client side the spring webservices WebServiceTemplate seems the perfect match for my use case. Two of t...

Getting HTTP headers from Apache CXF POJO Service

Hi, what is the right method to get http headers from CXF POJO Service? I have folowing code, but it doesn't work: ServerFactoryBean svrFactory = new ServerFactoryBean(); svrFactory.setServiceClass(TestService.class); svrFactory.setAddress("http://localhost:8080/test"); svrFactory.getServiceFactory().setDataBinding(new AegisDatabinding...

Apache CXF - Creating a Reliable Messaging Client to deploy in Tomcat / Weblogic

Hello everyone, I've been using Apache CXF 2.2.8 in an attempt to implement a web services client that supports WS-Reliable Messaging. To start, I built and ran the included ws-rm sample that ships with CXF (using the mvn -Pserver and mvn -Pclient commands), and it works as advertised. Now, I would like to run this sample in Tomcat (u...

easiest tutorial how to secure cxf+spring web service running on tomcat6?

I use java-first approach to make a web - service. I looked into other such questions & replies and didn't see any clear explanation, step-by-step tutorial. It would be great if you could point a way to make such a secure service so that any client could use the GENERATED by cxf WSDL file. easiest tutorial how to secure cxf+spring web...

Apache CXF Client for Dynamic Endpoints

I'm now using Apache CXF as a web services client for a .NET service to get around NTLM authentication. It works great, but I'm wondering why I can't seem to be able to set the web service target endpoint. CXF seems to want the WSDL at runtime for some strange reason - not sure. It takes the physical endpoint from the WSDL, which work...

Logging hostname resolved in CXF

I have a java web service client that uses CXF. The server has 10+ possible ips that are resolved via dynamic dns. I have the jvm configured properly to not cache dns. My question is, I have the requirement that I need to log on the client the payload with the ip it was delivered to. Logging just the hostname will not work as the hos...

A way to add comments to spring cxf webservice

I deploy my cxf-spring servlet, jax-ws web service implementation to tomcat. Now when I explore my webservice via web-interface, I see the screen as this: Available Soap Services: a b c How do I add comments to this screen, where are they added in Java code? ...

Apache CXF - How to add custom HTTP Header to JAX-RS response?

I'm trying to add custom HTTP header to response in Apache CXF. I need to count MD5 from content and add it as a HTTP header. I tried to use ResponseHandler or Interceptor. My last try was @Component public class ResponseBPAuthFilter extends AbstractOutDatabindingInterceptor { public ResponseBPAuthFilter() { super(Phase.MAR...