Hi, how do you invoke upon it ?
I've tried 'mvn -Pserver' and 'ant server' and had no problems running 'mvn -Pclient' against both endpoints and from Firefox and
curl.
However, found a bizarre issue when invoking from IE, given the following
Accept :
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/msword, application/vnd.ms-powerpoint,
application/vnd.ms-excel, application/x-shockwave-flash, application/x-silverlight, application/x-ms-application,
application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */*
CXF returns :
Content-Type: application/xaml+xml
Date: Wed, 17 Feb 2010 15:48:16 GMT
Content-Length: 105
Server: Jetty(6.1.21)
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><Customer><id>123</id><name>John</name></Customer>
Which causes IE to assume it's XAML and fail as a result.
Now, the demo itself uses no @Produces("application/xml"), so the most compatible mediaType (application/xaml+xml) is recognized by
JAXBElementProvider (as per the JAXRS spec which requires the support for application/*+xml)...You can protect the endpoints by
explicitly registering a jaxb provider and overriding its produces types and removing application/xml+*...
cheers, Sergey
----- Original Message -----
From: "Ian Upright" <[email protected]>
To: <[email protected]>
Sent: Wednesday, February 17, 2010 8:49 AM
Subject: Apache CXF 2.2.6 with rest service
Hello..
I'm using Apache CXF 2.2.6 on Windows.
I can compile the examples such as aegis with "ant server", and everything
works great, and I can use the service perfectly with soapUI, etc.
I can compile and run "ant server" with the jax_rs\basic example, and it
starts up fine saying "[java] Server ready..."
However, when I hit the server with a URL like:
http://localhost:9000/customerservice/customers/123
It responds with:
HTTP ERROR: 404
Problem accessing /customerservice/customers/123. Reason: NOT_FOUND
Seeing as the other samples work perfectly, but the jas_rx sample does not..
what could be wrong? What am I missing?
Thanks, Ian