This question is related to batch processing using SOAP web services. I have a SOAP web service written in Java that has one web method. This method accepts a Java bean as its input argument and also returns a Java bean as a response. The input Java bean has 200 fields, which are all standard Java objects (e.g., Integer, BigDecimal, XMLGregorianCalendar, etc.). I had to use type wrappers because some of these fields are nullable. After receiving the input object, the web method calls other methods that handle the business logic (the process also involves writing to a database). As I mentioned, the response of the web method is another Java bean that has five fields.
The goal is to provide the WSDL to a client so we can provide services on the data we receive. To process multiple objects (each encapsulated in a Java bean), the client has to send a SOAP request for each one (through a loop). However, this is slow on our application server because we may receive 10,000 SOAP calls at a time from a client. In order to make the web service more batch-oriented, I am going to change the web method so that it accepts a list of objects rather than a single object. Is this the right approach or there is a better solution?
By the way, I am aware of asynchronous web services. However, I cannot use them because the business logic is legacy code and it doesn’t support multithreading. The company has not adopted Spring yet, so that is also out of the question for now.
I am using Java 6 with WebSphere 7.5 as the application server and DB2 as the database.
Aucun commentaire:
Enregistrer un commentaire