cxf

Detecting Client Disconnects in Web Services

I'm using the Apache CXF Web Services stack. When a client times out or disconnects from the server before the operation is complete, the server keeps running the operation until it is complete. I would like to have the server detect when the client disconnects and handle that accordingly. Is there a way to detect when a client disconne...

Can a web service return a stream?

Hi all, I've been writing a little application that will let people upload & download files to me. I've added a web service to this applciation to provide the upload/download functionality that way but I'm not too sure on how well my implementation is going to cope with large files. At the moment the definitions of the upload & downlo...

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

JAXB XmlID and XmlIDREF annotations (Schema to Java)

I am exposing a web service using CXF. I am using the @XmlID and @XmlIDREF JAXB annotations to maintain referential integrity of my object graph during marshalling/unmarshalling. The WSDL rightly contains elements with the xs:id and xs:idref attributes to represent this. On the server side, everything works really nicely. Instances of ...

WSDL2Java for overloaded methods ?

I am trying to run WSDL2Java (Apache CXF) on a WSDL that contains overloaded methods (same method name, different parameters). It seems to me like I need to write either a JAX-WS mapping file or a JAXB mapping file to do this, but I feel like I'm being stonewalled by a ton of specifications I haven't read. Anyone have any examples of th...

How do you use TLS/SSL Http Authentication with a CXF client to a web service?

I'm trying to access a web service secured by a certificate. The security is setup on IIS and the web service is behind it. I don't think WS-SECURITY will do this type of authentication. Is there any way to pass the client certificate when you call the web service? I'm just getting an IIS Error Page that says "The page requires a clien...

What is the best way to expose a WCF service so that it can be easily consumed from Java/CXF?

We've written a WCF service to be used by a Java shop, who is using CXF to generate the adapters. We're not that familiar with Java, but have exposed the service using basicHttpBinding, SSL, and basic authentication. Integration tests show that a .NET client can consume the service just fine. However, the Java shop is having trouble c...

CXF generated web service client

When using a generated webservice-client (CXF and Maven-Plug-in) I got the following error: Interceptor has thrown exception, unwinding now null. Can someone help me? Thanks! ...

content not allowed in prolog exception

I am trying to send xml to a java-based web service given to me by a thrid party via a c#.NET application, and I get the "org.xml.sax.SAXParseException: Content is not allowed in prolog" error. I have verified the xml against the schema, and I passed the memorystream I am using to hold the xml to an .xml file, then opened the file with...

CXF dynamic client API - getUnwrapperOperation, getWrappedOperation

QName opName = new QName("http://mycompany.com/soap/service", "Login"); BindingOperationInfo boi = binding.getOperation(lastOperation); boi = boi.getUnwrappedOperation(); boi = boi.getWrappedOperation(); Can anyone explain to me the difference between getUnwrappedOperation() vs. getWrappedOperation()? What is being wrapped? ...

Locale instance in web service

How can I use instances of java.util.Locale as parameter or result in a webservice? My webservice uses Apache CXF. ...

CXF without Spring

Hi there, Is it possible to use CXF with Tomcat and without Spring? ...

How do I consume a web service protected with HTTP basic authentication using the CXF framework?

I tried to get it to work using the CXF User Guide, but I've had no luck. I'm trying to call the web service using java code. ...

How can I extend Java code generated by JAXB, CXF or Hibernate tools?

With generated Java source code, like code generated with Hibernate tools code generated with JAXB schema binding (xjc) code generated with WDSL2Java (cxf) all generated classes are "value object" types, without business logic. And if I add methods to the generated source code, I will loose these methods if I repeat the source code g...

Setting the default SocketFactory

I recently migrated my web services from Axis to CXF (2.1). It appears that while Axis needed the "axis.socketSecureFactory" set, CXF grabs the default. How do I set the default SocketFactory in Java to my own implementation (such as a property)? What I am not looking to do is to set the default SocketFactory properties like setting t...

CXF & SSL: Timeout Troubles

Hi all, I've got the following code that I am trying to use to access a webservice via HTTPS using Apache CXF. But whenever my message goes out, I get nothing back until my code times out. Can someone give my code a once over and let me know if I'm doing anything wrong. I've tried to access the service via SoapUI and that's fine, so ...

CXF IllegalAnnotationException related to no-arg StackTraceElement constructor

I have a web service built using Apache CXF 2.1.3. One of the web params is a java.lang.Throwable. When I call JaxWsServerFactoryBean.setServiceBean, I get an IllegalAnnotationException as java.lang.StackTraceElement doesn't have a no-arg constructor. The JIRA bug report here claims to have fixed the problem, but I am still getting the ...

Is there a way in CXF to disable the SoapCompressed header for debugging purposes?

I'm watching CXF service traffic using DonsProxy, and the CXF client sends an HTTP header "SoapCompressed": HttpHeadSubscriber starting... Sender is CLIENT at 127.0.0.1:2680 Packet ID:0-1 POST /yada/yada HTTP/1.1 Content-Type: text/xml; charset=UTF-8 SoapCompressed: true Accept-Encoding: gzip,gzip;q=1.0, identity; q=0.5, *;q=0 SOAPActio...

What can I use to create a REST client in Java?

If I want to use Java to create a REST client, what should I use? Can i use CXF? ...

How to write a CXF client with implicit security header.

Hi everyone, I have to access a service which is developed using different framework. The client program is using CXF. I dont have access to the provider environment so I cannot use any config files (Cxf.xml, cxfservlet.xml etc..). I need to access the webservice with implicit security header (UsernameTokenType, oasis-200401-wss-wssecur...