Client time-out not working

2008-04-23 Thread Arul Dhesiaseelan

Hi,

I tried the below code in the client side to set the client timeout as 
suggested in the documentation. I get a NPE when I try to get the 
conduit from client. Am I missing something?


Please clarify.

   JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean();
   proxyFactory.setServiceClass(CustomerService.class);
   proxyFactory.setAddress(serviceURL);
   proxyFactory.setServiceName(serviceName);

   Client client = proxyFactory.getClientFactoryBean().getClient();
   HTTPConduit http = (HTTPConduit) client.getConduit();//NPE occurs here

   HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
   httpClientPolicy.setConnectionTimeout(36000);
   httpClientPolicy.setAllowChunking(false);
   httpClientPolicy.setReceiveTimeout(32000);

Thank you
Arul

Arul Dhesiaseelan wrote:

[EMAIL PROTECTED] wrote:
When debugging our services, sometimes the time spent debugging is 
greater that the time-out period for the client call. How can I 
increase the allowed time-out period?


Thanks...

Chris

_
Scanned by MessageLabs for the Super Flux Friends
_
  

Can you try adding this to your client?

   HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
   httpClientPolicy.setConnectionTimeout(0);
   httpClientPolicy.setAllowChunking(true);
   ((HTTPConduit) 
proxyFactory.getClientFactoryBean().getClient().getConduit()).setClient(httpClientPolicy); 



Cheers,
Arul


_
Scanned by MessageLabs for the Super Flux Friends
_




Re: How to increase Service time-out

2008-04-22 Thread Arul Dhesiaseelan

[EMAIL PROTECTED] wrote:
When debugging our services, sometimes the time spent debugging is greater 
that the time-out period for the client call. How can I increase the 
allowed time-out period?


Thanks...

Chris

_
Scanned by MessageLabs for the Super Flux Friends
_
  

Can you try adding this to your client?

   HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
   httpClientPolicy.setConnectionTimeout(0);
   httpClientPolicy.setAllowChunking(true);
   ((HTTPConduit) 
proxyFactory.getClientFactoryBean().getClient().getConduit()).setClient(httpClientPolicy);


Cheers,
Arul



JAX-RS sample broken in trunk?

2008-04-21 Thread Arul Dhesiaseelan

Hi,

I was using a recent snapshot of 2.1. When I tried to compile the JAX_RS 
sample, it failed. After looking at the source code, I see 
SingletonResourceProvider no longer has a default constructor. I fixed 
the Server.java in the sample as shown below.


   JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
   sf.setResourceClasses(CustomerService.class);
   sf.setResourceProvider(CustomerService.class, new 
SingletonResourceProvider(new CustomerService()));

   sf.setAddress(http://localhost:9000/;);

   sf.create();

After this, when I run the client it fails with the following HTTP-500 
internal error.


client:
[java] Sent HTTP GET request to query customer info
[java] Exception in thread main java.io.IOException: Server 
returned HTTP
response code: 500 for URL: 
http://localhost:9000/customerservice/customers/123


[java] at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Ht

tpURLConnection.java:1241)
[java] at java.net.URL.openStream(URL.java:1009)
[java] at demo.jaxrs.client.Client.main(Client.java:52)
[java] Java Result: 1


This used to work earlier.

Can someone help understand this error?

Thank you
Arul



A simple tutorial using CXF and JPA on NetBeans 6.1

2008-04-18 Thread Arul Dhesiaseelan

http://wiki.netbeans.org/ApacheCXFonNetBeans

This may be useful for beginners.

Cheers,
Arul



Re: CXF 2.1 B2

2008-04-18 Thread Arul Dhesiaseelan

Daniel Kulp wrote:

On Thursday 17 April 2008, Arul Dhesiaseelan wrote:
  

Hi Dan,

Is there a plan to release 2.1 beta2 in the coming days?

Cheers,
Arul



I was actually hoping to do the full 2.1 release today, but getting all 
the incubator stuff stripped out (without breaking everything) has taken 
more work than I thought.  Thus, I expect to have full 2.0.6 and 2.1 
releases ready to be voted on early/mid next week.  

  

Thanks Dan.

This is exciting news for me:)



CXF 2.1 B2

2008-04-17 Thread Arul Dhesiaseelan

Hi Dan,

Is there a plan to release 2.1 beta2 in the coming days?

Cheers,
Arul



Re: Multiple addresses for a service

2008-04-16 Thread Arul Dhesiaseelan

Thanks Williem.


Willem Jiang wrote:
Good suggestion, I will try to address this issue by checking the 
request url with the path separator.

Here is the JIRA[1] for tracing it.

[1]https://issues.apache.org/jira/browse/CXF-1531

Willem
Guillaume Nodet wrote:
I guess we could preserve the existing behavior while still use the 
correct

bean.  We just need to take into account the path separator / and only
select the one that has a full match.

On Mon, Apr 14, 2008 at 4:15 AM, Willem Jiang [EMAIL PROTECTED]
wrote:

 
That is because CXF support to map a Http request to a soap request, 
such
as 
http://localhost:9000/SoapContext/SoapPort/greetMe/requestType/cxf;.
To implement this by default , CXF use the match the first 
policy(call the

String.startWith()) to lookup the proper destination.

With these policy http://localhost:8080/MyThingInstance?wsdl; and 
http://localhost:8080/MyThingInstance2?wsdl; requests will be 
dispatched
destination which address is MyThingInstance. So you always get the 
same

WSDL with these two URL.

If you want to get the different wsdl definitions from Address1 and
Address2 , you need to avoid the Address2 starting with Address1.

Willem


Arul Dhesiaseelan wrote:

   

Thanks Dan.

But when I implement as shown below.

  MyThing implementor = new MyThingImpl();
  String address = http://localhost:8080/MyThingInstance;
  javax.xml.ws.Endpoint jaxwsEndpoint = Endpoint.publish(address,
implementor); MyThing implementor2 = new MyThingImpl();
  String address2 = http://localhost:8080/MyThingInstance2;
  javax.xml.ws.Endpoint jaxwsEndpoint = Endpoint.publish(address2,
implementor2);  I tried to access
http://localhost:8080/MyThingInstance?wsdl and
http://localhost:8080/MyThingInstance2?wsdl. Both the WSDL has the 
same

service definition.

I do not see MyThingInstance2 anywhere in the WSDL.

Am I missing something?

Best regards
Arul

Daniel Kulp wrote:

 

On Wednesday 09 April 2008, Arul Dhesiaseelan wrote:


   

Daniel Kulp wrote:


 

On Wednesday 09 April 2008, Benson Margulies wrote:


   

A bit of googling got me nowhere here.

I want to publish a service on both a http: address and a local:
address. Two jaxws:endpoints? Can they point to the same
#implementation bean?


  

Yep.   It's the same as if you did:

MyThing thing = new MyThingImpl();
Endpoint.publish(address1, thing);
Endpoint.publish(address2, thing);




Dan,

Does this work?

MyThing thing1 = new MyThingImpl();
MyThing thing2 = new MyThingImpl();

Endpoint.publish(address1, thing1);
Endpoint.publish(address2, thing2);

When I invoke the service at address1, it should invoke thing1 and
address2 should invoke thing2.

Thanks!
Arul


  

Yep.   That's exactly how it's supposed to work.






  



  



_
Scanned by MessageLabs for the Super Flux Friends
_




Re: Fwd: CXF has graduated!

2008-04-16 Thread Arul Dhesiaseelan

Congratulations Dan and team!

Daniel Kulp wrote:
Forwarding this to cxf-user as it's as important for them as well. 


Dan

--  Forwarded Message  --

Subject: CXF has graduated!
Date: Wednesday 16 April 2008
From: Jim Jagielski [EMAIL PROTECTED]
To: [EMAIL PROTECTED]

I am happy and proud to announce that at this month's board
meeting, we have approved CXF's graduation out of the Incubator
and as a TLP. Dan Kulp was approved as VP of the PMC.

Congrats to one and all!

---

  






WSS and JAAS

2008-04-14 Thread Arul Dhesiaseelan

Hello CXF gurus,

I have a question related to using WSS to delegate auth calls to JAAS.
I obtain the user name and password at run-time and send it in a Web 
Services Security (WSS) UsernameToken to the server and on the server 
side I would like to use JAAS authentication to authenticate the user 
name and password in the server application.


How can I invoke a JAAS module from within the server side callback 
handler? Does CXF support any built in interceptors to achieve this?


Thanks!
Arul



Re: Multiple addresses for a service

2008-04-14 Thread Arul Dhesiaseelan
So my service names should start with a unique name like... 1Address, 
2Address, 3Address.


Is this a limitation of this implementation?

Thanks!
Arul

Willem Jiang wrote:
That is because CXF support to map a Http request to a soap request, 
such as 
http://localhost:9000/SoapContext/SoapPort/greetMe/requestType/cxf;.
To implement this by default , CXF use the match the first policy(call 
the String.startWith()) to lookup the proper destination.


With these policy http://localhost:8080/MyThingInstance?wsdl; and 
http://localhost:8080/MyThingInstance2?wsdl; requests will be 
dispatched destination which address is MyThingInstance. So you always 
get the same WSDL with these two URL.


If you want to get the different wsdl definitions from Address1 and 
Address2 , you need to avoid the Address2 starting with Address1.


Willem

Arul Dhesiaseelan wrote:

Thanks Dan.

But when I implement as shown below.

   MyThing implementor = new MyThingImpl();
   String address = http://localhost:8080/MyThingInstance;
   javax.xml.ws.Endpoint jaxwsEndpoint = 
Endpoint.publish(address, implementor); MyThing 
implementor2 = new MyThingImpl();

   String address2 = http://localhost:8080/MyThingInstance2;
   javax.xml.ws.Endpoint jaxwsEndpoint = 
Endpoint.publish(address2, implementor2);  I tried to access 
http://localhost:8080/MyThingInstance?wsdl and 
http://localhost:8080/MyThingInstance2?wsdl. Both the WSDL has the 
same service definition.


I do not see MyThingInstance2 anywhere in the WSDL.

Am I missing something?

Best regards
Arul

Daniel Kulp wrote:

On Wednesday 09 April 2008, Arul Dhesiaseelan wrote:
 

Daniel Kulp wrote:
  

On Wednesday 09 April 2008, Benson Margulies wrote:


A bit of googling got me nowhere here.

I want to publish a service on both a http: address and a local:
address. Two jaxws:endpoints? Can they point to the same
#implementation bean?


Yep.   It's the same as if you did:

MyThing thing = new MyThingImpl();
Endpoint.publish(address1, thing);
Endpoint.publish(address2, thing);
  

Dan,

Does this work?

MyThing thing1 = new MyThingImpl();
MyThing thing2 = new MyThingImpl();

Endpoint.publish(address1, thing1);
Endpoint.publish(address2, thing2);

When I invoke the service at address1, it should invoke thing1 and
address2 should invoke thing2.

Thanks!
Arul




Yep.   That's exactly how it's supposed to work.

  






_
Scanned by MessageLabs for the Super Flux Friends
_




EndpointRegistry/ServerRegistry usage in CXF

2008-04-09 Thread Arul Dhesiaseelan

Hello,

I see Celtix had EndpointRegistry in its 1.0 version. What is the 
equivalent functionality in CXF? After seeing the CXF sources, I could 
see ServerRegistry is looking similar to the Celtix interface.


Can ServerRegistry be used to register/unregister JAX-WS endpoints 
dynamically? So that, I could run multiple instances of the same service 
in single JVM but with named endpoints as shown below.


http://localhost:8080/CustomerServiceInstance1
http://localhost:8080/CustomerServiceInstance2
http://localhost:8080/CustomerServiceInstance3

Can someone help me understand if this is possible in CXF?

Thank you
Arul


Arul Dhesiaseelan wrote:

Can some one help me out?

Is there an EndPointRegistry in CXF where I can dynamically 
register/unregister JAX-WS endpoints running within the same server? 
Or, is there any other way to achieve this functionality using 
JaxWsProxyFactoryBean?


I appreciate your directions.

Thanks!
Arul

Arul Dhesiaseelan wrote:

Dan,

I was able to create the service dynamically. I have another related 
question.


Is it possible to create one instance of JaxWsProxyFactoryBean server 
and then add multiple endpoints to this instance dynamically? In 
essence, I would like to run multiple instances of the same web 
service in the same JVM, but with named service end points.


Thanks for your continued support.

Cheers!
Arul






Re: Multiple addresses for a service

2008-04-09 Thread Arul Dhesiaseelan

Daniel Kulp wrote:

On Wednesday 09 April 2008, Benson Margulies wrote:
  

A bit of googling got me nowhere here.

I want to publish a service on both a http: address and a local:
address. Two jaxws:endpoints? Can they point to the same
#implementation bean?



Yep.   It's the same as if you did:

MyThing thing = new MyThingImpl();
Endpoint.publish(address1, thing);
Endpoint.publish(address2, thing);




  

Dan,

Does this work?

MyThing thing1 = new MyThingImpl();
MyThing thing2 = new MyThingImpl();

Endpoint.publish(address1, thing1);
Endpoint.publish(address2, thing2);

When I invoke the service at address1, it should invoke thing1 and 
address2 should invoke thing2.


Thanks!
Arul



Re: Multiple addresses for a service

2008-04-09 Thread Arul Dhesiaseelan

Thanks Dan.

But when I implement as shown below.

   MyThing implementor = new MyThingImpl();
   String address = http://localhost:8080/MyThingInstance;
   javax.xml.ws.Endpoint jaxwsEndpoint = Endpoint.publish(address, 
implementor);   


   MyThing implementor2 = new MyThingImpl();
   String address2 = http://localhost:8080/MyThingInstance2;
   javax.xml.ws.Endpoint jaxwsEndpoint = Endpoint.publish(address2, 
implementor2);   

I tried to access http://localhost:8080/MyThingInstance?wsdl and 
http://localhost:8080/MyThingInstance2?wsdl. Both the WSDL has the same 
service definition.


I do not see MyThingInstance2 anywhere in the WSDL.

Am I missing something?

Best regards
Arul

Daniel Kulp wrote:

On Wednesday 09 April 2008, Arul Dhesiaseelan wrote:
  

Daniel Kulp wrote:


On Wednesday 09 April 2008, Benson Margulies wrote:
  

A bit of googling got me nowhere here.

I want to publish a service on both a http: address and a local:
address. Two jaxws:endpoints? Can they point to the same
#implementation bean?


Yep.   It's the same as if you did:

MyThing thing = new MyThingImpl();
Endpoint.publish(address1, thing);
Endpoint.publish(address2, thing);
  

Dan,

Does this work?

MyThing thing1 = new MyThingImpl();
MyThing thing2 = new MyThingImpl();

Endpoint.publish(address1, thing1);
Endpoint.publish(address2, thing2);

When I invoke the service at address1, it should invoke thing1 and
address2 should invoke thing2.

Thanks!
Arul




Yep.   That's exactly how it's supposed to work.

  




Re: Dynamic Client/Server Side Configuration using API for Java First Spring WS

2008-04-04 Thread Arul Dhesiaseelan

Dan,

I was able to create the service dynamically. I have another related 
question.


Is it possible to create one instance of JaxWsProxyFactoryBean server 
and then add multiple endpoints to this instance dynamically? In 
essence, I would like to run multiple instances of the same web service 
in the same JVM, but with named service end points.


Thanks for your continued support.

Cheers!
Arul

Daniel Kulp wrote:
The jaxws:endpoint element is just configuring the actual CXF 
implementation of the jaxws Endpoint interface:

org.apache.cxf.jaxws.EndpointImpl

Dan



On Thursday 03 April 2008, Arul Dhesiaseelan wrote:
  

Thanks Dan. Client worked just fine with your suggestion.

Here is my service bean configuration. How do I dynamically create an
endpoint shown in service-beans.xml? I am embedding jetty to deploy
this endpoint.

?xml version=1.0 encoding=UTF-8?

beans xmlns=http://www.springframework.org/schema/beans;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:context=http://www.springframework.org/schema/context;
xmlns:cxf=http://cxf.apache.org/core;
xmlns:jaxws=http://cxf.apache.org/jaxws;
xsi:schemaLocation=http://www.springframework.org/schema/beans
   
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd

http://www.springframework.org/schema/context
   
http://www.springframework.org/schema/context/spring-context-2.5.xsd

http://cxf.apache.org/core
http://cxf.apache.org/schemas/core.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd;

  !-- Load CXF modules from cxf.jar --
  import resource=classpath:META-INF/cxf/cxf.xml /
import resource=classpath:META-INF/cxf/cxf-extension-soap.xml
/ import resource=classpath:META-INF/cxf/cxf-servlet.xml /

  jaxws:endpoint
  id=engine
  implementor=demo.services.CustomerServiceImpl
  address=/CustomerService /

/beans

**Thanks!

Arul

Daniel Kulp wrote:


On Thursday 03 April 2008, Arul Dhesiaseelan wrote:
  

Hello!

I am developing a Java first spring based CXF services. Is there a
way to dynamically create services and clients at runtime rather
using service-beans.xml and client-beans.xml?
I am embedding Jetty as my server which will host my CXF services.

Can someone on this group suggest me the approach?

Thanks!
Arul


Basically, the spring things are just configuring instances of
various factory beans.   Thus, you can easily just configure the
same factory beans via API's calls.   For example, jaxws:server is
just configuring a JaxWsServerFactoryBean.   jaxws:client is
configuring a
JaxWsProxyFactoryBean instance.




Dynamic Client/Server Side Configuration using API for Java First Spring WS

2008-04-03 Thread Arul Dhesiaseelan

Hello!

I am developing a Java first spring based CXF services. Is there a way 
to dynamically create services and clients at runtime rather using 
service-beans.xml and client-beans.xml?

I am embedding Jetty as my server which will host my CXF services.

Can someone on this group suggest me the approach?

Thanks!
Arul



Re: Dynamic Client/Server Side Configuration using API for Java First Spring WS

2008-04-03 Thread Arul Dhesiaseelan

Thanks Dan. Client worked just fine with your suggestion.

Here is my service bean configuration. How do I dynamically create an 
endpoint shown in service-beans.xml? I am embedding jetty to deploy this 
endpoint.


?xml version=1.0 encoding=UTF-8?

beans xmlns=http://www.springframework.org/schema/beans;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xmlns:context=http://www.springframework.org/schema/context;
   xmlns:cxf=http://cxf.apache.org/core;
   xmlns:jaxws=http://cxf.apache.org/jaxws;
   xsi:schemaLocation=http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
   http://www.springframework.org/schema/context
   http://www.springframework.org/schema/context/spring-context-2.5.xsd
   http://cxf.apache.org/core
   http://cxf.apache.org/schemas/core.xsd
   http://cxf.apache.org/jaxws
   http://cxf.apache.org/schemas/jaxws.xsd;

 !-- Load CXF modules from cxf.jar --
 import resource=classpath:META-INF/cxf/cxf.xml /
   import resource=classpath:META-INF/cxf/cxf-extension-soap.xml /
   import resource=classpath:META-INF/cxf/cxf-servlet.xml /

 jaxws:endpoint
 id=engine
 implementor=demo.services.CustomerServiceImpl
 address=/CustomerService /

/beans

**Thanks!

Arul

Daniel Kulp wrote:

On Thursday 03 April 2008, Arul Dhesiaseelan wrote:
  

Hello!

I am developing a Java first spring based CXF services. Is there a way
to dynamically create services and clients at runtime rather using
service-beans.xml and client-beans.xml?
I am embedding Jetty as my server which will host my CXF services.

Can someone on this group suggest me the approach?

Thanks!
Arul



Basically, the spring things are just configuring instances of various 
factory beans.   Thus, you can easily just configure the same factory 
beans via API's calls.   For example, jaxws:server is just configuring a 
JaxWsServerFactoryBean.   jaxws:client is configuring a 
JaxWsProxyFactoryBean instance.   



  






Re: REST-JS

2008-03-21 Thread Arul Dhesiaseelan
I was exactly looking for something like this on the rest endpoint. I am 
using JAXRSServerFactoryBean for deploying the rest endpoint.


Thanks!
Arul

Benson Margulies wrote:

Sergey,

I implemented ?js, but it generates Soap clients, not REST clients. have a
look at rt/javascript.

--benson


On Fri, Mar 21, 2008 at 6:44 AM, Sergey Beryozkin [EMAIL PROTECTED]
wrote:

  

Hi Arul, Benson

yes, that would be a rather simple thing to do, and in fact you'd likely
get this JS code (or indeed code in your language of choice) generated for
live services, as we've introduced SystemQueryHandlers (not sure it's a good
name though) which are supposed to handle different types of query
extensions and possibly let the invocation to proceed to the actual object
afterwards. For example, at the moment, one can debug a live service and
check on what format it can produce, for example, if it's an Atom-enbaled
service then you can try ?_contentType=json. In this case the only thing the
handler does is to update the Accept headers on the message.

Likewise, one should be able to do ?_js or ?_lang=js.

That said, supporting extensions like _js has not been prioritized. That
would be a cool thing to do so if someone in the community is interested
then the input would be welcomed.

Cheers, Sergey




There is no existing code to do this, if I follow your definition of a
'resource object'. It would be only a few days of work to add to the
existing Javascript generator to add this, I bet. If you post an example
  

of


what you'd like to see generated that might clarify. I for one wouldn't
  

be


in a position to tackle the job if I've understood it correctly.


  

Here is my scenario. I have a JAX-RS CXF service. I have a web
application which consumes this service. Is it possible to generate the
REST resources as JavaScript so that the web app can use it directly
when doing a POST (ex: construct the resource object)?






IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland





__
Scanned by MessageLabs
__
  



--
Arul Dhesiaseelan, Flux Development

+1 (406) 656-7398
www.fluxcorp.com

Flux - Java Job Scheduler. File Transfer. Workflow. BPM. 





REST-JS

2008-03-20 Thread Arul Dhesiaseelan

Hi,

Currently CXF supports Java2JS for simple or JAX-WS front ends. Does CXF 
support JAX-RS front end (REST-JavaScript) too?


Thanks!
Arul



javax.xml.ws.WebFault

2008-03-19 Thread Arul Dhesiaseelan

Hi,

Can I use @WebFault annotation for wrapping exceptions and send them as 
faults in JAX-RS services?


Thank you
Arul



JAX-RS sample in 2.1 trunk has wierd behavior on GET

2008-03-06 Thread Arul Dhesiaseelan

Hi,

I am trying to run the JAX-RS sample bundled in the 2.1 trunk. I am trying to 
add /customers/ GET which returns all the customers under that resource. But, I 
see some wierd behavior when I try to access from the browser. I added 3 
customers in the init() method which populates the map once the server is 
started.
Both the GET calls to /customers and /customers/1 returns 3 customer instances. 
Here is my sample lookslike:

   @GET
   @Path(/customers/)
   public Customers getCustomers() {
   System.out.println(invoking getCustomers);
   Customers e = new Customers();
   e.setCustomer(customers.values());
   return e;
   }

   @GET
   @Path(/customers/{id}/)
   public Customer getCustomer(@UriParam(id) String id) {
   System.out.println(invoking getCustomer, Customer id is:  + id);
   long idNumber = Long.parseLong(id);
   Customer c = customers.get(idNumber);
   return c;
   }


Am I missing something?

Please clarify.

Regards
Arul




Re: JAX-RS sample in 2.1 trunk has wierd behavior on GET

2008-03-06 Thread Arul Dhesiaseelan

Awesome. Would this be part of 2.0.5 release scheduled for Mar 15?

Thanks so much for your continued support.

Regards
Arul

Sergey Beryozkin wrote:

Hi Arul,

No, I think there's a bug in CXF.


   @GET
   @Path(/customers/)
   public Customers getCustomers() {


should be invoked on /customers

and


   @GET
   @Path(/customers/{id})
   public Customer getCustomer(@UriParam(id) String id) {


should be invoked on /customers/1. Thanks for identifying this issue. 
we'll fix it.
Also, the demos will be updated shortly for them to get compiled with 
0.5.


Cheers, Sergey


Yes I did upgrade the demo to 0.5 version. The only change I did to 
the demo is added a new GET operation for retrieving all customers.
Ok I think I found the issue. I changed the Path to /listcustomers 
instead of /customers. This behaved as expected.


Can you confirm if this is correct?

Thanks!
Arul

Sergey Beryozkin wrote:

Hi

I haven't updated the demos after CXF JAX-RS has been upgraded to 
0.5 version of jsr-311 api as the 0.6 version is already available 
and it will break the user code again. Tomorrow a 0.6 version should 
become publicly available in the java.net maven repository and the 
demo will be updated in sync with the upgrade to 0.6.
That said, an upgrade to 0.6 may take few days, so we'll do an 
upgrade to 0.5 now. Sorry about the hassle...


Have you updated the demo yourself to make it compile with 0.5 ?

Cheers, Sergey




Hi,

I am trying to run the JAX-RS sample bundled in the 2.1 trunk. I am 
trying to add /customers/ GET which returns all the customers under 
that resource. But, I see some wierd behavior when I try to access 
from the browser. I added 3 customers in the init() method which 
populates the map once the server is started.
Both the GET calls to /customers and /customers/1 returns 3 
customer instances. Here is my sample lookslike:


   @GET
   @Path(/customers/)
   public Customers getCustomers() {
   System.out.println(invoking getCustomers);
   Customers e = new Customers();
   e.setCustomer(customers.values());
   return e;
   }

   @GET
   @Path(/customers/{id}/)
   public Customer getCustomer(@UriParam(id) String id) {
   System.out.println(invoking getCustomer, Customer id 
is:  + id);

   long idNumber = Long.parseLong(id);
   Customer c = customers.get(idNumber);
   return c;
   }


Am I missing something?

Please clarify.

Regards
Arul





IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, 
Ireland






--
Arul Dhesiaseelan, Flux Development

+1 (406) 656-7398
www.fluxcorp.com

Flux - Java Job Scheduler. File Transfer. Workflow. BPM. 



IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland




--
Arul Dhesiaseelan, Flux Development

+1 (406) 656-7398
www.fluxcorp.com

Flux - Java Job Scheduler. File Transfer. Workflow. BPM. 





Re: JAX-RS API version change

2008-02-25 Thread Arul Dhesiaseelan

Sergey Beryozkin wrote:

Hi

This update is in place now, so if you're using CXF JAX-RS then please give it 
a try.

Please note that a newer 0.6 version is already available, and from the user's 
perspective,
upgrading to 0.6 will mean that existing @UriParam annotations will need to be 
replaced with
@PathParam ones. It seems like the only change in 0.6 which can affect the 
existing user's code.
0.6 jar is not available on Maven yet, so this upgrade will be done a bit later

Cheers, Sergey



- Original Message - 
From: Sergey Beryozkin [EMAIL PROTECTED]

To: cxf-user@incubator.apache.org
Sent: Friday, February 15, 2008 4:55 PM
Subject: JAX-RS API version change


Hi

Currently, the CXF JAX-RS implementation depend upon a 0.4 version of the 
jaxrs-api.
I'm looking into upgrading it to support a latest 0.5 version.

There're some changes from 0.4 to 0.5 which would affect users.
The following is the list of what has changed between 0.4 and 0.5 which will or 
may have an effect on the
current JAX-RS applications built on top of CXF :

1. @HttpMethod annotation is no longer supported, instead
@GET, @POST, @PUT and @DELETE annotations will be used
2. @UriTemplate is not longer supported, @Path is used instead

3. EntityProvider interface has gone too, instead it has been split into two 
interfaces,
MessageBodyReader and MessageBodyWriter. If you provide custom providers and 
you'd like to have the same instance to handle both reads and writes, then 
you'd have to have its class implementing both interfaces.

Existing spring configuration for injecting custom providers won't get changed, 
the runtime will sort difrerent types of handlers
into the right lists itself...

Cheers, Sergey





IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland


IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

  

This is cool. Did you update the JAX-RS sample too?
I do have a question. 0.6 started implementing a REST client API. Does 
CXF plan to use this Client API or do you suggesting using the HTTP 
Client used in samples?


Thank you
Arul




DynamicClientFactory - REST equivalent

2008-02-21 Thread Arul Dhesiaseelan

Hello,

How do I dynamically invoke REST end points using CXF APIs? I have seen 
this working for web services using DynamicClientFactory.


Any pointer would be appreciated.

Thank you
Arul