(CXF-3170) NullPointerException in StaxUtils.java:961

2011-01-20 Thread manojbvm
Hi All, I'm new to CXF and was trying to use ws-security standards like UsernameToken, Encryption, Signature and etc with CXF services. CXF 2.3.1 works just fine with Username Token. I was trying a sample as provided in http://www.jroller.com/gmazza/entry/cxf_x509_profile for certificate encryp

Re: How to convert response input stream to java object

2011-01-20 Thread Glen Mazza
I think ResponseReader, recently introduced in CXF 2.3.1, is your friend. If you go to the Talend Service Factory (CXF wrap) Examples[1], under examples/jaxrs-advanced/client//RESTClient.java, method useSimpleProxy() has it. Glen [1] http://www.talend.com/resources/documentation.php#SF

How to convert response input stream to java object

2011-01-20 Thread Dan King
Hi all, Up until now I've had the web client return the desired java object rather then a Response object, i.e. Object target = client.type("application/json").accept("application/json").get(Target.class) But now I want to check the response and then get the entity/message body, but I'm stuck

Cannot Cast exception while unmarshalling

2011-01-20 Thread Singh, Hardeep
Hi I am using the Apache CXF for consuming rest services. I am getting the Cannot cast exception. Any idea why we get this exception and way to fix this? Regards Hardeep The beans that I am trying to unmarshall look like this. @XmlAccessorType(XmlAccessType.FIELD) @XmlRootElement(name = "setti

Re: REST Annotation question

2011-01-20 Thread Sergey Beryozkin
As Glen said, the framework will throw WebApplicationExceptions with the 405 status in case of no resource method matching a given HTTP verb has been found, I only proposed to catch these exceptions with a custom exception mapper if you'd like to customize the error response, ex, change the error s

Re: REST Annotation question

2011-01-20 Thread Sergey Beryozkin
Hi On Thu, Jan 20, 2011 at 6:01 PM, Eric MacAdie wrote: > I have a few web services using the CXF REST API. For each I really only > take an action for the @GET and @POST commands. I do have methods for the > @PUT, @DELETE and @HEAD actions, but all I do is return a message saying > that I do no

Re: IllegalAnnotationExceptions when running Restful Http Binding Demo

2011-01-20 Thread Sergey Beryozkin
Hi On Thu, Jan 20, 2011 at 2:56 PM, myerscb wrote: > > hi, > > I am more than willing to migrate to jax-rs. In our requests to the web > services we will be passing multiple parameters (at least as of now we > will). Things like a data source, userid, request, request parameters, and > possibl

share data types between services

2011-01-20 Thread Siva krishna
Hello Everybody, I am new to this forum as well as to the Webservice world. I have a problem with code first webservice implementation with CXF. Please bear with me if the solution is so obvious. We already have a client server application - both client and server in java and server is backed by

Re: REST Annotation question

2011-01-20 Thread Glen Mazza
I think you should just remove those unused methods, and let the framework return whatever JAX-RS defined exceptions that occur when a client makes a call using such unsupported HTTP actions. Talend has several new JAX-RS/REST examples[1] (I'd look at the intro and advanced jaxrs samples) that

REST Annotation question

2011-01-20 Thread Eric MacAdie
I have a few web services using the CXF REST API. For each I really only take an action for the @GET and @POST commands. I do have methods for the @PUT, @DELETE and @HEAD actions, but all I do is return a message saying that I do not really handle those methods. Is there a default annotation for al

Re: Problem with WSS4J and CXF

2011-01-20 Thread Daniel Kulp
On Thursday 20 January 2011 12:06:18 pm Glen Mazza wrote: > To clarify your question, the callback handlers are both client-side, > you're not concerned about the service-side here, correct? i.e., one > CallbackHandler to specify the end user's (or client's) username and the > second to provide th

Re: Problem with WSS4J and CXF

2011-01-20 Thread Glen Mazza
To clarify your question, the callback handlers are both client-side, you're not concerned about the service-side here, correct? i.e., one CallbackHandler to specify the end user's (or client's) username and the second to provide the client's private key password (for the signature), correct?

DOSGI remote web service

2011-01-20 Thread phper...@gmail.com
When I use use a remote url in the osgi.remote.configuration.pojo.address property of remote-service.xml , DOSGI effectively creates the proxy: _ objectClass = org.energetic.webservices.bd.HardwareMonitor org.apache.cxf.remote.dsw.cl

Re: @Oneway annotation added to method while method throw an exception.

2011-01-20 Thread Nordine Boussedra
Indeed wsdl2java precise that the WSDL is not valid. Many thanks for the help ! Daniel Kulp a écrit : It's technically not a valid wsdl. The wsdl2java should likely just reject it with an error. If you check the spec at: http://www.w3.org/TR/wsdl#_request-response The two that we support

Re: @Oneway annotation added to method while method throw an exception.

2011-01-20 Thread Daniel Kulp
It's technically not a valid wsdl. The wsdl2java should likely just reject it with an error. If you check the spec at: http://www.w3.org/TR/wsdl#_request-response The two that we support are: 2.4.1 - One-way Operation These will have an input and no output or faults 2.4.2 Request-response O

Re: IllegalAnnotationExceptions when running Restful Http Binding Demo

2011-01-20 Thread myerscb
hi, I am more than willing to migrate to jax-rs. In our requests to the web services we will be passing multiple parameters (at least as of now we will). Things like a data source, userid, request, request parameters, and possibly a password. We are still architecting the project so nothing is

Re: IllegalAnnotationExceptions when running Restful Http Binding Demo

2011-01-20 Thread Sergey Beryozkin
Hi On Thu, Jan 20, 2011 at 2:16 PM, myerscb wrote: > > Hi, > > Thanks for your reply. > > I am using the Http Binding because we would like to have SOAP and REST > with > JSON. As far as I can tell that is the only way to achieve that. If that > is not the case I will be happy to change it. >

Re: IllegalAnnotationExceptions when running Restful Http Binding Demo

2011-01-20 Thread myerscb
Hi, Thanks for your reply. I am using the Http Binding because we would like to have SOAP and REST with JSON. As far as I can tell that is the only way to achieve that. If that is not the case I will be happy to change it. I am new to java web services. I have been mainly writing java stan

Re: IllegalAnnotationExceptions when running Restful Http Binding Demo

2011-01-20 Thread Sergey Beryozkin
Hi Is there any particular reason why you prefer the legacy CXF HttpBinding to the JAX-RS one ? It has not been supported for a long time with only very occasional commits going in to fix some of the problems for users already using it. Cheers, Sergey On Thu, Jan 20, 2011 at 2:05 PM, myerscb wr

IllegalAnnotationExceptions when running Restful Http Binding Demo

2011-01-20 Thread myerscb
Hi, I have cxf 2.3.1 running inside of eclipse helios with java jdk 1.6.0_23. I changed the client main method of the Restful Http Binding Demo to test the SOAP interface. Here is the code: private static final QName serviceName = new QName("http://demo.restful.server";, "CustomerServ

Re: [JAX-RS] JSON Marshaling error throws 500 but I want 400

2011-01-20 Thread Sergey Beryozkin
Hi On Thu, Jan 20, 2011 at 1:52 PM, Trevor Bernard wrote: > Hi, > > When posting content to a JAX-RS end point, if the JSON serialization > fails, I want the to return a bad request but the framework throws a > 500 internal server error. > > I briefly evaluated ExceptionMappers but I couldn't get

[JAX-RS] JSON Marshaling error throws 500 but I want 400

2011-01-20 Thread Trevor Bernard
Hi, When posting content to a JAX-RS end point, if the JSON serialization fails, I want the to return a bad request but the framework throws a 500 internal server error. I briefly evaluated ExceptionMappers but I couldn't get the functionality I wanted. Contrived examples: @POST @Consumes(Media

Re: Problem with WSS4J and CXF

2011-01-20 Thread srinivas thallapalli
Thanks alot... I have a scenario for using ws-security combination of UsernameToken and Signature with different alias of signature from user of Usernametoken and different passwords for each. And I want to provide passwords using callback classes, How can I provide two callback classes one for U

sharing data types between webservices

2011-01-20 Thread Siva krishna
Hello Everybody, I am new to this forum as well as to the Webservice world. I have a problem with code first webservice implementation with CXF. Please bear with me if the solution is so obvious. We already have a client server application - both client and server in java and server is backed by

Re: @Oneway annotation added to method while method throw an exception.

2011-01-20 Thread Nordine Boussedra
Sorry for the previous mail, i didnt say hello :) So hello folks, I just have seen in the code of CXF in the org.apache.cxf.jaxws.handler.AbstractJAXWSHandlerInterceptor.setupBindingOperationInfo(org.apache.cxf.message.Exchange, java.lang.Object) method that a Exchange is considered OneWay if

@Oneway annotation added to method while method throw an exception.

2011-01-20 Thread Nordine Boussedra
We use wsdl2java (CXF 2.3.1) to generate classes from a wsdl. Here is the definition of the operation in the PortType: message="tns:creerCongeSansRetourRequest" /> message="tns:UtilisateurInexistantException"> Binding:

Re: CXF without internet connection?

2011-01-20 Thread Freeman Fang
Hi, The rewritePrefix path is relative to which folder you put jax-ws- catalog.xml in you put jax-ws-catalog.xml in META-INF, then your current configuration means you put ws-addr.xsd in META-INF/w3/2006/03/addressing/ws-addr.xsd Is it what you want? Freeman On 2011-1-20, at 下午5:44, meteor

Re: JAX-RS Attachments size limit and temp folder

2011-01-20 Thread Sergey Beryozkin
Hi Ivan On Thu, Jan 20, 2011 at 10:24 AM, Ivan Vitoria Sanchez < ivito...@grupoica.com> wrote: > Hi Segey, > > Please see my comments below > > (I really appreciate your effort) > > Ivan > > > > Does it mean that i can not use these jax-rs properties to get a > generated > > JAXB XML with a Bas

Re: Questions

2011-01-20 Thread Sergey Beryozkin
Anthony, by the way, can you give me a favor and send the WSDL document to me, offline if you prefer, please update it as needed. I'd like to update the external model support so that it can refer to WSDL(1.1/2.0) bindings, something like What I'm thinking is that if you use wsdl-to-java to g

Re: [JAX-RS] difference b/w service class and resource class

2011-01-20 Thread Sergey Beryozkin
Hi Rice On Thu, Jan 20, 2011 at 8:15 AM, Rice Yeh wrote: > Hi, > In JAXRSServerFactoryBean, it has methods setServiceClass(...) and > setResourceClasses(...). I just wonder what is the difference b/w service > classes and resource classes? In the JAX-RS spec, I can not find the > definition of

RE: Unable to set Soap Version to 1.2

2011-01-20 Thread MARTELLI Julien
Yes you're right this solutin works too. And actually that's the one I'm gonna use because I don't want to use the WSDL. Thanks again for your help! -Message d'origine- De : Daniel Kulp [mailto:dk...@apache.org] Envoyé : mercredi 19 janvier 2011 21:48 À : users@cxf.apache.org Cc : MARTEL

RE: JAX-RS Attachments size limit and temp folder

2011-01-20 Thread Ivan Vitoria Sanchez
Hi Segey, Please see my comments below (I really appreciate your effort) Ivan -Mensaje original- De: Sergey Beryozkin [mailto:sberyoz...@gmail.com] Enviado el: miércoles, 19 de enero de 2011 19:07 Para: users@cxf.apache.org Asunto: Re: JAX-RS Attachments size limit and temp folder Hi

Re: CXF without internet connection?

2011-01-20 Thread meteora28
Hello there again! Thank you very much for your answers. I tried to write a catalog file "catalog.xml". But it doesn't work. Can anybody tell me why? http://www.w3.org/"; rewritePrefix="w3/"/> -- View this message in context: http://cxf.547215.n5.nabble.com/CXF-without-internet-conn

[JAX-RS] difference b/w service class and resource class

2011-01-20 Thread Rice Yeh
Hi, In JAXRSServerFactoryBean, it has methods setServiceClass(...) and setResourceClasses(...). I just wonder what is the difference b/w service classes and resource classes? In the JAX-RS spec, I can not find the definition of service class. Rice