Re: Fault thrown in Rest In-Interceptor not handled by ExceptionMapper

2009-12-17 Thread vickatvuuch
, a WebApplicationException is thrown but the custom fault out interceptor is not invoked. This results in an empty body in the HTTP response. Have you run into that? Thanks for your help, Mike On Thu, Dec 17, 2009 at 3:25 PM, vickatvuuch vlisov...@gmail.com wrote: I have had a similar problem and worked

Re: Fault thrown in Rest In-Interceptor not handled by ExceptionMapper

2009-12-17 Thread vickatvuuch
, a WebApplicationException is thrown but the custom fault out interceptor is not invoked. This results in an empty body in the HTTP response. Have you run into that? Thanks for your help, Mike On Thu, Dec 17, 2009 at 3:25 PM, vickatvuuch vlisov...@gmail.com wrote: I have had a similar problem and worked

Re: CXF REST nested bean initialization in the POST x-www-form-urlencoded

2009-12-11 Thread vickatvuuch
Thanks Sergey, for this great level of details. What I really miss is a mechanism where the engine could decide, based on the mime type supplied in the HTTP request, which method to call on the REST port and inject in all cases whether annotated or not. It should be able to inject it,

Re: JAX-RS : initial WADL support

2009-12-11 Thread vickatvuuch
Was about to post a new entry on WADL when noticed this hot post.. I'm debugging a bug in the WADL generator, which results in extra slash / in the Url and once loaded into soap UI make it not executable unless url is fixed up by hand. Here is my config: jaxrs:server address=/v1/rest/Foo The

RE: JAX-RS : initial WADL support

2009-12-11 Thread vickatvuuch
, Sergey -Original Message- From: vickatvuuch [mailto:vlisov...@gmail.com] Sent: 11 December 2009 15:29 To: users@cxf.apache.org Subject: Re: JAX-RS : initial WADL support Was about to post a new entry on WADL when noticed this hot post.. I'm debugging a bug in the WADL generator

RE: JAX-RS : initial WADL support

2009-12-11 Thread vickatvuuch
, This is a bug. The workaround is use @Path(execute), it won't affect the dispatching logic in any way. It is time to pay some more attention to the WADLGenerator... Thanks, Sergey -Original Message- From: vickatvuuch [mailto:vlisov...@gmail.com] Sent: 11 December 2009 15:29

RE: JAX-RS : initial WADL support

2009-12-11 Thread vickatvuuch
Here is what I see inside the WADL xml: resources base=http://localhost:8085/services/v1/rest/Foo;resource path=/resource path=/execute Sergey Beryozkin-2 wrote: Actually Here is my config: jaxrs:server address=/v1/rest/Foo The Impl: @Path() public class FooWServiceImpl

RE: JAX-RS : initial WADL support

2009-12-11 Thread vickatvuuch
a request like http://localhost:8085/services/v1/rest/Foo/execute is handled. As I said this is a bug in SoapUI in that it can not concatenate http://localhost:8085/services/v1/rest/Foo, /, /execute so you need to help it by using execute -Original Message- From: vickatvuuch

RE: JAX-RS : initial WADL support

2009-12-11 Thread vickatvuuch
the information about the actual hierarchy -Original Message- From: vickatvuuch [mailto:vlisov...@gmail.com] Sent: 11 December 2009 16:54 To: users@cxf.apache.org Subject: RE: JAX-RS : initial WADL support Not really, remember I have an empty @Path() at the impl level The bug I

RE: JAX-RS : initial WADL support

2009-12-11 Thread vickatvuuch
it should be used as is by WADLGenerator, without '/' being appended. I'm still not sure about it but I'll ask... Also I'll make sure it will be possible to plugin custom generators Thanks, Sergey [1] http://www.w3.org/Submission/wadl/ -Original Message- From: vickatvuuch

Re: Adobe Flex HTTPService escapes dot with %2e breaking CXF logic on the server

2009-12-10 Thread vickatvuuch
Thanks Sergey, Could you tell how to register a custom requestFilter - I have not done that yet.. Sergey Beryozkin-2 wrote: Hi, If you're referring to the fact that you can not use say a JAXRS QueryParam(principal.password) then yes, it's a bug which will be fixed shortly...At the

Re: Adobe Flex HTTPService escapes dot with %2e breaking CXF logic on the server

2009-12-10 Thread vickatvuuch
It looks to me that there are two places at least where this needs to be fixed: 1. the JAXRSUtils line 926 - the key needs to be decoded currently: queries.add(values[0], value); fix would be: queries.add(HttpUtils.urlDecode(values[0]), value); 2. Somewhere in the JAXRS UNMARSHAL phase we

Re: Adobe Flex HTTPService escapes dot with %2e breaking CXF logic on the server

2009-12-10 Thread vickatvuuch
Ok taking care of the Form params with CustomFormEncodingProvider by stepping on the populateMap. public class CustomFormEncodingProvider extends FormEncodingProvider Trying this now.. The queryHandler is less clear which base class to use for a provider, could you tell which one handles it by

CXF REST nested bean initialization in the POST x-www-form-urlencoded

2009-12-10 Thread vickatvuuch
I've ran into some small gotcha with my java bean parameter. It has simple bean nested inside as a member,which works fine if I execute GET request with params on the url, for examle: /login?principal.username=dude Here is my GET entry point: On the top of the impl I have: @Consumes({text/xml,

Adobe Flex HTTPService escapes dot with %2e breaking CXF logic on the server

2009-12-09 Thread vickatvuuch
Example Flex code using HTTPService: var params:Object = {}; params[principal.username] = this.idUsername.text; params[password] = this.idPassword.text; svcRequest.url = this.idUrl.text + /services/v1/rest/Auth/login; svcRequest.send(params); The above produces this HTTP request on the

Re: AW: Best practice for SOAP and RESTful WebServices / Versioning

2009-12-09 Thread vickatvuuch
I use Urls and packages on the server (generates namespaces in the WSDL and on the client) For example for REST /services/v1/rest/HelloWorld/methodName for SOAP: /services/v1/soap/HelloWorld java packages as follows: com.foo.webservices.v1.ports.helloworld Sertic Mirko, Bedag wrote: Hi

Re: Helper for copying values between database and response object

2009-12-03 Thread vickatvuuch
This might work, only remember that versioning is a problem as the moment that your domain class chages that will get exposed to the world and ultimately can break many clients.. What I did in this case was making WS layer wrapper classes which provide a JAXB compliant facade while shuttling

Re: CXF Weblogic 10 services page not listing CXF services deployed

2009-12-03 Thread vickatvuuch
Nasty Weblogic.. Not forwarding to the /root/services page. If I go there directly its all there looking good.. JBoss and Tomcat same war - no problem. dkulp wrote: On Wed November 25 2009 2:06:08 pm vickatvuuch wrote: Hi All, We have deployed CXF services on WS 10 and while everything

Re: CXF 2.2.5 code-first WSDL exceptions problem

2009-12-03 Thread vickatvuuch
not making it apparent for the client what kind of exception is coming its way.. For now I ended up using faultcode for everything, which is kind of lame, but it works for all clients at least Thanks, -Vitaly vickatvuuch wrote: Hi All, I have this small Fault handling issue, which is hopefully me

Re: CXF REST MapString, String as argument can it handle it?

2009-12-03 Thread vickatvuuch
Yup, I did say that.. Thanks! I may actually switch to use a list of beans instead as to simplify things, anyway. Sergey Beryozkin-2 wrote: Hi, Sergey, I just wonder if you had a chance to implement this in 2.2.5? No, you said there was no rush :-). I actually did look at it briefly

Re: How to handle exceptions in JAx-rs service and convert it to Http Response code based on type of Exception

2009-12-02 Thread vickatvuuch
register rest exception mapper and convert there, for example see below: note that the mapper works fine in REST only case, I actually ended up building my own CustomFaultOutInterceptor such as this: public class CustomFaultOutInterceptor extends AbstractPhaseInterceptorMessage public class

Re: how to close inputStream before returning response

2009-11-30 Thread vickatvuuch
You can take a look at one of the out interceptors that handle the response. I would start somewhere around JAXRSOutInterceptor and go from there. Parimal Dhinoja wrote: Hi All, Following is my service method where I am reading file and feed it into Response object. Even if I try to

Re: CXF REST MapString, String as argument can it handle it?

2009-11-30 Thread vickatvuuch
Sergey, I just wonder if you had a chance to implement this in 2.2.5? Thanks, -Vitaly Sergey Beryozkin-2 wrote: You can still do it even now, but it will require you to do some manual coding. You can register a ParameterHandlerExecuteRequest and then parse a query string from within

CXF client not getting custom exceptions thrown as defined by server impl

2009-11-29 Thread vickatvuuch
Hi All, I have this small Fault handling issue, which is hopefully me doing it wrong somewhere.. So, I have defined a class WSAuthFault which is thrown by a IN interceptor and Auth port as well. The server side exception hierarchy is defined like this:

CXF Weblogic 10 services page not listing CXF services deployed

2009-11-25 Thread vickatvuuch
Hi All, We have deployed CXF services on WS 10 and while everything is working (I can get individual port WSDL and call methods) but the http://localhost:7002/services page is not showing up like something is blocking it. The same setup, deployed as ear works fine on JBoss. It looks like a

Re: Helper for copying values between database and response object

2009-11-25 Thread vickatvuuch
how about this one? http://dozer.sourceforge.net/documentation/about.html R. Heydenreich wrote: Hi all, I'm using CXF for a short time. The task is to read some data from database (using Hibernate) and sending them over a webservice. Now the question is if there is a convenient way to

Re: One endpoint handling multiple URL paths

2009-11-25 Thread vickatvuuch
one way is to have a spring bean impl shared by two different jaxb and/or jaxrs endpoints, not sure though what is the use case here? Lukasz Lichota wrote: hello folks, I'd like to have one @WebServiceProvider endpoint but I'd like it to handle all request coming to certain path

Re: Fake the understanding of a soap:mustUnderstand header

2009-11-23 Thread vickatvuuch
You can step on normal processing by making a following hack: 1. Make a custom interceptor either extending AbstractSoapInterceptor or AbstractPhaseInterceptorSoapMessage 2. Install it right after CXF default ReadHeadersInterceptor for example: public

CXF bean property validation

2009-11-23 Thread vickatvuuch
Hi All, Does anybody know if there is a standard way to deal with property validation? For example if my request POJO has N properties can I somehow enforce validation of things such as String length, null, Not Null etc. Common stuff.. Just don't want to reinvent the wheel in case CXF already

Soap Fault handling in the Out Interceptor

2009-11-18 Thread vickatvuuch
Hi ! I'm trying to figure out how to pickup all exceptions (including IllegalArgument, NPE, etc) that may be thrown from custom IN interceptors as well as Port Impls such that I would be able to wrap it up in MyWebFault which has defined ERROR_CODEs exposed through WSDL. I see that there are

Re: Soap Fault handling in the Out Interceptor

2009-11-18 Thread vickatvuuch
11:37:28 am vickatvuuch wrote: Hi ! I'm trying to figure out how to pickup all exceptions (including IllegalArgument, NPE, etc) that may be thrown from custom IN interceptors as well as Port Impls such that I would be able to wrap it up in MyWebFault which has defined ERROR_CODEs exposed

CXF code first schema validation

2009-11-18 Thread vickatvuuch
Hi ! Trying to find how to enable schema validation on the server side under the code first scenario. At some point I saw annotations that allow to limit bean field length etc. can't find those for some reason, anybody done that? Thanks, -Vitaly -- View this message in context:

Re: Soap Fault handling in the Out Interceptor

2009-11-18 Thread vickatvuuch
to traslate from platform level to WS layer error code, I can also control it there in one place. May be I could do it in front of the phase, probably could optimize it that way later. vickatvuuch wrote: Dan, I was thinking of making a custom WebFaultOutInterceptor and inserting it before

Re: CXF jaxrs REST exception stack trace propagated to REST client, can exception be wrapped up or filtered out or AOP intercepted?

2009-11-17 Thread vickatvuuch
that not undesired responses get sent back to the client. Have a look at http://cwiki.apache.org/CXF20DOC/jax-rs.html#JAX-RS-Exceptionhandling -Original Message- From: vickatvuuch [mailto:vlisov...@gmail.com] Sent: Tuesday, 17 November 2009 9:30 AM To: users@cxf.apache.org Subject: CXF

Re: CXF jaxrs REST exception stack trace propagated to REST client, can exception be wrapped up or filtered out or AOP intercepted?

2009-11-17 Thread vickatvuuch
to the client. Have a look at http://cwiki.apache.org/CXF20DOC/jax-rs.html#JAX-RS-Exceptionhandling -Original Message- From: vickatvuuch [mailto:vlisov...@gmail.com] Sent: Tuesday, 17 November 2009 9:30 AM To: users@cxf.apache.org Subject: CXF jaxrs REST exception stack trace

RE: CXF REST and SOAP exception propagation

2009-11-17 Thread vickatvuuch
, if the in message has an application/soap content type then WSBaseException has to be handled one way, otherwise it is a JAXRS service exception Cheers, Sergey -Original Message- From: vickatvuuch [mailto:vlisov...@gmail.com] Sent: 17 November 2009 20:38 To: users@cxf.apache.org Subject: Re

Re: Deploying JAXWSJAXRS together - error

2009-11-17 Thread vickatvuuch
looks like a missing import.. Here is what I have when running mixed RESTful services. !-- Import CXF services -- import resource=classpath:META-INF/cxf/cxf.xml/ import resource=classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml/ import

Re: Stateful webservices

2009-11-17 Thread vickatvuuch
I put together my own session store bean which is shared by all Impl beans. Later you could use Hibernate cash to replicate it cross hosts.. The Auth.login does auth and generates sessions, then client sends this sessionid in the SOAP header or on the REST request. You put together a In

CXF jaxrs REST exception stack trace propagated to REST client, can exception be wrapped up or filtered out or AOP intercepted?

2009-11-16 Thread vickatvuuch
Hi All, Is there a way to Not propagate unchecked exception stack traces back to the client? Use case: I have a port, that expects certain parameters, if one of them is null it may throw unchecked IllegalArgumentException, which could be rectified if it was all under my control. Imagine that

RE: CXF jaxrs REST exception stack trace propagated to REST client, can exception be wrapped up or filtered out or AOP intercepted?

2009-11-16 Thread vickatvuuch
-Original Message- From: vickatvuuch [mailto:vlisov...@gmail.com] Sent: Tuesday, 17 November 2009 9:30 AM To: users@cxf.apache.org Subject: CXF jaxrs REST exception stack trace propagated to REST client, can exception be wrapped up or filtered out or AOP intercepted? Hi All

Re: CXF REST MapString, String as argument can it handle it?

2009-11-12 Thread vickatvuuch
Here is spring config: jaxrs:server address=/v1/rest jaxrs:serviceBeans ref bean=scriptoServiceBean/ /jaxrs:serviceBeans jaxrs:providers ref bean=aegisProvider/

Re: CXF REST MapString, String as argument can it handle it?

2009-11-12 Thread vickatvuuch
Thanks, I understand your suggestion, however the destination of these params is a groovy script which is why I wanted to piece together params as name value pairs and map is what fits best. My understanding that passing a map is an open issue under CXF is it? Sergey Beryozkin-2 wrote: Hi,

Re: CXF REST MapString, String as argument can it handle it?

2009-11-12 Thread vickatvuuch
Yes, I guess I will use POST in this case and this body does fill in my map. It would be nice to allow it on the Url as well. ie: params.k1=v1params.k2=v2 etc. ns1:ExecuteRequest ns2:type=ns1:ExecuteRequest xmlns:ns1=http://scripto.ports.v1.webservices.foo.com;

Re: CXF REST MapString, String as argument can it handle it?

2009-11-12 Thread vickatvuuch
Sergey, I appreciate your help. There is no rush, I even think that in my case POST is better as I don't want to make it too easy to hit a groovy script on the server side from internet explorer anyway. So for now POST does it for me. It would of course be nice to have this support in the

RE: CXF on Weblogic 10 cluster

2009-11-11 Thread vickatvuuch
- From: vickatvuuch [mailto:vlisov...@gmail.com] Sent: Tuesday, November 10, 2009 6:44 PM To: users@cxf.apache.org Subject: CXF on Weblogic 10 cluster Was anybody able to get CXF up and running on the cluster setup? I tried the suggested work around for java.lang.NoSuchMethodError

CXF REST MapString, String as argument can it handle it?

2009-11-11 Thread vickatvuuch
Must be a simple one for anyone already done it. I have tried it today and couldn't figure out why it would not initialize my bean with a Map in it, anyone knows the trick? There seem to be a bug open on this, but I'm not sure if there is still an issue and if so is there a way to do this? Tried

CXF on Weblogic 10 cluster

2009-11-10 Thread vickatvuuch
Was anybody able to get CXF up and running on the cluster setup? I tried the suggested work around for java.lang.NoSuchMethodError: javax.jws.WebService.portName()Ljava/lang/String; and put geronimo-ws-metadata_2.0_spec-1.1.1.jar and wsdl4j-1.6.1.jar in the /jre/endorsed directory, which worked

Re: Custom WSDL header

2009-10-29 Thread vickatvuuch
am vickatvuuch wrote: Dan, Thanks for the reply. I had trouble building my project with SNAPSHOT not sure why that is, but I didn't have time to track it down, so I'm using 2.2.4 for now. It turns out that my solution is slightly different than what I copied in my earlier post

Re: Custom WSDL header

2009-10-26 Thread vickatvuuch
On Sat October 24 2009 12:11:08 pm vickatvuuch wrote: Thanks a bunch for the ideas! Here is what worked for me: 1. I defined my version of MyWSDLQueryHandler extends WSDLQueryHandler (will override updateDoc and sneak in my header elements there later) 2. Defined my version

Re: Custom WSDL header

2009-10-24 Thread vickatvuuch
Thanks! it sounds promising; do you mind sharing how to tell the bus that it should run my handler? Thanks, -Vitaly bimargulies wrote: The handler is registered as an object on the bus. You can register yours instead. On Fri, Oct 23, 2009 at 6:19 PM, vickatvuuch vlisov...@gmail.com

Re: Custom WSDL header

2009-10-24 Thread vickatvuuch
(QueryHandlerRegistry.class).getHandlers()) { } and when you find the regular handler, replace it with yours. And perhaps open a JIRA suggesting that QueryHandlerRegistryImpl be friendlier to customization here. On Sat, Oct 24, 2009 at 10:17 AM, vickatvuuch vlisov...@gmail.com wrote: Thanks! it sounds

Re: Custom WSDL header

2009-10-24 Thread vickatvuuch
sure that you get called at the right time: after the handler registry is set up. There are other people who, with any luck, will chime in. On Sat, Oct 24, 2009 at 10:52 AM, vickatvuuch vlisov...@gmail.com wrote: can it be done from the config file? so far I was using beans.xml

Re: How do I access body from SoapMessage

2009-10-24 Thread vickatvuuch
There are different interceptor phases, at some point xml is all parsed and an object model is built, depending where you hooked in an interceptor you would see different objects associated with the message. I'm guessing if you put it in in the right phase the body would be parsed and available,

Re: Trouble wireing up Spring-DM Server CXF in Eclipse (with Maven support)

2009-10-24 Thread vickatvuuch
I wouldn't mix eclipse into that right upfront. Start with a clean maven project and build. Pull in all the cxf dependencies and config files into the beans.xml. Define one jaxws endpoint (as in one of the samples) Then when you can build a war file, drop it into tomcat and check if you can

Re: How do I access body from SoapMessage

2009-10-24 Thread vickatvuuch
I guess Dan has already pointed you in the right direction. vickatvuuch wrote: There are different interceptor phases, at some point xml is all parsed and an object model is built, depending where you hooked in an interceptor you would see different objects associated with the message

Re: Trouble wireing up Spring-DM Server CXF in Eclipse (with Maven support)

2009-10-24 Thread vickatvuuch
There is a project with maven I attached earlier, remove any interceptors I had in there and there you have a simple project with maven build all setup. http://www.nabble.com/java-first-how-to-add-WS-Security-header-to-WSDL-to25977266.html Raughan wrote: I am trying to write a simple hello

Pagination strategy

2009-10-24 Thread vickatvuuch
Hi All, Has anybody done result pagination under CXF? I'm looking for some under the hood solution to this if one exist or a general strategy if anybody pulled it off. Thanks, -Vitaly -- View this message in context: http://www.nabble.com/Pagination-strategy-tp26044949p26044949.html Sent from

Custom WSDL header

2009-10-23 Thread vickatvuuch
Hi CXF gurus! I need to add a custom header element to all my endpoints as a place for client to stick a session token. For example I need to add this message xml element once: wsdl:message name=Authentication wsdl:part name=Authentication type=tns1:SessionInfo/ /wsdl:messagebr/ and

Re: Custom WSDL header

2009-10-23 Thread vickatvuuch
? vickatvuuch wrote: Hi CXF gurus! I need to add a custom header element to all my endpoints as a place for client to stick a session token. For example I need to add this message xml element once: wsdl:message name=Authentication wsdl:part name=Authentication type=tns1:SessionInfo

Re: How-to pass an object from InInterceptor to outInterceptor

2009-10-22 Thread vickatvuuch
Sergey, Thanks, that's what I ended up doing. Sergey Beryozkin-2 wrote: Hi, please do inMessage.getExchange().put(KEY, obj); and outMessage.getExchange().get(KEY); cheers, Sergey - Original Message - From: vickatvuuch vlisov...@gmail.com To: users@cxf.apache.org

Re: How-to pass an object from InInterceptor to outInterceptor

2009-10-21 Thread vickatvuuch
OK I figured this one out: In the inInterceptor I put my object into this map and later looked it up in the outInterceptor: Map mem = (Map)message.getExchange(); mem.put(KEY, obj); etc. vickatvuuch wrote: Hi All, I'm trying to pass an object from my custom inInterceptor for my custom

java first how-to add WS-Security header to WSDL

2009-10-20 Thread vickatvuuch
Hi All, I'm trying to put together a java first CXF server with WS-Security. I have the WSS4JInInterceptor with password callback handling my requests with clear text pass for now. Could somebody point me into a right direction regarding two issues I'm trying to figure out: 1. WSDL header

Re: java first how-to add WS-Security header to WSDL

2009-10-20 Thread vickatvuuch
as before - no traces of policy. dkulp wrote: On Tue October 20 2009 11:28:59 am vickatvuuch wrote: Hi All, I'm trying to put together a java first CXF server with WS-Security. I have the WSS4JInInterceptor with password callback handling my requests with clear text pass for now. Could somebody

Re: AW: java first how-to add WS-Security header to WSDL

2009-10-20 Thread vickatvuuch
Von: vickatvuuch [mailto:vlisov...@gmail.com] Gesendet: Di 20.10.2009 19:06 An: users@cxf.apache.org Betreff: Re: java first how-to add WS-Security header to WSDL Hi Dan, Thanks for your reply. Forgot to mention that I'm building and running on CXF