[JAXRS][IE] subresource locator feature getting confused

2009-02-18 Thread Gabo Manuel
Hi All, I was testing the web service I have created and it works without a hitch when using HttpClient as ... well client. However, if I use I.E. to check (haven't tested fire fox or any browser yet), I encounter the following error: javax.ws.rs.WebApplicationException at

Re: Selecting default media type [...@producemime]

2009-02-18 Thread Sergey Beryozkin
Hi In 2.1.3 JAXBElementProvider has a woildcard support so if you register it explicitly then it will always be checked first and it will 'swallow' the json requests too as the types will be JAXB annotated. If you'd like to avoid writing a filter then the other simple way is to just extend

Re: [JAX-RS] Fault handling

2009-02-18 Thread Sergey Beryozkin
Hi Gabo I've updated one of the tests to show that an exception mapper can report a text/plain message and no Result tags are added. Have a look please at [1] here's the trace : * HTTP/1.1 500 Internal Server Error Content-Type: text/plain Content-Length: 28

Re: Selecting default media type [...@producemime]

2009-02-18 Thread CXFbanda
Sergey, thanks a lot for the help. Sergey Beryozkin-2 wrote: Hi In 2.1.3 JAXBElementProvider has a woildcard support so if you register it explicitly then it will always be checked first and it will 'swallow' the json requests too as the types will be JAXB annotated. If you'd like to

duplicated complex type

2009-02-18 Thread gionnyDeep
Hi all I'm newbie using cxf and webservices. So I apologize if I use not right terms. I defined my webservices using annotations. I created also interfaces used by my webservice. When I create my war and I see in my browser, all wsdls show me complextype as follow ... xsd:complexType

Re: [JAXRS][IE] subresource locator feature getting confused

2009-02-18 Thread Sergey Beryozkin
Hi Gabo What is happening is that with Accept=[image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*] the wildcard is the less specific accept type which is checked last, when selecting between multiple matching methods. I think what is happening is that

Re: Selecting default media type [...@producemime]

2009-02-18 Thread Sergey Beryozkin
Your're welcome, sorry for my regular portion of typos :-) - Original Message - From: CXFbanda cheta...@nortel.com To: users@cxf.apache.org Sent: Wednesday, February 18, 2009 11:28 AM Subject: Re: Selecting default media type [...@producemime] Sergey, thanks a lot for the help.

Extracting HTTP authorization header

2009-02-18 Thread CXFbanda
Hi, I need to extract HTTP authorization header. I am able to do it using @Context HttpHeader injection by CXF and then extracting Authorization info from that. However, i need to do that for all the resource mappings. Is there any way I can avoid replicating code in each method? Is there any

Re: Extracting HTTP authorization header

2009-02-18 Thread Gabo Manuel
Hi, I am not sure what you mean by all resource mappings but the following should work: @HeaderParam(Authorization) on a method parameter of a service implementation will extract the authorization header. Hth. Gabo CXFbanda wrote: Hi, I need to extract HTTP authorization header. I am

Cipher suites set on every request

2009-02-18 Thread Graham Cruse
Hi all, Having just upgraded from 2.1.0 to 2.1.4, I have an issue where the cipher suites on a given client connection are reset on every single request, my http conduit is defined as per the documentation page for configuring SSL support, does anyone have any thoughts on a probable cause

Re: [JAXRS][IE] subresource locator feature getting confused

2009-02-18 Thread Gabo Manuel
Hi Sergey, I'll wait for the fix. I cannot move the path annotation from the object to the service since it is possible that the object involve has a whole set of other fields. I also tried the following: //an extra method @GET @Path(/search/) @WebMethod public MyObjects

Re: Selecting default media type [...@producemime]

2009-02-18 Thread CXFbanda
Well, typos are the least of concerns as long as the info is useful (which are) :-) Thanks Sergey Beryozkin-2 wrote: Your're welcome, sorry for my regular portion of typos :-) - Original Message - From: CXFbanda cheta...@nortel.com To: users@cxf.apache.org Sent: Wednesday,

Re: [JAXRS][IE] subresource locator feature getting confused

2009-02-18 Thread Sergey Beryozkin
Hi Gabo Ok. If you could have both methods in ObjectService annotated with Path value which is a bit more specific than '/' then it will also fix the problem, ex, URI ending with /search will get getObject() selected while those starting with /search/* will result in a locator being invoked...

Re: Extracting HTTP authorization header

2009-02-18 Thread Gabo Manuel
Hi, That was rather hard to understand... lemme rephrase that: What do you mean by i need to do that for all the resource mappings.? Also, see sample below: @GET @Path(/somepath) public void someMethod( @HeaderParam(Authorization) String authorization) { I hope

Re: Extracting HTTP authorization header

2009-02-18 Thread CXFbanda
Hi Gabo, All I mean is - how can the whole process be done at the class level. As in, instead of having a method parameter, how can I get it in an instance variable (and may be perform some operation on it)? PS: CXF does support injection of HttpHeaders and SecurityContext but none of these can

Re: [JAXRS][IE] subresource locator feature getting confused

2009-02-18 Thread Gabo Manuel
Hi Sergey, Let me clarify that Given: @GET @Path(/search/) @WebMethod public MyObjects getObjects(){ //this is the method that I was invoking... supposedly //using a list wrapper as advised in the user's guide return new MyObjects(new MyObject()); } @GET

Re: Extracting HTTP authorization header

2009-02-18 Thread Sergey Beryozkin
Hi, I think having a custom @Context types supported will be one way to do it : @Context AuthorizationData data; I know Jersey does it but I need to think how something like this can be done in as a trivial way as possible... I'm not sure how else this can be done - I need to think. In

Re: [JAXRS][IE] subresource locator feature getting confused

2009-02-18 Thread Sergey Beryozkin
Hi Gabo I believe in your original post getObjects() had @Path(/), right ? In this last example the IE requests should be fine. What I meant was something like this : @GET @Path(/get) @WebMethod public MyObjects getObjects(){ } @GET @Path(/get/) @WebMethod public Object

Re: Extracting HTTP authorization header

2009-02-18 Thread Sergey Beryozkin
Actually, if you do depend on say Tomcat role definition then you probably can do @Context SecurityContext sc; sc.isUserInRole(...) Cheers, Sergey Hi, I think having a custom @Context types supported will be one way to do it : @Context AuthorizationData data; I know Jersey does it but I

Re: [JAXRS][IE] subresource locator feature getting confused

2009-02-18 Thread Gabo Manuel
Hi Sergey, I believe in your original post getObjects() had @Path(/), right ? Yes. I have three methods all in all / maps to getObject (an individual record) and getObjectProperty (an individual property of the record) /search/ maps to getObjects (a list of records) Either way, I'll get

Re: [JAX-RS] Fault handling

2009-02-18 Thread Gabo Manuel
Hi Sergey, I checked your ExceptionMapper. I'm not able to find that much difference other than I do some email notifications before returning the response object. :'( Would me using the snapshot got anything to do with it? I got lost somewhere after this:

wsdl2java generation error

2009-02-18 Thread XyLus
Hello All, I use mtom_xop.wsdl and wsdl2java to generate code after importing generated code in Eclipse I get one compilation error related to getTestMtomPort(WebServiceFeature... features) to following method in generated TestMtomService class: /** * * @param features * A

Re: Extracting HTTP authorization header

2009-02-18 Thread CXFbanda
Thanks for your replies. Having a custom @Context type is too much of a work for just to avoid extracting the auth data manually. (and I'm not sure how to do that either :-) ) ___ [thinking wild] Life can become so much easier if the framework can allow @HeaderParam along

Re: Extracting HTTP authorization header

2009-02-18 Thread CXFbanda
Sorry for the cluttered message. Here I go again. Thanks for your replies. Having a custom @Context type is too much of a work for just to avoid extracting the auth data manually. (and I'm not sure how to do that either :-) ) ___ [thinking wild] Life can become so much easier

Re: Extracting HTTP authorization header

2009-02-18 Thread Sergey Beryozkin
Hi, Sorry for the cluttered message. Here I go again. Thanks for your replies. Having a custom @Context type is too much of a work for just to avoid extracting the auth data manually. (and I'm not sure how to do that either :-) ) I think I know how we can do it, some vague idea came to me

Another question about nillable=true and minOccurs=0

2009-02-18 Thread adam.galloway
I have a JAX-RS service that Consumes json which maps to a POJO with JAXB. I'm having a hard time finding out how to tell wether a particular field has been sent in with a null value or whether the value of the field was left out of the incoming json. The basic idea is that I have a pojo

Re: [JAX-WS] Setting timeout for Service.create()

2009-02-18 Thread Andrew Clegg
Anybody have any pointers for this one? Thanks :-) 2009/2/14 Andrew Clegg and...@nervechannel.com: Hi, Not sure if this is a CXF question or a JAX-WS API question... Is there any way to set a timeout for javax.xml.ws.Service.create() ? What happens if the operation to retrieve the WSDL from

Re: Cipher suites set on every request

2009-02-18 Thread Daniel Kulp
Just FYI: I can reproduce this. Should have a fix shortly. Dan On Wed February 18 2009 6:47:24 am Graham Cruse wrote: Hi all, Having just upgraded from 2.1.0 to 2.1.4, I have an issue where the cipher suites on a given client connection are reset on every single request, my http conduit

Re: JAX-WS and Simple Frontend CXF for webservices - WSDL interop compliant? use with .NET? what about JSON (with vraptor.org)?

2009-02-18 Thread Daniel Kulp
On Wed February 18 2009 12:26:43 am hanasaki jiji wrote: http://cwiki.apache.org/CXF20DOC/simple-frontend.html http://cwiki.apache.org/CXF20DOC/jax-ws.html In the code first model where the above two CXF approaches dynamically produce the WSDL on deployment, is the WSDL .NET and interop

Re: chunking

2009-02-18 Thread Daniel Kulp
The only real way I can think of is with somethink like wireshark or similar that can capture the raw tcp streams. The other option to try is, instead of configuration, using the programatic API's in the code itself. That way you'll be sure it's set.I'm not sure why the config

Re: duplicated complex type

2009-02-18 Thread Daniel Kulp
This is normal. The best option is to put the PrizeType in a specific namespace for all the services. Thus, when it's code generated, it would always be generated into the same place thus they all share it. Dan On Wed February 18 2009 6:32:32 am gionnyDeep wrote: Hi all I'm newbie

Re: [JAX-WS] Setting timeout for Service.create()

2009-02-18 Thread Daniel Kulp
Right now, the wsdl/schema retrieval just uses the normal java.net.URLConnection stuff. Thus, I THINK there are system properties that can control that. There IS code in place to use our conduits (HTTPConduit) to get the wsdl, but it still tries the URLConnection thing first for right now

Re: Struggling with same class name within different packages for webservice

2009-02-18 Thread Daniel Kulp
On Mon February 16 2009 8:58:52 am sazzadul wrote: Hi, I have same class name within different packages which is causing me a lot trouble and I must have it like that. com.company.to.v1.UserTO com.company.to.v11.UserTO I am using cxf version 2.1.3 and having problem both in server side

Re: wsdl2java generation error

2009-02-18 Thread Daniel Kulp
I'm not sure what the problem is. We generate from that wsdl as part of our builds and the class compiles fine in eclipse. It LOOKS like you might be picking up a jaxws 2.0 api jar instead of a 2.1 version. Check the classpaths and such. Are you using JDK 1.6 update 3 or less?That

One log file per web service ?

2009-02-18 Thread Laurent Perez
Hi I'm using a CXF 2.1.3 client to call several web services, definitions and configurations are done via a Spring context file. I'd like to be able to log WS exchanges in different log files : one file per web service. I managed to log all services calls within a single log file by using

RE: [JAX-WS] Setting timeout for Service.create()

2009-02-18 Thread Dale Ogilvie
We have moved to loading local wsdl from file in WEB-INF/classes to avoid a hung ajp process in tomcat where the wsdl is unavailable. URL wsdlURL = getClass().getClassLoader().getResource(/ourservice.wsdl); Service s = new Service(wsdlURL); Once we have a service, we use the

Re: Another question about nillable=true and minOccurs=0

2009-02-18 Thread henning.jensen
adam.galloway wrote: What I'd like to be able to tell from MyService.myMethod() is whether pojo.getDate() is null because the json had date nulled out or the json did not include the date field. Since Java doesn't have nillable types in the same way that .NET do, I think you would have a