Hi Paul the shortest path to achieving an Impl Class is to code your own Impl Concrete class of the interface
you can also use a Factory ..but..to code a Factory Implementation is not trivial as a Factory is required to 'divine' all the necessary attributes and construct methods to construct an Implementation Class with 'reasonable' default values for all attributes do you see a need for a Factory Class to implement a concrete Impl class for an interface specified in the parameter name="ServiceClass" Martin ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. From: paul.ocklef...@nhs.net To: java-user@axis.apache.org Date: Wed, 5 Dec 2012 16:22:00 +0000 Subject: RE: Async services I thought I might as well add the code that I have for trying to get this to work as I might get some better help that way: If I don’t use the interface in the services.xml but instead use the implementation I no longer get the error related to a return type of Future<?> Services.xml: <serviceGroup> <service name="CreditScoreService"> <description>Test Async Service</description> <parameter name="ServiceClass" locked="false"> webservices2.CreditScoreServiceImpl</parameter> <operation name="getCreditScore"> <messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" /> </operation> </service> </serviceGroup> public interface CreditScoreService { //Async with passed in callback function public Future<?> getCreditScoreAsync(String inParam, AsyncHandler<String> handler); //Async using polling public Response<String> getCreditScoreAsync(String inParam); //Standard method public String getCreditScore(String inParam); } public class CreditScoreServiceImpl implements CreditScoreService { public Response<String> getCreditScoreAsync(String requestType) { System.out.println("calling async method"); return null; } public Future<String> getCreditScoreAsync(String requestType, AsyncHandler<String> handler) { System.out.println("calling async method"); return null; } public String getCreditScore(String inputParam) { return "200"; } public class CreditScoreResponse { private String responseType; /** * @return the responseType */ public String getResponseType() { return responseType; } /** * @param responseType the responseType to set */ public void setResponseType(String responseType) { this.responseType = responseType; } } } Can anyone can tell me where I am going wrong, please! Thanks, Paul From: Ockleford Paul (NHS CONNECTING FOR HEALTH) [mailto:paul.ocklef...@nhs.net] Sent: 05 December 2012 15:10 To: java-user@axis.apache.org Subject: Async services --- This message was sent from an email address external to NHSmail but gives the appearance of being from an NHSmail (@nhs.net) address. The recipient should verify the sender and content before acting upon information contained within. The identified sender is java-user-return-87101-paul.ockleford=nhs....@axis.apache.org --- Hi, I am trying to create a service which exposes asynchronous methods in the same way as this document describes: http://axis.apache.org/axis2/java/core/docs/jaxws-guide.html#Async I am having quite a lot of trouble getting either of the examples to work., even trying to expose a method with a return type of Future<?> seems to result in an error when axis starts up. My first question is where can I download the source code related to the snippets, it would be nice to be able to see the implementation of the methods described in the interface. Second question is whether anybody has a link to a good document that details this process. I have tried to follow quite a few tutorials today and have still not ended up with a working demo. Finally does the method described on the axis website work for stub code generated from a wsdl? I don’t seem to be able to get a handle on my CreditScoreService object like the example client shows so I have no idea how to actually get a Request object back. Any help would be good as I am currently stuck on this. Thanks, Paul ******************************************************************************************************************** This message may contain confidential information. If you are not the intended recipient please inform the sender that you have received the message in error before deleting it. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Thank you for your co-operation. NHSmail is the secure email and directory service available for all NHS staff in England and Scotland NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients NHSmail provides an email address for your career in the NHS and can be accessed anywhere ******************************************************************************************************************** ******************************************************************************************************************** This message may contain confidential information. If you are not the intended recipient please inform the sender that you have received the message in error before deleting it. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Thank you for your co-operation. NHSmail is the secure email and directory service available for all NHS staff in England and Scotland NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients NHSmail provides an email address for your career in the NHS and can be accessed anywhere ********************************************************************************************************************