cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tong, Gary \(FID\)" <>
Subject CXF dual-servlet issues
Date Fri, 20 Feb 2009 18:59:05 GMT
Will investigate more on Monday, but this is currently breaking in CXF 2.1.4:


<?xml version="1.0"?>
<beans xmlns=""

  <import resource="classpath:META-INF/cxf/cxf.xml" />
  <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
  <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

  <jaxrs:server id="cxfMapping" address="/">
      <bean class="sandbox.cxf.controller.FooController"/>
      <entry key="json" value="application/json"/>
      <entry key="xml" value="application/xml"/>



<?xml version="1.0"?>
<web-app xmlns=""






public class FooController {

        public String text() {
                return "foo";

    public Response response() {
        return new Response("foo");


@XmlRootElement(name = "response")
public class Response {

        @XmlElement(name = "msg")
        private String message;

        public Response() {

        public Response(String message) {
                this.message = message;

         * @return the message
        public String getMessage() {
                return message;

         * @param message
         *            the message to set
        public void setMessage(String message) {
                this.message = message;



GET /foo/foo/text -> 200 "foo"
GET /foo/foo/response.xml -> 404
GET /foo/foo/response.json -> 404

But change web.xml from




GET /wtf/foo/text -> 200 "foo"
GET /wtf/foo/response.xml -> 200 ...
GET /wtf/foo/response.json -> 200 ...


This is not an offer (or solicitation of an offer) to buy/sell the securities/instruments
mentioned or an official confirmation. Morgan Stanley may deal as principal in or own or act
as market maker for securities/instruments mentioned or may advise the issuers. This is not
research and is not from MS Research but it may refer to a research analyst/research report.
Unless indicated, these views are the author’s and may differ from those of Morgan Stanley
research or others in the Firm. We do not represent this is accurate or complete and we may
not update this. Past performance is not indicative of future returns. For additional information,
research reports and important disclosures, contact me or see
You should not use e-mail to request, authorize or effect the purchase or sale of any security
or instrument, to send transfer instructions, or to effect any other transactions. We cannot
guarantee that any such requests received via e-mail will be processed in a timely manner.
This communication is solely for the addressee(s) and may contain confidential information.
We do not waive confidentiality by mistransmission. Contact me if you do not wish to receive
these communications. In the UK, this communication is directed in the UK to those persons
who are professional and eligible counterparties (as defined in the UK Financial Services
Authority’s rules).

View raw message