Author: sergeyb
Date: Thu Nov 25 13:48:32 2010
New Revision: 1039039
URL: http://svn.apache.org/viewvc?rev=1039039&view=rev
Log:
Adapting a java_first_jaxws demo to a jaxrs system test with moving soap
related tests to the subpackage
Added:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookSoapService.java
(with props)
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrs.java
(with props)
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrsJaxws.java
(with props)
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxws.java
(with props)
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl.java
(with props)
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl2.java
(with props)
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorld.java
(with props)
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorldImpl.java
(with props)
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/IntegerUserMap.java
(with props)
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/IntegerUserMapAdapter.java
(with props)
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/User.java
(with props)
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/UserAdapter.java
(with props)
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/UserImpl.java
(with props)
Removed:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSoapService.java
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreJaxrs.java
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreJaxrsJaxws.java
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreJaxws.java
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSoapRestImpl.java
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSoapRestImpl2.java
Modified:
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookApplication.java
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml
Modified:
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java?rev=1039039&r1=1039038&r2=1039039&view=diff
==============================================================================
---
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
(original)
+++
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
Thu Nov 25 13:48:32 2010
@@ -195,7 +195,8 @@ public class JAXRSOutInterceptor extends
Method invoked = null;
if (firstTry) {
- invoked = ori == null ? null : ori.getMethodToInvoke();
+ invoked = ori == null ? null : ori.getAnnotatedMethod() == null
+ ? ori.getMethodToInvoke() : ori.getAnnotatedMethod();
}
Class<?> targetType = getRawResponseClass(responseObj);
Type genericType =
Modified:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookApplication.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookApplication.java?rev=1039039&r1=1039038&r2=1039039&view=diff
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookApplication.java
(original)
+++
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookApplication.java
Thu Nov 25 13:48:32 2010
@@ -29,7 +29,7 @@ public class BookApplication extends App
public Set<Class<?>> getClasses() {
Set<Class<?>> classes = new HashSet<Class<?>>();
classes.add(org.apache.cxf.systest.jaxrs.BookStorePerRequest.class);
- classes.add(org.apache.cxf.systest.jaxrs.BookStoreJaxrsJaxws.class);
+
classes.add(org.apache.cxf.systest.jaxrs.jaxws.BookStoreJaxrsJaxws.class);
return classes;
}
Modified:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java?rev=1039039&r1=1039038&r2=1039039&view=diff
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
(original)
+++
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
Thu Nov 25 13:48:32 2010
@@ -37,6 +37,8 @@ import javax.ws.rs.core.Response;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Unmarshaller;
import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPBinding;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.FileRequestEntity;
@@ -61,6 +63,11 @@ import org.apache.cxf.jaxrs.provider.JAX
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
+import org.apache.cxf.systest.jaxrs.jaxws.BookSoapService;
+import org.apache.cxf.systest.jaxrs.jaxws.BookStoreJaxrsJaxws;
+import org.apache.cxf.systest.jaxrs.jaxws.HelloWorld;
+import org.apache.cxf.systest.jaxrs.jaxws.User;
+import org.apache.cxf.systest.jaxrs.jaxws.UserImpl;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.transport.http.HTTPConduit;
@@ -78,6 +85,41 @@ public class JAXRSSoapBookTest extends A
}
@Test
+ public void testHelloRest() throws Exception {
+ String address = "http://localhost:" + PORT +
"/test/services/hello-rest";
+
+ HelloWorld service = JAXRSClientFactory.create(address,
HelloWorld.class);
+ useHelloService(service);
+ }
+
+ @Test
+ public void testHelloSoap() throws Exception {
+ final QName serviceName = new QName("http://hello.com", "HelloWorld");
+ final QName portName = new QName("http://hello.com", "HelloWorldPort");
+ final String address = "http://localhost:" + PORT +
"/test/services/hello-soap";
+
+ Service service = Service.create(serviceName);
+ service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, address);
+
+ HelloWorld hw = service.getPort(HelloWorld.class);
+
+ useHelloService(hw);
+ }
+
+ private void useHelloService(HelloWorld service) {
+ assertEquals("Hello Barry", service.sayHi("Barry"));
+ assertEquals("Hello Fred", service.sayHiToUser(new UserImpl("Fred")));
+
+ Map<Integer, User> users = service.getUsers();
+ assertEquals(1, users.size());
+ assertEquals("Fred",
users.entrySet().iterator().next().getValue().getName());
+
+ users = service.echoUsers(users);
+ assertEquals(1, users.size());
+ assertEquals("Fred",
users.entrySet().iterator().next().getValue().getName());
+ }
+
+ @Test
public void testGetAll() throws Exception {
InputStream in = getHttpInputStream("http://localhost:" + PORT
Added:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookSoapService.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookSoapService.java?rev=1039039&view=auto
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookSoapService.java
(added)
+++
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookSoapService.java
Thu Nov 25 13:48:32 2010
@@ -0,0 +1,48 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jaxrs.jaxws;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+
+/**
+ *
+ */
+
+...@webserviceclient(name = "BookService",
+ targetNamespace = "http://books.com")
+public class BookSoapService extends Service {
+ static final QName SERVICE = new QName("http://books.com", "BookService");
+ static final QName BOOK_PORT =
+ new QName("http://books.com", "BookPort");
+ public BookSoapService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ @WebEndpoint(name = "BookPort")
+ public BookStoreJaxrsJaxws getBookPort() {
+ return (BookStoreJaxrsJaxws)super.getPort(BOOK_PORT,
+ BookStoreJaxrsJaxws.class);
+ }
+
+}
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookSoapService.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookSoapService.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrs.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrs.java?rev=1039039&view=auto
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrs.java
(added)
+++
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrs.java
Thu Nov 25 13:48:32 2010
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.jaxrs.jaxws;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+
+...@path("/myRestService")
+public interface BookStoreJaxrs {
+
+ @GET
+ int getId();
+}
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrs.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrs.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrsJaxws.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrsJaxws.java?rev=1039039&view=auto
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrsJaxws.java
(added)
+++
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrsJaxws.java
Thu Nov 25 13:48:32 2010
@@ -0,0 +1,69 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.jaxrs.jaxws;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+
+import org.apache.cxf.systest.jaxrs.Book;
+import org.apache.cxf.systest.jaxrs.BookNotFoundFault;
+import org.apache.cxf.systest.jaxrs.BookSubresource;
+
+...@webservice
+...@path("/bookstore")
+...@consumes("application/xml")
+...@produces("application/xml")
+public interface BookStoreJaxrsJaxws {
+
+ @WebMethod
+ @GET
+ @Path("/{id}")
+ @Consumes("*/*")
+ Book getBook(@PathParam("id") @WebParam(name = "id") Long id) throws
BookNotFoundFault;
+
+ @WebMethod
+ @POST
+ @Path("/books")
+ Book addBook(@WebParam(name = "book") Book book);
+
+ @Path("/books/{id}")
+ BookSubresource getBookSubresource(@PathParam("id") String id);
+
+ @Path("/thestore/{id}")
+ BookStoreJaxrsJaxws getBookStore(@PathParam("id") String id);
+
+ @POST
+ @Path("/fastinfoset")
+ @Consumes({"text/xml" })
+ @Produces({"application/fastinfoset", "text/xml", "application/xml" })
+ Book addFastinfoBook(Book book);
+
+ @GET
+ @Path("/fastinfoset2")
+ @Produces({"application/fastinfoset", "text/xml", "application/xml" })
+ Book getFastinfoBook();
+}
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrsJaxws.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxrsJaxws.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxws.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxws.java?rev=1039039&view=auto
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxws.java
(added)
+++
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxws.java
Thu Nov 25 13:48:32 2010
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.jaxrs.jaxws;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+...@webservice(targetNamespace = "http://books.com")
+public interface BookStoreJaxws {
+ @WebMethod
+ int getId();
+}
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxws.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreJaxws.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl.java?rev=1039039&view=auto
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl.java
(added)
+++
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl.java
Thu Nov 25 13:48:32 2010
@@ -0,0 +1,159 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.jaxrs.jaxws;
+
+import java.io.OutputStream;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
+import javax.jws.WebMethod;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.ResponseBuilder;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Marshaller;
+import javax.xml.ws.WebServiceContext;
+
+import org.apache.cxf.jaxrs.client.WebClient;
+import org.apache.cxf.jaxrs.ext.MessageContext;
+import org.apache.cxf.systest.jaxrs.Book;
+import org.apache.cxf.systest.jaxrs.BookNotFoundDetails;
+import org.apache.cxf.systest.jaxrs.BookNotFoundFault;
+import org.apache.cxf.systest.jaxrs.BookSubresource;
+import org.apache.cxf.systest.jaxrs.BookSubresourceImpl;
+
+public class BookStoreSoapRestImpl implements BookStoreJaxrsJaxws {
+
+ private Map<Long, Book> books = new HashMap<Long, Book>();
+
+ @Resource
+ private WebServiceContext jaxwsContext;
+ @Resource
+ private MessageContext jaxrsContext;
+
+ @Resource(name = "restClient")
+ private BookStoreJaxrsJaxws webClient;
+ private boolean invocationInProcess;
+
+ public BookStoreSoapRestImpl() {
+ init();
+ }
+
+ @PostConstruct
+ public void verifyWebClient() {
+ if (webClient == null) {
+ throw new RuntimeException();
+ }
+ WebClient.client(webClient).accept("application/xml");
+ }
+
+ public Book getBook(Long id) throws BookNotFoundFault {
+
+ if (books.get(id) == null) {
+ if (id == 0) {
+ try {
+ OutputStream os =
jaxrsContext.getHttpServletResponse().getOutputStream();
+ JAXBContext c = JAXBContext.newInstance(new
Class[]{Book.class});
+ Marshaller m = c.createMarshaller();
+ m.marshal(books.get(123L), os);
+ os.flush();
+ return null;
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw new RuntimeException();
+ }
+ }
+ int returnCode = 404;
+ if (id == 321) {
+ returnCode = 525;
+ } else if (id == 322) {
+ BookNotFoundDetails details = new BookNotFoundDetails();
+ details.setId(id);
+ throw new BookNotFoundFault(details);
+ }
+ String msg = "No Book with id " + id + " is available";
+ ResponseBuilder builder =
Response.status(returnCode).header("BOOK-HEADER", msg);
+
+ if (returnCode == 404) {
+ builder.type("text/plain").entity(msg);
+ }
+ throw new WebApplicationException(builder.build());
+ }
+
+ if (!invocationInProcess) {
+ invocationInProcess = true;
+ return webClient.getBook(id);
+ }
+ invocationInProcess = false;
+
+ System.out.println(getContentType());
+ return books.get(id);
+ }
+
+ public Book addBook(Book book) {
+ book.setId(124);
+ books.put(book.getId(), book);
+ return books.get(book.getId());
+ }
+
+ private void init() {
+ Book book = new Book();
+ book.setId(new Long(123));
+ book.setName("CXF in Action");
+ books.put(book.getId(), book);
+ }
+
+ private String getContentType() {
+
+ // TODO : it may be worth indeed to introduce a shared ServiceContext
+ // such that users combining JAXWS and JAXRS won't have to write
if/else code
+ HttpServletRequest request = jaxrsContext.getHttpServletRequest();
+ if (request == null) {
+ request = (HttpServletRequest)jaxwsContext.getMessageContext().get(
+ javax.xml.ws.handler.MessageContext.SERVLET_REQUEST);
+ }
+ return request.getContentType();
+ }
+
+ @WebMethod(exclude = true)
+ public BookSubresource getBookSubresource(String id) {
+ return new BookSubresourceImpl(Long.valueOf(id));
+ }
+
+ @WebMethod(exclude = true)
+ public BookStoreJaxrsJaxws getBookStore(String id) {
+ if (!"number1".equals(id)) {
+ throw new WebApplicationException(404);
+ }
+ return this;
+ }
+
+ public Book addFastinfoBook(Book book) {
+ return book;
+ }
+
+ public Book getFastinfoBook() {
+ return new Book("CXF2", 2L);
+ }
+
+}
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl2.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl2.java?rev=1039039&view=auto
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl2.java
(added)
+++
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl2.java
Thu Nov 25 13:48:32 2010
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.jaxrs.jaxws;
+
+
+public class BookStoreSoapRestImpl2 implements BookStoreJaxws, BookStoreJaxrs
{
+
+ public int getId() {
+ return 0;
+ }
+
+
+}
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl2.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/BookStoreSoapRestImpl2.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorld.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorld.java?rev=1039039&view=auto
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorld.java
(added)
+++
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorld.java
Thu Nov 25 13:48:32 2010
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jaxrs.jaxws;
+
+import java.util.Map;
+
+import javax.jws.WebService;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+...@webservice(targetNamespace = "http://hello.com")
+...@path("/")
+public interface HelloWorld {
+
+ @GET
+ @Produces("text/plain")
+ String sayHi(@QueryParam("text") String text);
+
+
+ @POST
+ @Consumes("text/xml")
+ @Produces("text/plain")
+ String sayHiToUser(User user);
+
+
+ @GET
+ @Produces("text/xml")
+ @XmlJavaTypeAdapter(IntegerUserMapAdapter.class)
+ Map<Integer, User> getUsers();
+
+ @POST
+ @Produces("text/xml")
+ @Consumes("text/xml")
+ @XmlJavaTypeAdapter(IntegerUserMapAdapter.class)
+ Map<Integer, User>
echoUsers(@XmlJavaTypeAdapter(IntegerUserMapAdapter.class) Map<Integer, User>
users);
+}
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorld.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorld.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorldImpl.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorldImpl.java?rev=1039039&view=auto
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorldImpl.java
(added)
+++
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorldImpl.java
Thu Nov 25 13:48:32 2010
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+// START SNIPPET: service
+package org.apache.cxf.systest.jaxrs.jaxws;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import javax.jws.WebService;
+
+...@webservice(endpointInterface =
"org.apache.cxf.systest.jaxrs.jaxws.HelloWorld",
+ serviceName = "HelloWorld")
+public class HelloWorldImpl implements HelloWorld {
+ Map<Integer, User> users = new LinkedHashMap<Integer, User>();
+
+
+ public String sayHi(String text) {
+ return "Hello " + text;
+ }
+
+ public String sayHiToUser(User user) {
+ users.put(users.size() + 1, user);
+ return "Hello " + user.getName();
+ }
+
+ public Map<Integer, User> getUsers() {
+ return users;
+ }
+
+ public Map<Integer, User> echoUsers(Map<Integer, User> us) {
+ if (!users.equals(us)) {
+ throw new RuntimeException();
+ }
+ return us;
+ }
+
+}
+// END SNIPPET: service
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorldImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/HelloWorldImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/IntegerUserMap.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/IntegerUserMap.java?rev=1039039&view=auto
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/IntegerUserMap.java
(added)
+++
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/IntegerUserMap.java
Thu Nov 25 13:48:32 2010
@@ -0,0 +1,66 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jaxrs.jaxws;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+...@xmlrootelement(name = "IntegerUserMap")
+...@xmltype(name = "IntegerUserMap")
+...@xmlaccessortype(XmlAccessType.FIELD)
+public class IntegerUserMap {
+ @XmlElement(nillable = false, name = "entry")
+ List<IntegerUserEntry> entries = new ArrayList<IntegerUserEntry>();
+
+ public List<IntegerUserEntry> getEntries() {
+ return entries;
+ }
+
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "IdentifiedUser")
+ static class IntegerUserEntry {
+ //Map keys cannot be null
+ @XmlElement(required = true, nillable = false)
+ Integer id;
+
+ User user;
+
+ public void setId(Integer k) {
+ id = k;
+ }
+ public Integer getId() {
+ return id;
+ }
+
+ public void setUser(User u) {
+ user = u;
+ }
+ public User getUser() {
+ return user;
+ }
+ }
+}
+
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/IntegerUserMap.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/IntegerUserMap.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/IntegerUserMapAdapter.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/IntegerUserMapAdapter.java?rev=1039039&view=auto
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/IntegerUserMapAdapter.java
(added)
+++
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/IntegerUserMapAdapter.java
Thu Nov 25 13:48:32 2010
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jaxrs.jaxws;
+
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+
+public class IntegerUserMapAdapter extends XmlAdapter<IntegerUserMap,
Map<Integer, User>> {
+ public IntegerUserMap marshal(Map<Integer, User> v) throws Exception {
+ IntegerUserMap map = new IntegerUserMap();
+ for (Map.Entry<Integer, User> e : v.entrySet()) {
+ IntegerUserMap.IntegerUserEntry iue = new
IntegerUserMap.IntegerUserEntry();
+ iue.setUser(e.getValue());
+ iue.setId(e.getKey());
+ map.getEntries().add(iue);
+ }
+ return map;
+ }
+
+ public Map<Integer, User> unmarshal(IntegerUserMap v) throws Exception {
+ Map<Integer, User> map = new LinkedHashMap<Integer, User>();
+ for (IntegerUserMap.IntegerUserEntry e : v.getEntries()) {
+ map.put(e.getId(), e.getUser());
+ }
+ return map;
+ }
+
+}
+
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/IntegerUserMapAdapter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/IntegerUserMapAdapter.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/User.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/User.java?rev=1039039&view=auto
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/User.java
(added)
+++
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/User.java
Thu Nov 25 13:48:32 2010
@@ -0,0 +1,27 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jaxrs.jaxws;
+
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+...@xmljavatypeadapter(UserAdapter.class)
+public interface User {
+
+ String getName();
+}
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/User.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/User.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/UserAdapter.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/UserAdapter.java?rev=1039039&view=auto
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/UserAdapter.java
(added)
+++
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/UserAdapter.java
Thu Nov 25 13:48:32 2010
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jaxrs.jaxws;
+
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+
+public class UserAdapter extends XmlAdapter<UserImpl, User> {
+ public UserImpl marshal(User v) throws Exception {
+ if (v instanceof UserImpl) {
+ return (UserImpl)v;
+ }
+ return new UserImpl(v.getName());
+ }
+
+ public User unmarshal(UserImpl v) throws Exception {
+ return v;
+ }
+}
+
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/UserAdapter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/UserAdapter.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/UserImpl.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/UserImpl.java?rev=1039039&view=auto
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/UserImpl.java
(added)
+++
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/UserImpl.java
Thu Nov 25 13:48:32 2010
@@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jaxrs.jaxws;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+...@xmlrootelement(name = "User")
+...@xmltype(name = "User")
+public class UserImpl implements User {
+ String name;
+
+ public UserImpl() {
+ }
+ public UserImpl(String s) {
+ name = s;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String s) {
+ name = s;
+ }
+
+ public int hashCode() {
+ return name.hashCode();
+ }
+
+ public boolean equals(Object o) {
+ return o instanceof User && name.equals(((User)o).getName());
+ }
+}
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/UserImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/jaxws/UserImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified:
cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml?rev=1039039&r1=1039038&r2=1039039&view=diff
==============================================================================
---
cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml
(original)
+++
cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml
Thu Nov 25 13:48:32 2010
@@ -47,14 +47,14 @@ http://cxf.apache.org/schemas/jaxrs.xsd"
<jaxrs:client id="restClient"
address="http://localhost:${testutil.ports.BookServerRestSoap}/test/services/rest"
- serviceClass="org.apache.cxf.systest.jaxrs.BookStoreJaxrsJaxws"
+ serviceClass="org.apache.cxf.systest.jaxrs.jaxws.BookStoreJaxrsJaxws"
inheritHeaders="true">
<jaxrs:headers>
<entry key="Accept" value="text/xml"/>
</jaxrs:headers>
</jaxrs:client>
- <bean id="bookstore"
class="org.apache.cxf.systest.jaxrs.BookStoreSoapRestImpl"/>
+ <bean id="bookstore"
class="org.apache.cxf.systest.jaxrs.jaxws.BookStoreSoapRestImpl"/>
<jaxws:endpoint xmlns:s="http://books.com"
serviceName="s:BookService"
@@ -70,6 +70,19 @@ http://cxf.apache.org/schemas/jaxrs.xsd"
</jaxrs:serviceBeans>
</jaxrs:server>
+ <jaxrs:server id="hello_rest" address="/hello-rest">
+ <jaxrs:serviceBeans>
+ <bean class="org.apache.cxf.systest.jaxrs.jaxws.HelloWorldImpl"/>
+ </jaxrs:serviceBeans>
+ </jaxrs:server>
+
+ <jaxws:endpoint xmlns:s="http://hello.com"
+ serviceName="s:HelloWorld"
+ endpointName="s:HelloWorldPort"
+ id="hello_soap"
+ implementor="org.apache.cxf.systest.jaxrs.jaxws.HelloWorldImpl"
+ address="/hello-soap"/>
+
<jaxws:endpoint xmlns:s="http://books.com"
serviceName="s:BookService"
endpointName="s:BookPort"
@@ -87,7 +100,7 @@ http://cxf.apache.org/schemas/jaxrs.xsd"
<ref bean="bookstore2"/>
</jaxrs:serviceBeans>
</jaxrs:server>
- <bean id="bookstore2"
class="org.apache.cxf.systest.jaxrs.BookStoreSoapRestImpl2"/>
+ <bean id="bookstore2"
class="org.apache.cxf.systest.jaxrs.jaxws.BookStoreSoapRestImpl2"/>
<util:list id="fastinfosetType">
<value>application/fastinfoset</value>