cxf

Is there anyway to bring web @Context into JUnit (CXF+Spring)

I am trying to create unit test environment to test RESTFul services (cfx+spring) in my dev environemnt. To test RESTFul Services, I require @Context within JUnit test cases. @Context should contain HttpRequest, HttpSession, ServletContext, ServletConfig and all other webserver related information. I have setup the JUnit for the above, ...

Client for restful web service

I'd like to create a http-centric client for a restful web service created using Apache CXF. To that end: Does any one know the (maven) dependencies for ONLY the CXF clients (Proxy & HTTP)? Is there any advantage to using CXF's built-in clients over say, Apache HttpClient? ...

How do you use FastInfoset with JAXWS?

I've got code that looks like it should be correct based on what I can find, but the spewed output doesn't indicate that it's using FastInfoset. My understanding is the Accept should indicate it can accept Fastinfoset and the response would actually use it, meaning it's not text/xml as the response type. Any idea what I'm doing wrong? I'...

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...

Maven - how to put the build dependance jar files ?

I run a simple CXF maven project http://cxf.apache.org/docs/using-cxf-with-maven.html, and get error below [INFO] [cxf-codegen:wsdl2java {execution: generate-sources}] [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] --------------------------------------------------------------...

Writing async service using cxf with java first approach

Hello I need to create a async webservice using cxf with java first approach. But i am unable to find any web resource/ website which tells me how to do this? Can you please tell how can I write a async webservice using CXF with java first approach? Thanks Shekhar ...

Apache CXF | Multiple responses to a webservice call

We want to implement a webservice with CXF in such a way that the call to it is asynchronous and the server sends back multiple responses. Is there a way in CXF or any other webservice API to do this or do we need to write our own custom implementation for this? ...

How to set WS-SecurityPolicy in an inbound CXF service in Mule?

When configuring the service for handling UsernameToken and signatures, it's setup like this: <service name="serviceName"> <inbound> <cxf:inbound-endpoint address="someUrl" protocolConnector="httpsConnector" > <cxf:inInterceptors> <spring:bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" /> <spr...

Jax-ws, spring and SpringBeanAutowiringSupport

although in my @Webservice class I extend SpringBeanAutowiringSupport, autowiring simply does not work for Spring 2.5, tomcat6. nothing is injected. I tested those beans autowiring in main method, using classpathcontext, everything is injected fine. But not for jax-ws endpoint. do you have ideas? ...

How do i change the property of jaxrs endpoint to support "mtom"

I created a RESTful web service, and i want to send binary files to this service without soap. There are some information on CXF website: XOP But i can't find a way to get the CXF jaxrs endpoints,and set an "mtom-enabled" property. My Spring config is: <jaxrs:server id="fis" address="http://172.20.41.40:8080/fis"&gt; <jaxrs:serviceBe...

cxf ws-security: securing web-services & interoperability with .NET and other languages

I wonder how to use the means that CXF provides us to secure web-services and BE SURE THAT THERE'LL BE NO PROBLEM for anyone who wants to generate a non-java client from a cxf wsdl file? What do you recommend? ...

cxf-bc ws-security callback classnotfoundexception

I'm trying to implement authentication with SSL as a ws-security policy on a service inside of SMX4. So far I've been able to implement SSL and the transport policy, but I've not been able to get the authentication part to work. I've tried to attack this at many different angles but I'm just missing something. I was wondering if you guys...

Problem with Date type on CXF endpoint

Hi, I've configured a simple CXF endpoit with spring wich expose a simple object with a java.util.Date property. once remotely invoked with a .NET client the date property is always null. endopit: <jaxws:endpoint id="simpleService" implementor="cxf.base.SimpleServiceImpl" address="/SimpleService" /> .NET call: SimpleServiceClie...

What annotation/property defines the wsdl:definitions section of a wsdl in Jaxb?

We're using apache cxf 2.2.2 with JaxB and I need to change the wsdl:definitions name of an exported wsdl to something else. Does anyone know how I could change it, possibly via a JAXB annotation? ...

CXF Client Webservice Question

I created a Webservice client and I am receiving the following error when the webservice is being created. I wasw ondering if I am missing something on this error: Error running SQL module: org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for null javax.xml.ws.WebServiceException: org.apache.cxf....

CXF Client Webservice Ping has thrown exception Could not send Message. Invalid address. Endpoint address cannot be null.

I am getting the following error [1] from the following code: ClassLoader cl = Thread.currentThread().getContextClassLoader(); URL WSDL_LOCATION=null; if ( null == cl ) cl = SQLService.class.getClassLoader(); WSDL_LOCATION = cl.getResource( "SQLServiceSoap.wsdl" ); QName SERVICE_NAME = new QName("http:/...

Hyperjaxb and Apache CXF

Hey guys, I'm trying to use Hyperjaxb3 with Apache CXF to generate persistence annotations from a WSDL-first web service. I've plugged the Hyperjaxb3-ejb-plugin into the cxf-codegen-plugin, like so. <plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> <version>${cxf.version}</version> <depende...

Exception on apache cxf when calling JaxWsProxyFactoryBean.create() (in maven project)

I wrote a Client that uses a Webservice. Works well in a seperate project. But when I try to use it in my maven project, it fails. The dependencies are correct: <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>2.2.8</version> </dependency> <dependency> <groupId>...

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...