cxf

How to remove the “new” prefix from several attributes of the element in the request to the SOAP service?

我只是一个虾纸丫 提交于 2019-12-12 05:27:11
问题 I have a wsdl. Using wsdl2java i have created java classes and add realization. After that i created project in SOAP UI i receive the next xml for request: The problem is that i have hardcoded client which will use one of operation of this web sevice and the client will not work if new prefix will exist. How to remove new prefix from login and password attributes of AuthData element? UPDATE When i call web-service like that: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap

Cannot create a secure XMLInputFactory when calling Apache CXF Client from Plain Java

自闭症网瘾萝莉.ら 提交于 2019-12-12 05:24:02
问题 I am trying to call a Apache CXF Service from a Plain Java code as follows public static void main(String args[]) { Call Apache CXF Service .... } I dont get any compile time error, but getting Runtime exception as follows Exception in thread "main" java.lang.RuntimeException: Cannot create a secure XMLInputFactory at org.apache.cxf.staxutils.StaxUtils.createXMLInputFactory(StaxUtils.java:314) at org.apache.cxf.staxutils.StaxUtils.getXMLInputFactory(StaxUtils.java:264) at org.apache.cxf

ssl with client authentication between cxf and IIS resulting in SocketException and SocketTimeoutException

不打扰是莪最后的温柔 提交于 2019-12-12 05:14:33
问题 So, I've been wrestling with a two way ssl setup between Tomcat6/Camel/Cxf to IIS6 the last few days. A quick overview: I have a cxf consumer running in Camel in Tomcat, which calls a webservice hosted with a third party on IIS. The third party is using a 'valid' certificate, whereas we are using a self-signed certificate. IIS is configured to require client authentication. I've gotten to the point where cxf is configured correctly, and mutual authentication is being performed. Some gotcha's

Querying Exchange Web Service gives Bad Request (400) with WildFly and Apache CXF

两盒软妹~` 提交于 2019-12-12 04:59:30
问题 I have a problem while querying the Microsoft Exchange Server WebServices to get Items in certain folders. In this order, I can make a request to the method expandDL and to the method findFolders . These work fine. But when I then make a request to findItems with all the found folders, I get 400 Bad Request with no error message. I think this question is related to Querying Exchange Web Services fails with 400 Bad Request I am using a WildFly 10 and Java 1.8. Apache CXF is used as framework

CXF SOAP JAX-WS WSS4JInInterceptor change namespace and cause Unmarshalling error

↘锁芯ラ 提交于 2019-12-12 04:50:34
问题 I'm using WSS4JInInterceptor in my endpoint to validate the authorization. I have that in my endpoint Here it's my SOAP message <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header> <wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:UsernameToken wsu:Id=

ResponseExceptionMapper in cxf client

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 04:33:28
问题 I am trying to handle exceptions using the ResponseExceptionMapper class for my cxf client. ExceptionHandlingCode: public class MyServiceRestExceptionMapper implements ResponseExceptionMapper<Exception> { private static final Logger LOGGER = LoggerFactory.getLogger(MyServiceRestExceptionMapper .class); public MyServiceRestExceptionMapper () { } @Override public Exception fromResponse(Response response) { LOGGER.info("Executing MyServiceRestExceptionMapper class"); Response.Status status =

How to marshal JAXBElement into Response?

懵懂的女人 提交于 2019-12-12 04:21:54
问题 My CXF provided REST services usually return javax.ws.rs.core.Response for the usual reason, to encapsulate the result entity data marshaled as XML and a return code: @GET @Path("/getPojo") @Produces("application/xml") public Response getPojo() { SomePojo resultObj = ...; Response result = Response.status(200).entity(resultObj).build(); return result; } which requires that SomePojo contains proper annotations: @XmlRootElement(name = "somePojo") @XmlAccessorType(XmlAccessType.FIELD) public

create client side java classes from a RESTful service in CXF

蹲街弑〆低调 提交于 2019-12-12 04:08:19
问题 I want to create client-side java from a restful web service, so that I can call the service. Do somebody know if CXF provide such this tools? Best, 回答1: With CXF 2.4.1, CXF does provide a "wadl2java" tool that can be used to create a Java client from a WADL document. If your restful service provides a WADL, that can be used as a starting point. 来源: https://stackoverflow.com/questions/6351892/create-client-side-java-classes-from-a-restful-service-in-cxf

Correct use of SOAP WS services

寵の児 提交于 2019-12-12 04:06:27
问题 I'm deploying a SOAP WS service using AXIS2 as a framework on top of Tomcat. package serverPerson; public interface PersonService { public Dipartimento getPersonInfo(Person p); public double multiply(float d1, float d2); } implementation: package serverPerson; public class PersonServiceImpl implements PersonService { //method implementations omitted } I'm trying to use this services in the following way: package com; import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; import serverPerson

Calling secure webservice using CXF and Camel

萝らか妹 提交于 2019-12-12 03:34:07
问题 I am trying to call a SOAP webservice on an https URL, where client authentification (SSL) is required. Right now I am configuring my camel context using spring (switched away from blueprint) and creating my endpoints using the Camel CXF component with jetty as transport. I can't find any good examples for this out there. Maybe I should be using http4 in stead of Jetty. I was trying to set up some Camel sslContextParameters, but I can't see this working with CXF and/or Jetty. Can anyone point