Re: Can JaxWsProxyFactory bean create an async client?

2008-06-23 Thread Daniel Kulp
If the interface has the async methods on them like would be generated from the code generator, then those methods should work fine. Dan On Jun 23, 2008, at 4:39 PM, Autumn Wang wrote: Can JaxWsProxyFactory bean create an async client? If I need to create async client, does it mean I h

Re: configuring custom JAXB annotation readers in CXF

2008-06-23 Thread Daniel Kulp
I just realized this is covered in the docs: http://cwiki.apache.org/CXF20DOC/jaxb.html Dan On Jun 23, 2008, at 9:22 PM, Daniel Kulp wrote: The JAXBDataBinding object has maps for both contextProperties and marshallerProperties that can be configured via spring configuration. Unfor

Re: configuring custom JAXB annotation readers in CXF

2008-06-23 Thread Daniel Kulp
The JAXBDataBinding object has maps for both contextProperties and marshallerProperties that can be configured via spring configuration. Unfortunately, it doesn't look like we have an example of configuring via spring, just via the apis. :-( Dan On Jun 23, 2008, at 4:45 PM, Arul Dhe

Re: org.apache.cxf.jaxws.interceptors.SwAOutInterceptor | Unreachable Code

2008-06-23 Thread Daniel Kulp
Yea, that looks like dead code to me as well. Feel free to log a JIRA with a patch. It would be great if you want to add byte[] support as well. :-) Dan On Jun 23, 2008, at 4:56 PM, Manolescu, Radu (IT) wrote: 1. In my opinion, the code at org.apache.cxf.jaxws.interceptors.SwAOutInte

Re: complex webservice parameter and resulting wsdl

2008-06-23 Thread Marc Logemann
Hi Dan, thx for the hints. I will check them. Update: oh boy. I forgot to generate getter/setter on my top level class :) Sorry to waste maillist time for you guys. After creating them, my wsdl structure looks as it should be... with all nested classes and stuff. Thanks for telling me

Re: complex webservice parameter and resulting wsdl

2008-06-23 Thread Daniel Kulp
On Jun 23, 2008, at 8:59 PM, Marc Logemann wrote: Hi, sorry to be less informative on the first run, here is what i have: - CXF 2.1 - JAXB (default mapping) - all classes are public (not static) That's COULD be the issue if some of them are inner classes. The inner classes need to be stat

Re: complex webservice parameter and resulting wsdl

2008-06-23 Thread Marc Logemann
Hi, sorry to be less informative on the first run, here is what i have: - CXF 2.1 - JAXB (default mapping) - all classes are public (not static) - no default constructor on the nested classes (do i really have to manually create it?) - no JAXB annotations As i am writing this, i have the fee

Re: complex webservice parameter and resulting wsdl

2008-06-23 Thread Daniel Kulp
We would definitely need to see more details... Primarily, are the nested classes "public static" and have the appropriate default constructor? Everything properly annotated with JAXB annotations? Etc... Dan On Jun 23, 2008, at 8:22 PM, Marc Logemann wrote: Hi, i just created a mo

Re: complex webservice parameter and resulting wsdl

2008-06-23 Thread Benson Margulies
I think that we need to know much more about what you did and how you did it. In general, JAX-WS+JAXB (or JAX-WS+Aegis) will build a complex XML schema to describe all your types. How did you configure? What version of CXF are you using? On Mon, Jun 23, 2008 at 8:22 PM, Marc Logemann <[EMAIL PROT

complex webservice parameter and resulting wsdl

2008-06-23 Thread Marc Logemann
Hi, i just created a more complicated webservice, means, receiving a complex "order" class. This order class has many nested classes in it as you can imagine. I always thought that the class stucture is exposed via the wsdl but it isnt. But when i create a more simple class (no nested cla

Re: How to access HTTP request/responce from interceptor?

2008-06-23 Thread Willem Jiang
You can get the HttpServletRequest and HttpServletResponse objects with below codes in the interceptor HttpServletRequest request = (HttpServletRequest) message.get(AbstractHTTPDestination.HTTP_REQUEST); HttpServletResponse response = (HttpServletResponse) message.get(AbstractHTTP

RE: How to access HTTP request/responce from interceptor?

2008-06-23 Thread Wolf, Chris (IT)
...on second thought, having the request headers is only part of what I need, so if anybody knows how I can access the HttpServletRequest object from an intercetor, that would be awesome... thanks, -Chris W. P.S. plus being able to add elements to the SOAP header of outbout and/or inbound mess

RE: How to access HTTP request/responce from interceptor?

2008-06-23 Thread Wolf, Chris (IT)
I actually looked at the source code for LogginInInterceptor to get my answer: @SuppressWarnings("unchecked") Map > headers = (Map >) message.get(Message.PROTOCOL_HEADERS); for (Map.Entry > header : headers.entrySet())

How to access HTTP request/responce from interceptor?

2008-06-23 Thread Wolf, Chris (IT)
I read the docs, and only found this: http://cwiki.apache.org/CXF20DOC/servlet-transport.html#ServletTransport -AccessingtheMessageContextand%2ForHTTPRequestandResponse However, I would like to access the the HTTP request object from my subclass of AbstractPhaseInterceptor - how would I do tha

org.apache.cxf.jaxws.interceptors.SwAOutInterceptor | Unreachable Code

2008-06-23 Thread Manolescu, Radu (IT)
1. In my opinion, the code at org.apache.cxf.jaxws.interceptors.SwAOutInterceptor:197 is unreachable. 2. Why does this interceptor support only Source/Image/DataHandler? I have a byte[] as a SOAP attachment, and this throws an exception at line 195. How can we handle a byte[] as a SOAP attachment

configuring custom JAXB annotation readers in CXF

2008-06-23 Thread Arul Dhesiaseelan
Hi, One of my bean method returns IOException. When I start my web service, I get "java.lang.StackTraceElement does not have a no-arg default constructor". I see this issue could be overcome using JAXB introductions discussed in this thread: http://forums.java.net/jive/thread.jspa?messageID=

Can JaxWsProxyFactory bean create an async client?

2008-06-23 Thread Autumn Wang
Can JaxWsProxyFactory bean create an async client? If I need to create async client, does it mean I have to go with two options - generate a stub or create a dispatch client? Thanks Autumn -- View this message in context: http://www.nabble.com/Can-JaxWsProxyFactory-bean-create-an-async-client-

[ANNOUNCE] Apache CXF 2.1.1 and 2.0.7 are released!

2008-06-23 Thread Daniel Kulp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The Apache CXF team is proud to announce the availability of the 2.1.1 and 2.0.7 patch releases! Apache CXF is an open source services framework. CXF helps you build and develop services using frontend programming APIs, like JAX-WS. These ser

RE: CXF-2.1.1, JAXB, JRE-1.6.0_04 and codegen

2008-06-23 Thread Wolf, Chris (IT)
The missing XmlSeeAlso was due to my mistake - I actually had 1.6.0_02 configured rather then 1.6.0_04, sorry about that. As you suggest Dan, I still needed to put the JAXB-2.1.6 jars back in. I found without them, I was getting com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper not found

Re: CXF-2.1.1, JAXB, JRE-1.6.0_04 and codegen

2008-06-23 Thread Daniel Kulp
Glen, JDK 1.6.0_04 now include JAXB 2.1.3 instead of the 2.0 versions used in the older versions of the JDK. Thus, it shouldn't be necessary, even for Metro. That said, we ship 2.1.6 (and I just noticed 2.1.7 is out) which includes some performances fixes that you may want anyway. Th

Re: CXF-2.1.1, JAXB, JRE-1.6.0_04 and codegen

2008-06-23 Thread Glen Mazza
I think so, but this might be more of a Dan Kulp question. As best I know, if you use Metro, they want you to put the 2.1 JAXB jars in the endorsed directory of the SDK because the default JAXB in the JRE is 2.0, and Metro can't work with those. It *may* be the same story with CXF, i.e., JAXB 2.

Re: CXF-2.1.1, JAXB, JRE-1.6.0_04 and codegen

2008-06-23 Thread Wolf, Chris (IT)
Just switched up to CXF-2.1.1 from 2.0. I see that JAXB in now available in JDK-1.6.0_04, so I remove external JAXB jars, however, I then get two problems: 1.) wsdl2java won't run. To fix this, I need to put back the external JAXB jar, "jaxb-xjc.jar", however, I can still leave out jaxb-api

Re: Roles and permissions

2008-06-23 Thread Daniel Kulp
Right. The point is that JAX-WS will not inject a security context, ever. It's not a jax-ws concept. It will inject a WebServiceContext object which is a JAX-WS concept. From there, you can query the Principal and Roles using the JAX-WS api's. Regarding your other question, you sh

Re: Roles and permissions

2008-06-23 Thread John-M Baker
I should probably also ask if CXF supports: import javax.annotation.security.RolesAllowed; @RolesAllowed("ADMIN") At first glance, it doesn't seem to - but if this does work then I don't need to get the securitycontext.. John Baker -- Web SSO IT Infrastructure Deutsche Bank London URL:

Re: Enum in webservice method params

2008-06-23 Thread Marc Logemann
Hi, thanks for feedback. I will just try it, no matter what IDEA says... Marc On Mon, 23 Jun 2008 09:12:57 -0400, Daniel Kulp <[EMAIL PROTECTED]> wrote: > > It should be valid. There isn't any reason that I can think of why > it wouldn't be valid. No idea why it would flag that as invalid.

Re: Roles and permissions

2008-06-23 Thread John-M Baker
Dan, I have done this: /** * Retrieve an application configuration by id. * * Webservice method. */ Response getApplicationConfiguration(@PathParam("id") String id); /** * Retrieve an application configuration by id. * * REST method. */ @GET @Pat

Re: Roles and permissions

2008-06-23 Thread Daniel Kulp
You probably will need to split it into two methods, one that takes the JAX-RS SecurityContext and one that doesn't and instead uses the WebServiceContext.Probably the two of those would just pull the required stuff out and pass them to a common third method that's only in the impl, n

Re: Roles and permissions

2008-06-23 Thread John-M Baker
Yes!! Sorry, I missed this completely. Therefore shall I conclude there's no way of getting a SecurityContext for a WS call until a future release of CXF? John Baker -- Web SSO IT Infrastructure Deutsche Bank London URL: http://websso.cto.gt.intranet.db.com "Sergey Beryozkin" <[EMAIL

Re: Roles and permissions

2008-06-23 Thread Sergey Beryozkin
*Shortly, the following form of injection will also be supported* : Does it answer your question ? Cheers, Sergey @Context void setSecurityContext(SecurityContext sc) {} That doesn't work either due to a compile error: annotation type not applicable to this kind of declarat

Re: Roles and permissions

2008-06-23 Thread John-M Baker
Sergey, > you should probaly change it to setSecurityContext(). It doesn't work. > Having a given @Context-annotated field of type SecurityContext > should also work - it's not thread safe though at the moment. > Shortly, the following form of injection will also be supported : > > @Context >

Re: Roles and permissions

2008-06-23 Thread John-M Baker
Sergey, Thanks, I'll go through this now. May I ask, will there be any attempt to solve the WS problem where by the SecurityContext can not be passed in a method? This was the cause of the exception I pasted at the start of the discussion - it would certainly make life simplier if both REST a

Re: Roles and permissions

2008-06-23 Thread Sergey Beryozkin
Hi Did you try to exclude a method from a JAX-Ws inrospection mechanism, as Dan suggested earlier, for ex, one way is to add @WebMethod(exclude = true) to this method. It should work without you removing the jaxws-config. By the way, in your sample public void setServletContext(@Context Sec

Re: Enum in webservice method params

2008-06-23 Thread Daniel Kulp
It should be valid. There isn't any reason that I can think of why it wouldn't be valid. No idea why it would flag that as invalid. Dan On Jun 23, 2008, at 5:13 AM, Marc Logemann wrote: Hi, first of all. Great Framework. I am an old XFire user and wasnt sure if the move to CXF is

Re: CXF, trouble to find Classes to unmarshal to

2008-06-23 Thread MathisMohr
I got a little deeper into this xmlns="" thing. If I send a plain xml message to my system (with another, rather "custom" client) that contains the xmlns="" part, the message is refused, or rather not unmarshalled (the phenomena I witness when I try to get the "real" client working. But once I re

Re: Roles and permissions

2008-06-23 Thread John-M Baker
Sergey, To confirm, if I remove the Webservice configuration and annotate a parameter to a method, the SecurityContext is set as expected. So what i'm looking for is a solution for a bean exposed through WS and REST, and given we can't expose a bean through a WS when a method has been annotate

Re: Roles and permissions

2008-06-23 Thread John-M Baker
Or are you saying that the only way to get a Security/Servlet Context via REST is through a parameter to the method, and the only way to get it via a WS is through a setter? John Baker -- Web SSO IT Infrastructure Deutsche Bank London URL: http://websso.cto.gt.intranet.db.com "Sergey B

Re: Roles and permissions

2008-06-23 Thread John-M Baker
Sergey, Thanks for your feedback, and congratulations on the new 2.1.1. release of CXF. I'm using this release I can not get access to the ServletContext or SecurityContext within a bean when called via REST. Here's what I've added: private ServletContext sc; public void setServletContext(@

Re: Roles and permissions

2008-06-23 Thread Sergey Beryozkin
Yes, I don't remember offhand how, have a look at the JAX-WS docs please, I think it can be injected through a field or through a setter. Perhaps using a setter is better in cases like this, as you can then extract the common info from either JAX-WS WebServiceContext or JAX-RS SecurityContext.

Re: CXF, trouble to find Classes to unmarshal to

2008-06-23 Thread MathisMohr
So, as far as I understand it, if I "include" my xsd-files (without any targetNamespace information) into my wsdl-schema (which has a targetNamespace information) these attributes should be inherited by the xsds..or not? I peeked a little deeper into what is actually sent by the other side to my

Enum in webservice method params

2008-06-23 Thread Marc Logemann
Hi, first of all. Great Framework. I am an old XFire user and wasnt sure if the move to CXF is the right thing, but in fact it was! My question: Is is possible to use classes as @WebMethod Parameters that consist of ENUM attributes? My IDE (IDEA) is complaining in the development process that my

Re: Roles and permissions

2008-06-23 Thread John-M Baker
And how is that done? Via a set method of some kind? John Baker -- Web SSO IT Infrastructure Deutsche Bank London URL: http://websso.cto.gt.intranet.db.com Daniel Kulp <[EMAIL PROTECTED]> 20/06/2008 18:13 Please respond to users@cxf.apache.org To users@cxf.apache.org cc Subject Re: R