Re: Changing message output

2016-08-24 Thread Mandy Warren
ice to hear you again ;) > > Don't the XSLT feature http://cxf.apache.org/docs/xslt-feature.html and > XSLTOut[In]Interceptor fit for your use case? > I guess they do almost the same as your code. > > Regards, > Andrei. > >> -Original Message- &g

Changing message output

2016-08-19 Thread Mandy Warren
Hi, We have a requirement to apply XSLT to incoming request XML and outgoing response XML within CXF interceptors (to avoid changes to the endpoint code). We have used the following approach to modify the response XML and would appreciate your comments to see whether this is an acceptable appro

Re: Message specific CXF interceptors

2016-06-07 Thread Mandy Warren
is expected at out fault chain too then it is > not needed > > Thanks, Sergey > >> On 07/06/16 14:56, Mandy Warren wrote: >> Thanks for the fast reply Sergey. >> >> So, I am accessing the PhaseInterceptorChain in a class called by a JAX-WS >> service

Re: Message specific CXF interceptors

2016-06-07 Thread Mandy Warren
r); } else { message.put(Message.FAULT_OUT_INTERCEPTORS, interceptorAsList); } } Hope this clarifies how I use it. Thanks Mandy > On 7 Jun 2016, at 10:12, Sergey Beryozkin wrote: > > Hi Mandy > > Dan may provide more details later on, few comments below in meant

Message specific CXF interceptors

2016-06-06 Thread Mandy Warren
Hi, We currently register a number of interceptors against the endpoint when our Rest service starts up. I have a specific scenario whereby when I call a backend system I need to create a new “session” and ensure this session is deleted when the response is returned to the client. The session i

Re: JSON schema in WADL

2015-03-04 Thread Mandy Warren
e":{"@status":"204"}}]} Hope I've understood everything correctly! Thanks Mandy Sent from a mobile device > On 4 Mar 2015, at 12:27, Sergey Beryozkin wrote: > > Hi Mandy > > Please see comments below >> On 03/03/15 23:43, Mandy Warren wrote: >&g

Re: JSON schema in WADL

2015-03-03 Thread Mandy Warren
semantically not correct but > can give a good idea to users what properties a JSON request or response may > have... > > We have also started supporting Swagger - which can be good for describing > JSON only services > > Cheers, Sergey > > On 03/03/15 21:48, Mandy W

JSON schema in WADL

2015-03-03 Thread Mandy Warren
Hi, I recently read Sergey's blog (http://sberyozkin.blogspot.co.uk/2011/10/describing-json-services-in-wadl.html​) about support for JSON Wadls and managed to view a wadl in JSON but am still struggling to link the JSON schema to the wadl. My spring config looks as follows:-

Re: Async client Http transport and keep-alive timeouts

2014-12-22 Thread Mandy Warren
try > updating to 3.0.3 and seeing if the problems still remain? > > > Dan > > > >> On Dec 21, 2014, at 5:40 PM, Mandy Warren wrote: >> >> Hi Sergey, I tried using HTTPUrlConnection for my synchronous calls and it >> worked very nicely, I

Re: Async client Http transport and keep-alive timeouts

2014-12-21 Thread Mandy Warren
n, Aki or Oleg to comment - hopefully one of HTTP Client > experts would read it :-) > > by the way, what about HTTPUrlConnection - does it work less efficiently ? > > Thanks, Sergey >> On 12/12/14 14:23, Mandy Warren wrote: >> Hi, >> >> We are using cxf versio

Re: WebClient fire & forget

2014-12-16 Thread Mandy Warren
Setting an exchange property is a great idea.. I will try that :-) Many thanks Sent from a mobile device > On 16 Dec 2014, at 12:01, Sergey Beryozkin wrote: > > Hi Mandy >> On 16/12/14 11:30, Mandy Warren wrote: >> This worked fine, many thanks. Just a query about the o

Re: WebClient fire & forget

2014-12-16 Thread Mandy Warren
ice 1. Many thanks Mandy Sent from a mobile device > On 12 Dec 2014, at 14:19, Mandy Warren wrote: > > Many thanks Sergey I will give this a try and let you know.. > > Sent from a mobile device > >> On 5 Dec 2014, at 10:44, Sergey Beryozkin wrote: >> >> H

Async client Http transport and keep-alive timeouts

2014-12-12 Thread Mandy Warren
Hi, We are using cxf version 2.7.12 and are using Asynchronous Client HTTP Transport to send a request to an external service. This external service runs on an Apache server and is configured as follows:- Keep-Alive: timeout=2, max=100 Connection: Keep-Alive i.e. the external server will close

Re: WebClient fire & forget

2014-12-12 Thread Mandy Warren
> > Give it a try please, > > Cheers, Sergey >> On 05/12/14 07:51, Mandy Warren wrote: >> Hi, >> >> We currently use WebClient (.put/.post/.get etc) for sending messages >> synchronously from Rest service 1 to Rest service 2. We now have a >> require

WebClient fire & forget

2014-12-04 Thread Mandy Warren
Hi, We currently use WebClient (.put/.post/.get etc) for sending messages synchronously from Rest service 1 to Rest service 2. We now have a requirement to send a message to Rest service 2 but not bother waiting until that service completes as it may take a long time i.e. a fire & forget scenar

Re: How to add content to an empty message body

2014-10-15 Thread Mandy Warren
dyWriter) and add it when converting GET to > POST in your custom interceptor, like this: > message.getInterceptorChain().add(new CustomBodyWriter()); > > It's a bit of a mess :-), sorry about it. But it will work well in 2.7.14 > > Thanks, Sergey > > [1] https://issues

Re: How to add content to an empty message body

2014-10-12 Thread Mandy Warren
obile device > On 12 Oct 2014, at 18:43, Sergey Beryozkin wrote: > > Hi Mandy >> On 11/10/14 11:20, Mandy Warren wrote: >> Hi, >> >> We have developed a way for Rest calls sent using WebClient to be >> transparently sent either to a real backend or to our s

How to add content to an empty message body

2014-10-11 Thread Mandy Warren
Hi, We have developed a way for Rest calls sent using WebClient to be transparently sent either to a real backend or to our stubbing system. We have implemented this via an interceptor which intercepts the outgoing request and changes the url if certain headers (to indicate stubbing should be u

Re: Closing of WebClient and Response objects

2014-08-26 Thread Mandy Warren
Many thanks Sergey this makes it clear.. We will ensure we close both the response and client explicitly. Sent from a mobile device > On 26 Aug 2014, at 10:42, Sergey Beryozkin wrote: > > Hi Mandy, > good to hear from you again, > >> On 25/08/14 22:29, Mandy Warren wr

Closing of WebClient and Response objects

2014-08-25 Thread Mandy Warren
Hi, We are currently using the jax rs WebClient class to call Rest URLs from services we are developing. Up until now we haven't been explicitly calling "close" on the Response or the WebClient objects as none of the examples I have seen showed this but after looking more closely at the APIs I

Re: cxf-rt-transports-http-hc Maven dependency convergence error

2014-04-16 Thread Mandy Warren
;> On Apr 15, 2014, at 1:59 PM, Mandy Warren wrote: >> >> >> Hi, >> >> When I bring in the cxf-rt-transports-http-hc Maven dependency I get the >> following dependency convergence errors (we use the maven-enforcer):- >> >> [ERROR] +-org.apach

Re: Asynchronous http transport keep alive property query

2014-04-15 Thread Mandy Warren
shpuld also work > HTH, Sergey > > >> On 15/04/14 20:02, Mandy Warren wrote: >> >> Hi, >> >> I've knocked up a unit test to prove my settings for >> org.apache.cxf.transport.http.async.MAX_PER_HOST_CONNECTIONS and >> org.apache.cxf.tran

Asynchronous http transport keep alive property query

2014-04-15 Thread Mandy Warren
Hi, I've knocked up a unit test to prove my settings for org.apache.cxf.transport.http.async.MAX_PER_HOST_CONNECTIONS and org.apache.cxf.transport.http.async.MAX_CONNECTIONS are getting set correctly but not having much luck! Here's the test:- @Test public void getClientUsingApacheCommon

cxf-rt-transports-http-hc Maven dependency convergence error

2014-04-15 Thread Mandy Warren
Hi, When I bring in the cxf-rt-transports-http-hc Maven dependency I get the following dependency convergence errors (we use the maven-enforcer):- [ERROR] +-org.apache.httpcomponents:httpclient:4.2.5 [ERROR] +-org.apache.httpcomponents:httpcore:4.2.4 [ERROR] and [ERROR] +-org.apache.cxf:cxf-rt-t

Re: Query about asynchronous-client-http-transport

2014-04-11 Thread Mandy Warren
t sure it will be > logged per every request or not but should help to see what is going on > > Cheers, Sergey > >> On 10/04/14 08:40, Mandy Warren wrote: >> Hi, >> >> Reading the page >> https://cxf.apache.org/docs/asynchronous-client-http-transport.html

Query about asynchronous-client-http-transport

2014-04-10 Thread Mandy Warren
Hi, Reading the page https://cxf.apache.org/docs/asynchronous-client-http-transport.html I am a little confused as to the difference between the org.apache.cxf.transport.http.async.usePolicy and use.async.http.conduit properties? To ensure I use the async transport for both sync and async cal

Re: Per Client interceptor

2014-02-06 Thread Mandy Warren
You can specify interceptors at the jaxrs/jaxws server level or else apply them to a new bus instance only used by your services. Hope this helps Mandy Sent from a mobile device > On 6 Feb 2014, at 13:28, Thomas Manson wrote: > > Hi, > > I've build a library that calls a set of webservices

Re: How to ignore namespaces when calling Response.readEntity() with JAXB object

2014-01-22 Thread Mandy Warren
Thanks very much for the clear explanation, using the namespaceMap fixed it for us! Sent from a mobile device > On 21 Jan 2014, at 11:20, Sergey Beryozkin wrote: > > Hi Mandy > > Please see comments inline >> On 20/01/14 21:49, Mandy Warren wrote: >> >>

How to ignore namespaces when calling Response.readEntity() with JAXB object

2014-01-20 Thread Mandy Warren
Hi, We have a Rest service which returns a JSON or XML response if all goes well and a JSON / XML "Errors" object if a problem occurs. The "Errors" object has been created using xjc ie. by generating a JAXB class from a Schema. Our JAXB provider looks like this: JAXBElementProvider jaxbEl

Re: ServerLifeCycleListener query

2014-01-18 Thread Mandy Warren
That worked perfectly, many thanks! Sent from a mobile device > On 10 Jan 2014, at 15:54, Andrei Shakirin wrote: > > Hi Mandy, > > Yep, try org.apache.cxf.jaxrs.provider.ProviderFactory for 2.7.8. > > Regards, > Andrei. > >> -----Original Message- >&g

Re: ServerLifeCycleListener query

2014-01-10 Thread Mandy Warren
rFactory factory = (ServerProviderFactory)e.get( > ServerProviderFactory.class.getName()); > factory.registerUserProviders(list); > // factory.registerUserProvider(object); > > This should do it > Cheers, Sergey > > > On Mon, Jan 6, 2014 at 11:54 PM, Mandy Warren wrote: > >&g

ServerLifeCycleListener query

2014-01-06 Thread Mandy Warren
Hi, Happy New Year :-) I have written a class which implements ServerLifeCycleListener and registers a number of interceptors which are applicable to all my services. I was just wondering if there was any way to also register JAXRS providers using this mechanism? Many thanks Mandy Sent from a

Local transport testing of jax ws services

2013-12-17 Thread Mandy Warren
Hi I have been using local transport for testing of my rest services very happily by making use of the WebClient class. Here I can specify the address of the WebClient to be a local:// address. I am using the JaxWsProxyFactoryBean at the moment for testing my soap services but realise now that

Re: LocalTransport for integration testing

2013-12-01 Thread Mandy Warren
ansportFactory > bean? > Doesn't that work for you just with configurable local address "local://abcd > " or do you have some special reason to redefine LocalTransportFactory? > > Regards, > Andrei. > >> -Original Message- >> From: Mandy Warren

Re: LocalTransport for integration testing

2013-11-30 Thread Mandy Warren
Just adding a few more comments as we have exactly this setup with our projects. We're using Maven and have a spring file (main-applicationContext.xml)under src/main/resources defining the jaxrs bean with the property placeholder as Sergey has specified. This references a properties file with th

Re: Handling exceptions in a JAX-RS fault interceptor when using Local Transport

2013-11-30 Thread Mandy Warren
> > Hi Mandy >> On 06/10/13 22:11, Mandy Warren wrote: >> Hi Sergey, >> >> I finally got round to testing this tonight for handling both In & Out >> Interceptor faults & it works perfectly as described using 2.7.8-SNAPSHOT. >> This makes life so mu

Re: Problem setting map.cxf.interceptor.fault property in Spring config

2013-11-30 Thread Mandy Warren
30 Nov 2013, at 09:48, Mandy Warren wrote: > > > Hi, > > Now that 2.7.8 is available (thanks for all the hard work on this!) I've been > changing my code to try & set the map.cxf.interceptor.fault bus property to > enable me to handle in interceptor exceptions in my

Problem setting map.cxf.interceptor.fault property in Spring config

2013-11-30 Thread Mandy Warren
Hi, Now that 2.7.8 is available (thanks for all the hard work on this!) I've been changing my code to try & set the map.cxf.interceptor.fault bus property to enable me to handle in interceptor exceptions in my rest exception mapper. I've managed to do this fine programmatically in my tests usi

Re: Local transport queries

2013-11-05 Thread Mandy Warren
Many thanks for the reply - this makes it clearer On 1 Nov 2013, at 16:55, Sergey Beryozkin wrote: > Hi Mandy > On 10/10/13 22:30, Mandy Warren wrote: >> >> Thanks so much for the fast reply! A few comments below.. >> >> Sent from a mobile device >> >

Re: Bug in LoggingInInterceptor?

2013-11-05 Thread Mandy Warren
Thanks Sergey I have raised the following Jira: https://issues.apache.org/jira/browse/CXF-5377 Sent from a mobile device > On 5 Nov 2013, at 22:25, Sergey Beryozkin wrote: > > Hi Mandy >> On 05/11/13 21:31, Mandy Warren wrote: >> Hi it looks like there is a bug with the

Bug in LoggingInInterceptor?

2013-11-05 Thread Mandy Warren
Hi it looks like there is a bug with the LoggingInInterceptor when using local transport. As you can see by the output the URL is not logged. 21:13:05.837 [test-rs] [main] INFO o.a.c.t.local.LocalTransportFactory - Creating destination for address local://abcd 21:13:05.838 [test-rs] [main] INFO

No MessageObserver issue when running multiple JUnits which load Spring context and use local transport

2013-10-22 Thread Mandy Warren
Hi, I have a Spring config which defines my jaws:server to be listening on a local transport. I load this config in my JUnit as follows: @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:conf/s

Re: Applying interceptor to only some methods

2013-10-13 Thread Mandy Warren
Hi David, I asked a similar question not so long ago and Sergey sent me the following link which explained how to get exceptions from interceptors handled: https://cwiki.apache.org/confluence/display/CXF20DOC/JAX-RS+Basics#JAX-RSBasics-MappingexceptionsthrownfromCXFinterceptors Note you need to

Re: Local transport queries

2013-10-10 Thread Mandy Warren
Thanks so much for the fast reply! A few comments below.. Sent from a mobile device On 10 Oct 2013, at 21:39, Daniel Kulp wrote: > > On Oct 10, 2013, at 2:35 PM, Mandy Warren wrote: > >> Hi, >> >> We have so far used local transports for our rest servic

Local transport queries

2013-10-10 Thread Mandy Warren
Hi, We have so far used local transports for our rest service testing but we're now evaluating it for use as an efficient way to talk between services in different war files. I had a few questions.. 1. How does CXF locate/lookup the called service? I assume that each war has it's own bus so d

Re: Handling exceptions in a JAX-RS fault interceptor when using Local Transport

2013-10-06 Thread Mandy Warren
AX-RS+Basics#JAX-RSBasics-MappingexceptionsthrownfromCXFinterceptors > > Cheers, Sergey > On 28/09/13 21:28, Mandy Warren wrote: >> This is great news Sergey, thanks so much for following this up! Please let >> me know when this is ready to use! >> >> Mandy >> >> Sent from a mobile devic

NullPointerException in jaxrs.client.AbstractClient.setResponseBuilder when interceptor throws a fault

2013-09-29 Thread Mandy Warren
Hi, I am running some unit tests using local transport to see what happens when an interceptor throws a Fault. I was expecting to get a Response back with a status code of 500 but instead I get this: javax.ws.rs.client.ClientException: java.lang.NullPointerException > at > org.apache.cxf.jaxr

Re: Setting local transport

2013-09-28 Thread Mandy Warren
Many thanks Sent from a mobile device On 28 Sep 2013, at 21:59, David Karlsen wrote: > The latter. VM as in the java vm. Hence a (process) local transport. > Den 28. sep. 2013 22:47 skrev "Mandy Warren" > følgende: > >> Hi, >> >> In the documentati

Setting local transport

2013-09-28 Thread Mandy Warren
Hi, In the documentation it states that local transport allows you to send messages more efficiently inside a jvm. If I enable local transport, is cxf clever enough to work out whether I am calling in the same vm and hence use local transport and if vm to vm use http? Or do I need to know my d

Re: Handling exceptions in a JAX-RS fault interceptor when using Local Transport

2013-09-28 Thread Mandy Warren
the good news is that it will become simpler to > manage the exceptions thrown from the existing CXF interceptors on JAX-RS > runtime paths... > > Thanks, Sergey > On 19/09/13 21:31, Mandy Warren wrote: >> Many thanks this worked fine! >> >> Sent from a mobile devi

Re: How to handle exceptions from a SOAP webservice in a single point

2013-09-20 Thread Mandy Warren
If exception string is not XML, set is as fault string >fault.setFaultString(errorString); >} >return new SOAPFaultException(fault); > > > Regards, > Andrei. > >> -Original Message- >> From: Mandy Warren [mailto:mandys.in...@gmail.com

How to handle exceptions from a SOAP webservice in a single point

2013-09-19 Thread Mandy Warren
Hi, I would like to handle all exceptions thrown by my webservice in a single point so I can create Faults with specific codes / strings based on info in the exception. When using JAX-RS I can do this very neatly via an Exception Mapper (and then convert to a REST response) but there doesn't seem

Re: How to handle exceptions from a SOAP webservice in a single point

2013-09-19 Thread Mandy Warren
19 Sep 2013, at 22:01, Sergey Beryozkin wrote: > Hi > On 19/09/13 21:56, Mandy Warren wrote: >> Hi, >> >> I would like to handle all exceptions thrown by my webservice in a single >> point so I can create Faults with specific codes / strings based on info in >>

Re: Handling exceptions in a JAX-RS fault interceptor when using Local Transport

2013-09-19 Thread Mandy Warren
Many thanks this worked fine! Sent from a mobile device On 13 Sep 2013, at 17:31, Sergey Beryozkin wrote: > Hi > On 13/09/13 12:35, Mandy Warren wrote: >> Many thanks for your reply. I am now using an ExceptionMapper for >> application errors and have created a ResponseHandl

Re: In what order are multiple Request Handlers run?

2013-09-18 Thread Mandy Warren
at 12:43, Sergey Beryozkin wrote: > Hi > On 18/09/13 12:28, Mandy Warren wrote: >> Hi >> >> I need to use Request and Response Handlers rather than Interceptors and >> would like to know how I specify the order in which multiple Request >> Handlers are

In what order are multiple Request Handlers run?

2013-09-18 Thread Mandy Warren
Hi I need to use Request and Response Handlers rather than Interceptors and would like to know how I specify the order in which multiple Request Handlers are run(eg need to do validation first, then security etc). Is it based on the order of declaration of beans in the jaxrs:providers section?

Re: Handling exceptions in a JAX-RS fault interceptor when using Local Transport

2013-09-13 Thread Mandy Warren
doing message.getExchange().getOutMessage().getContent(Exception.class)) but no luck.. Please could you advise how this is possible? Many thanks Sent from a mobile device On 12 Sep 2013, at 21:05, Sergey Beryozkin wrote: > Hi > On 12/09/13 18:32, Mandy Warren wrote: >> Hi, >> &g

Handling exceptions in a JAX-RS fault interceptor when using Local Transport

2013-09-12 Thread Mandy Warren
Hi, I am trying to write a Fault Interceptor to handle exceptions both from my application code & from other interceptors. The Interceptor needs to change the HTTP status code to something appropriate and set the message body with info that explains the error in more detail (either in JSON or XML

Re: How to intercept exceptions thrown by CXF servlet

2013-06-23 Thread Mandy Warren
ays add a filter can catch exceptions from there, but that would > probably hide the container issue > > Cheers, Sergey > > > >> Regards, >> Andrei. >> >>> -Original Message- >>> From: Mandy Warren [mailto:mandys.in...@gmail.com]

How to intercept exceptions thrown by CXF servlet

2013-06-22 Thread Mandy Warren
I have developed a REST service using Apache CXF and notice that if I send invalid characters in the URL, the CXF servlet throws back the following exception before it gets to my code: Servlet failed with Exception java.lang.IllegalArgumentException at java.net.URI.create(URI.java:841) at org