cxf

CXF and Validation - Schema Restrictions Ignored

Hey guys, I've been working on a CXF web service and have had some trouble. With the help of SO, I've got my service validating against a fairly complex schema- a requirement of the project. I've noticed some weird issues with the validation, however. While datatypes are validated- eg, a random alphanumeric string instead of a date i...

Bean-To-XML annotations: how to process nested structure

For bean->xml convertion in webservices we use Aegis from CXF (it is jaxb-compatible, as I understand). This is my type: class C{ private int a; private int b; private T t; ... } class T{ private int t1; private int t2; } I need t.t1 field to be on the same level in XML as a and b in C (bean restored from xml should be like this: ...

Question about Request and Session with CXF, JAX-RS webservice

I have a webservice set up using CXF, JAX-RS and Spring. I have the following method: @GET @Path("/getPayload") @Produces("application/XML") public Response makePayload(){ Payload payload = new Payload(); payload.setUsersOnline(new Long(200)); return Response.ok().entity(payload).build(); } How can I get access to the Htt...

How to get principal name from HTTPRequest in CXF JAX-RS webservice method called from android app.

How can I get the principal name, session and ideally check if the principal is authenticated with the Spring Security context inside a CXF JAX-RS webservice method receiving a call from an Android client? This is the code I am currently working with. I have commented where and what I am trying to get. Android code to call webservice: ...

How to make a request from an android app that can enter a Spring Security secured webservice method?

I have a Spring Security (form based authentication) web app running CXF JAX-RS webservices and I am trying to connect to this webservice from an Android app that can be authenticated on a per user basis. Currently, when I add an @Secured annotation to my webservice method all requests to this method are denied. I have tried to pass in ...

JaxWsProxyFactoryBean for Mule CXF transport?

Hi Everybody I am new to mule. Are there any way to call CXF based web services using JaxWsProxyFactoryBean? It will be nice to reuse Java interface instead of wsdl files. With CXF we can simply reuse our java interface as spring bean for web services client without wsdl2java code generation. <bean id="{Bean Id}" class="org.apache.cxf...

Aegis binbing: how to set minOccurs/nillable parameters for type

Hi, I have a lot of classes in java with Date/Calendar fields. To generate correct wsdl (for .NET client app) I need to add @XmlElement(nillable=true, required=true) annotation for all getters of Calendar/Date variables in all classes. Is it possible to configure Aegis (we use Spring for CXF configuration) to automatically set this prop...

CXF: Set minOccurs=0 for elements of the arrays

Hi! We use CXF framework with aegis mapper for java server and .NET client. By default we have minOccurs=0 for all variables in classes in WSDL. We use such setting in CXF config to prevent it: <bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype"> <property name="configuration"> ...

Securing Web Service communication with SSL using CXF

Hi all, I am trying to secure communications via SSL/TLS for one of our Web Service using CXF 2.2.5. I am wondering how to update client and server Spring configuration file to activate this feature. I found some information on CXF's website (CXF Wiki) for the client configuration, here is the given example: <http:conduit name="{http:...

Why doesn't JAXB handle namespaced child elements properly?

Hi! I'm using JAXB with a CXF Web Service. When I pass: <?xml version="1.0" ?><ns2:Optionen xmlns:ns2="http://test.at/ezustellung/global/20090501#"&gt; <ns2:PdfAKonvertierung>true</ns2:PdfAKonvertierung><ns2:SignaturTyp>Adobe</ns2:SignaturTyp> </ns2:Optionen> to the Unmarshaller, the properties pdfAKonvertierung und signaturTyp are b...

Multiple @WebService annotations in JAX-WS / CXF

I am trying to implement minor versions in JAX-WS as follows: @WebService(targetNamespace="http://mycompany.com/api/Service/v1_0") public interface ServiceRev0 { public void initialMethod(); } @WebService(targetNamespace="http://mycompany.com/api/Service/v1_1") public interface ServiceRev1 { public void newMethod(); } public c...

java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl while starting the weblogic.

As part of our application we are using apache's xerces jaxp parser. When we deploy the application on weblogic 9.2, we are getting the following error. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined in class path resource [META-INF/cxf/cxf.xml]: Instanti...

Use @XMLTransient in CXF web service with jaxb binding

Hi all, I have an application that relies heavily on configuration object (template). So import/export features is a must. One developer has completed the import/export feature and lot of DTOs has been annotated with Jaxb @XMLTransient. The reason for that is we don't want to marshall the id of the object in one DB and import it to ano...

Importing a WebService:

Hi all, I'm trying to import the following web service: http://www.biomart.org/biomart/martwsdl Using curl for the service getResistry() : everything is OK: curl --header 'Content-Type: text/xml' --data '<?xml version="1.0"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mar="http://www.biomart.org:80...

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

which web services stacks are supported on JBoss AS 5?

Hi, I've been trying to find this info in JBoss docs/forums/WIKIs - but could not get a concise answer to this question: Which web services stacks are supported (or you can make work on) in JBoss 5? I have a huge legacy app using Axis 1 web services which is running fine on WLS9.2. Now I have to migrate it to JBoss 5 and I have to deci...

How to validate different XML Signatures with Apache CXF?

In our SOA we will have to sign a request (parts of the SOAP header) twice: 1. the client signs the SOAP body 2. the ESB signs a part of the SOAP header, so that the service can verify, that the request was routed over the ESB I'm currently trying to implement/configure this using Apache CXF 2.2. Its working on the client side as well a...

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

Java Classpath Issues with Webservices(CXF) and Jboss

I am using CXF(which autogenerates my webservices in my pom.xml from my wsdl) with JBoss(eclipse ide), and I am having some trouble accessing the webservice from my web application. I found this resource: http://blog.progs.be/?p=92 but I am having a really hard time using WSDL_LOCATION = cl.getResource( "my/progam/pack/wsdl/myService.ws...

Java Webservice java.lang.ClassCastException: org.apache.cxf.jaxws.ServiceImpl

I am using Maven, CXF 2.2.7, JBoss 4.2.3 and JRE 1.5 Updated I have a Webservice that I can see on the server by using the URL myURL/myService?wsdl I am trying to develop a web app to ping that webservice by calling this in my bean: MyWebService webservice = new MyWebService(); However, it dies and throws the following error, which i...