spring

Apache CXF 2.2.7 Spring 3 Web Service Unmarshalling Error: unexpected element

Hi, I have developed a simple web service application using Apache CXF 2.2.7 and Spring 3, deployed onto Tomcat as a WAR file, but I'm getting the following error message: 12-Apr-2010 15:56:12 org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging WARNING: Interceptor for {http://services.aristabi.com/}ReportingServiceImplService#...

Keeping messages in queue in case of receiver crash

Hi, We've a Spring JMS message listener container for receiving messages asynchronously. Using DefaultMessageListenerContainer and in sessionTransacted mode. I understand being in sessionTransacted mode means in case of an exception the message will be put back into the queue. But how can I make sure the message won't be deleted from th...

Spring MVC: Where to place validation and how to validation entity references.

Let's say I have the following command bean for creating a user: public class CreateUserCommand { private String userName; private String email; private Integer occupationId; pirvate Integer countryId; } occupationId and countryId are drop down selected values on the form. They map to an entity in the database (Occupati...

Spring FactoryBean - iterating over an "object creation" list

Santa's got a list. He wants to make a "present" for every child on hist list (we're assuming for the moment they're all good) and load them all in his sled. Can he do it with Spring? I've written a simple FileListFactory that implements FactoryBean and returns a list of strings that represents the lines in a given file. Set that aside ...

Using different datasources for particular queries with Spring and IBATIS

I have the requirement of updating an app to use multiple (i.e., two in this case) datasources depending upon the type of query. For instance, use DB1 for reads and DB2 for write operations. How would I approach this? ...

Does TestNG has runner like SpringJUnit4ClassRunner

Hi, When I write tests in JUnit (in Spring context) I usualy do it like this: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("classpath:testContext.xml") public class SimpleTest { @Test public void testMethod() { // execute test logic... } } How can I do the same with TestNG? ...

Spring MVC- several parts/views from a controller

i'm looking into using Spring MVC - how would I structure the fact that a page can be composed of several different views Consider a controller that's basically: public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Servl...

Spring's JMS Design Question : Decouple processing of messages

I'm using a message listener to process some messages from MQ based on Spring's DefaultMessageListenerContainer. After I receive a message, I have to make a Web Service (WS) call. However, I don't want to do this in the onMessage method because it would block the onMessage method until the invocation of WS is successful and this introduc...

How do I set a dependency on Spring Web Services in my POM.xml

I get this on a lot of Maven dependencies, though current source of pain is Spring. I'll set a Spring version and include it like so: <spring-version>3.0.0.RELEASE</spring-version> <!-- Spring framework --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring-version...

Explain the pros and cons of using the spring framework

Saw this question in career cup website. can someone Explian the pros and cons of using the spring framework ...

Spring redirect: prefix issue

Hello, I have an application which uses Spring 3. I have a view resolver which builds my views based on a String. So in my controllers I have methods like this one. @RequestMapping(...) public String method(){ //Some proccessing return "tiles:tileName" } I need to return a RedirectView to solve the duplicate submission due to upd...

First steps in Spring Framework

I have downloaded Spring Framework and using SpringSource dm Server. I just need to write a simple Hello world using Spring Framework. I don't know about the configuration and where to write the JAVA code. I did a google, but could not find anything that can help me out. ...

Using Apache Camel how do I unmarshal my deserialized object that comes in through a CXF Endpoint?

I have a very simple camel route. It starts with a CXF Endpoint exposed as a web service. I then want to convert it to xml and call a method on a bean. Currently i'm getting a CXF specific object after the web service call. How do I take my serialized object out of the CXF MessageList and use it going forward? My Route: <camel:route> ...

XSD Client in Spring

I have an XSD document that I need to communicate with an endpoint (client side only) - is there this functionality built into spring? I have been using JAXB, but was wondering if spring has some sort of wrapper. Thanks. ...

Any one can explain JAX-WS with Spring?

Hi All, Can you Explain in brief how JAX-WS works with Spring. I Know JAX-WS is using JAXB for un/marshaling but when it comes in picture in terms of flow. For e.g. lets say there is a service called entityEmployeeService (WebService). 1) UI makes a HTTP request for service entityEmployeeService, then what will happen technically and f...

Dealing with SQLException with spring,hibernate & Postgres

Hi im working on a project using HibernateDaoSUpport from my Daos from Spring & spring-ws & hibernate & postgres who will be used in a national application (means a lot of users) Actually, every exception from hibernate is automatically transformed into some specific Spring dataAccesException. I have a table with a keyword on the dabat...

Spring MVC: should service layer be returning operation specific DTO's ?

In my Spring MVC application I am using DTO in the presentation layer in order to encapsulate the domain model in the service layer. The DTO's are being used as the spring form backing objects. hence my services look something like this: userService.storeUser(NewUserRequestDTO req); The service layer will translate DTO -> Domain obje...

Spring 2.5 managed servlets: howto?

Correct me if anything is wrong. As I understand, all Spring functionality, namely DI works when beans are got thru Spring Context, ie getBean() method. Otherwise, none can work, even if my method is marked @Transactional and I will create the owning class with a new operator, no transaction management will be provided. I use Tomca...

Enunciate http error 404

Hi, I tried to setup a simple project with spring and enunciate+jax-ws/jax-rs annotation, but I didn't get it work. I used some great tutorial for the enunciate integration tutorial Enunciate create the api-page like in the tutorial, but I get this error : If I open a mount point, for example the REST one (/rest/Service/getService/...

Non-managed by Spring web-application and jar file with Spring features

My idea is to create a .jar file that contains Services managed by Spring, that should be got by getBean() I want to put it to WEB-INF/lib of a Web-app Then in web-app Servlets I want to get use of the functionality of a Jar file. 1 Idea. Create classes that encapsulate invokation to Spring Context (getBean() etc) For example, the cl...