RE: axis2 with spring
It seems like in your code, either the getDataSetManager() call is returning null or the variable list is null the first time you execute list.size(). STATEMENT OF CONFIDENTIALITY: The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify WHI Solutions immediately at g...@whisolutions.com, and destroy all copies of this message and any attachments.
Re: axis2 with spring
Dear Joe, the Axis2+spring is ok now. I have a mentd need return objects. how can i do? attahch is my main config and source: 1. project folder : projectName |src ||com.xxx.ws |||-DataSetServiceEnquiry.java ||com.xxx.ws.pojo |||-DataSet.java | |WebRoot || ||WEB-INF |||classes |||conf ||||axis2.xml |||modules ||||addressing-1.4.1.mar ||||axis2-scripting-1.4.1.mar ||||mex-1.4.1.mar ||||modules-1.4.1.mar ||||ping-1.4.1.mar|| ||||soapmonitor-1.4.1.mar |||pojo |||services ||||xxx |||||META-INF ||||||services.xml ||||services.list ||||version-1.4.1.aar |||Web.xml 2. web.xml in this file, i copy all content from axis2.war /WEB-INF/web.xml 3.services.xml serviceGroup service name=DataSetServiceEnquiry description simple spring example /description parameter name=ServiceObjectSupplierorg.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier/parameter parameter name=SpringBeanNamedataSetServiceEnquiry/parameter messageReceivers messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out; class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ /messageReceivers /service /serviceGroup 3.DataSetServiceEnquiry.java public class DataSetServiceEnquiry { ohter code... // The web service public String getUserAccountCount() { return (RPCMessageReceiver) Total UserAccount count is :+String.valueOf(this.getUserAccountManager().findAllUserAccount().size()); } public com.eadi.ws.pojo.DataSet[] getDataSetList(){ List list=this.getDataSetManager().findAll(); com.xxx.ws.pojo.DataSet[] ds=new com.xxx.ws.pojo.DataSet[list.size()]; for(int i=0;list!=null ilist.size();i++){ com.xxx.dao.hibernate.DataSet tmpds=(com.eadi.dao.hibernate.DataSet)list.get(i); ds[i].setCreatedDate(tmpds.getCreatedDate()); ds[i].setCreatedUser(tmpds.getCreatedUser()); ds[i].setDataProvider(tmpds.getDataProvider()); ds[i].setDataSetId(tmpds.getDataSetId()); ...other properties } return ds; } } 4. deploy to JBOSS 4.2.3.GA 5.client from dotnet c# a) first method of webservice is ok. DataSetServiceEnquiry.DataSetServiceEnquiry ws = new DataSetServiceEnquiry.DataSetServiceEnquiry(); DataSetServiceEnquiry.getUserAccountCountResponse response = ws.getUserAccountCount(); this.textBox1.Text = respon...@return.tostring(); b) the second method of webservice have error on jboss: 1:36:07,187 INFO [STDOUT] 2009-07-31 11:36:07,171 ERROR [org.apache.axis2.rpc.receivers.RPCMessageReceiver] - Exception occurred while trying to invoke service method getDataSetList java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:165) at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:102) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.xxx.web.bean.SessionFilter.doFilter(SessionFilter.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96
RE: axis2 with spring
Look at this thread: http://www.nabble.com/Newbie-question%3A-how-to-plug-axis2-engine-into-existing-web-application-running-in-weblogic-td23411717.html#a23412081 Then this one: http://www.nabble.com/Axis2-Spring-integration...-Getting-nulls-in-dependency-injected-values-tt23785825.html#a23785825 -Original Message- From: sam wong [mailto:samwon...@gmail.com] Sent: Tuesday, July 28, 2009 11:54 PM To: axis-user@ws.apache.org Subject: axis2 with spring hi, everybody, i have a web site wrote with jsf1.2+Spring2.5+Hibernate. now need to publish some Spring Bean as WebService( use axis). what steps should i do ? Thanks a lot. Sam Wong STATEMENT OF CONFIDENTIALITY: The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify WHI Solutions immediately at g...@whisolutions.com, and destroy all copies of this message and any attachments.
axis2 with spring
hi, everybody, i have a web site wrote with jsf1.2+Spring2.5+Hibernate. now need to publish some Spring Bean as WebService( use axis). what steps should i do ? Thanks a lot. Sam Wong
Re: axis2, cxf, spring or Metro
On Thu, Dec 18, 2008 at 12:44 AM, Shehan Simen ssi...@itree.com.au wrote: Hi Keith, Thanx for the reply. Could you please tell me axis2 tutorial which describe how to write a wsdl2java web service using jaxb binding? If I use jaxb data binding, that means I am using jax-ws, right? http://ws.apache.org/axis2/tools/1_4_1/CodegenToolReference.html It doesn't seem to be documented there, but anyways, use -d jaxbri for jaxb. As for Spring and jaxws - someone who knows jaxws will have to comment. AFAICT jaxws doesn't use an axis2 services.xml file nor the typical MessageRecievers and therefore I'm not what state spring and jaxws is in for axis2. Anyways, see the axis2 spring guide because setting up a static reference to get your spring beans is simple - see this post from a few days ago if interested: http://marc.info/?l=axis-userm=122943466610253w=2 HTH, Robert
Re: axis2, cxf, spring or Metro
Hi Shehan, Can you please tell me what you mean by wsdl2java web service? In Axis2 Jax-ws implementation You can simply put a jar file containing a webservice annotated service class to servicejars directory and make it a web service. if you want to make stubs from WSDL with jaxb binding you can use wsimport tool. thank you, Charith Dhanushka Wickramarachchi http://charithwiki.blogspot.com/ On Thu, Dec 18, 2008 at 4:50 PM, robert lazarski robertlazar...@gmail.comwrote: On Thu, Dec 18, 2008 at 12:44 AM, Shehan Simen ssi...@itree.com.au wrote: Hi Keith, Thanx for the reply. Could you please tell me axis2 tutorial which describe how to write a wsdl2java web service using jaxb binding? If I use jaxb data binding, that means I am using jax-ws, right? http://ws.apache.org/axis2/tools/1_4_1/CodegenToolReference.html It doesn't seem to be documented there, but anyways, use -d jaxbri for jaxb. As for Spring and jaxws - someone who knows jaxws will have to comment. AFAICT jaxws doesn't use an axis2 services.xml file nor the typical MessageRecievers and therefore I'm not what state spring and jaxws is in for axis2. Anyways, see the axis2 spring guide because setting up a static reference to get your spring beans is simple - see this post from a few days ago if interested: http://marc.info/?l=axis-userm=122943466610253w=2 HTH, Robert -- Charith Dhanushka Wickramarachchi http://charithwiki.blogspot.com/
axis2, cxf, spring or Metro
Hi, We are evaluating different ws platforms to select the most suitable one for our big projects to come in future. I would like to know whether axis2 is supporting JAX-WS which is the preferred standard. Seems adb is still buggy and no fully schema support. Please advise us soon as this is a big decision to our company.
Re: axis2, cxf, spring or Metro
Hi Shehan, Yes Axis2 does support JAX-WS. ADB does not have full schema support but it does support the 90% case very effectively. It supports the most widely used schema constructs and most of the time they are the only ones that you will be using. In case you need 100% schema support you could always use XMLBeans with Axis2. But ADB will give you the best performance. I am not too familiar with the other frameworks but here are some points about Axis2. Axis2 performs very well and also is very extensible. If you find something that Axis2 lacks out of the box there are several plug points that you can plug into and get your job done the way you want. Also there are quite a few companies around that provide enterprise support for Axis2. Thanks, Keith. On Thu, Dec 18, 2008 at 8:17 AM, Shehan Simen ssi...@itree.com.au wrote: Hi, We are evaluating different ws platforms to select the most suitable one for our big projects to come in future. I would like to know whether axis2 is supporting JAX-WS which is the preferred standard. Seems adb is still buggy and no fully schema support. Please advise us soon as this is a big decision to our company. -- Keith Chapman Senior Software Engineer WSO2 Inc. Oxygenating the Web Service Platform. http://wso2.org/ blog: http://www.keith-chapman.org
RE: axis2, cxf, spring or Metro
Hi Keith, Thanx for the reply. Could you please tell me axis2 tutorial which describe how to write a wsdl2java web service using jaxb binding? If I use jaxb data binding, that means I am using jax-ws, right? Regards, Shehan From: keith chapman [mailto:keithgchap...@gmail.com] Sent: 2008-12-18 14:33 To: axis-user@ws.apache.org Subject: Re: axis2, cxf, spring or Metro Hi Shehan, Yes Axis2 does support JAX-WS. ADB does not have full schema support but it does support the 90% case very effectively. It supports the most widely used schema constructs and most of the time they are the only ones that you will be using. In case you need 100% schema support you could always use XMLBeans with Axis2. But ADB will give you the best performance. I am not too familiar with the other frameworks but here are some points about Axis2. Axis2 performs very well and also is very extensible. If you find something that Axis2 lacks out of the box there are several plug points that you can plug into and get your job done the way you want. Also there are quite a few companies around that provide enterprise support for Axis2. Thanks, Keith. On Thu, Dec 18, 2008 at 8:17 AM, Shehan Simen ssi...@itree.com.aumailto:ssi...@itree.com.au wrote: Hi, We are evaluating different ws platforms to select the most suitable one for our big projects to come in future. I would like to know whether axis2 is supporting JAX-WS which is the preferred standard. Seems adb is still buggy and no fully schema support. Please advise us soon as this is a big decision to our company. -- Keith Chapman Senior Software Engineer WSO2 Inc. Oxygenating the Web Service Platform. http://wso2.org/ blog: http://www.keith-chapman.org
RE: Axis2 module + Spring
Thanks for the reply. Its not what I am after though. We have AXIS2 as part of our web application. We have web services which are defined as beans in the Spring application context loaded as part of the web application. We also want our modules defined as beans from the same application context. For example our logging module requires a datasource. This datasource is already defined in Spring for the web application. I suppose I am trying to avoid having to setup things twice in 2 different places. Thanks Paul -Original Message- From: robert lazarski [mailto:robertlazar...@gmail.com] Sent: 16 December 2008 13:37 To: axis-user@ws.apache.org Subject: Re: Axis2 module + Spring On Tue, Dec 16, 2008 at 7:52 AM, Paul French paul.fre...@kirona.com wrote: Hello All, There is support to supply a Spring managed bean as a service using the ServiceObjectSupplier parameter in the services.xml. However is there similar support for modules? For example I want to log all Soap messages into a database from a module. I would like to obtain a fully configured module handler from Spring. Is this possible? Thanks Paul Getting spring setup sort of anyplace, anytime like axis2 does is pretty simple, and you could use this ApplicationContextHolder class that comes with the distro. The only thing I'm not sure about with concerning modules is getting a handle to a Classloader reference, since you need either a servlet container or the Classloader from Axis2Service when used to integrate Axis2 services. A module though is totally different and you may not really need to integrate with axis2, just run spring inside of it. In that case, I'd try something like(not tested): public class MyModule implements Module { // initialize the module public void init(ConfigurationContext configContext, AxisModule module) throws AxisFault { ClassLoader classLoader = getClass().getClassLoader(); ClassPathXmlApplicationContext appCtx = new ClassPathXmlApplicationContext(new String[] {applicationContext.xml}, false); appCtx.setClassLoader(classLoader); appCtx.refresh(); } define this bean as shown in the docs: !-- Configure spring to give a hook to axis2 without a ServletContext -- bean id=applicationContext class=org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder / Then every time you need a bean reference: ApplicationContext aCtx = ApplicationContextHolder.getContext(); MyObject = (MyObject) aCtx.getBean(myBean); HTH, Robert __ NOD32 3695 (20081216) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com
Re: Axis2 module + Spring
On Tue, Dec 16, 2008 at 1:08 PM, Paul French paul.fre...@kirona.com wrote: Thanks for the reply. Its not what I am after though. We have AXIS2 as part of our web application. We have web services which are defined as beans in the Spring application context loaded as part of the web application. We also want our modules defined as beans from the same application context. For example our logging module requires a datasource. This datasource is already defined in Spring for the web application. I suppose I am trying to avoid having to setup things twice in 2 different places. Well that's why I mentioned the Classloader reference issue, in case you needed it, and you do. IIRC both Modules and AAR's have their own classloader. Axis2Service is used to supply the Classloader reference in the AAR case. I'm not sure how to get the equivalent in Module.init() as I see no examples in the source, or even if you did it'd work correctly with the Classloader stuff in AbstractMessageReceiver. Maybe someone like Deepal can comment further. - R
Axis2 module + Spring
Hello All, There is support to supply a Spring managed bean as a service using the ServiceObjectSupplier parameter in the services.xml. However is there similar support for modules? For example I want to log all Soap messages into a database from a module. I would like to obtain a fully configured module handler from Spring. Is this possible? Thanks Paul
Re: Axis2 module + Spring
On Tue, Dec 16, 2008 at 7:52 AM, Paul French paul.fre...@kirona.com wrote: Hello All, There is support to supply a Spring managed bean as a service using the ServiceObjectSupplier parameter in the services.xml. However is there similar support for modules? For example I want to log all Soap messages into a database from a module. I would like to obtain a fully configured module handler from Spring. Is this possible? Thanks Paul Getting spring setup sort of anyplace, anytime like axis2 does is pretty simple, and you could use this ApplicationContextHolder class that comes with the distro. The only thing I'm not sure about with concerning modules is getting a handle to a Classloader reference, since you need either a servlet container or the Classloader from Axis2Service when used to integrate Axis2 services. A module though is totally different and you may not really need to integrate with axis2, just run spring inside of it. In that case, I'd try something like(not tested): public class MyModule implements Module { // initialize the module public void init(ConfigurationContext configContext, AxisModule module) throws AxisFault { ClassLoader classLoader = getClass().getClassLoader(); ClassPathXmlApplicationContext appCtx = new ClassPathXmlApplicationContext(new String[] {applicationContext.xml}, false); appCtx.setClassLoader(classLoader); appCtx.refresh(); } define this bean as shown in the docs: !-- Configure spring to give a hook to axis2 without a ServletContext -- bean id=applicationContext class=org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder / Then every time you need a bean reference: ApplicationContext aCtx = ApplicationContextHolder.getContext(); MyObject = (MyObject) aCtx.getBean(myBean); HTH, Robert
Axis2 and Spring 2.5
Hello, I have a axis2 web service which have to use Spring 2.5. How can I avoid that these jars are conflicting with the one which are delivered with Axis2? Thanks, Jens -- View this message in context: http://www.nabble.com/Axis2-and-Spring-2.5-tp19085761p19085761.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 and Spring 2.5
axis2 1.4 doesn't have jars from the spring framswork in the release. One of the axis2 jars has a reference to a few spring interfaces - whose signature has been constant since spring 1.0 . Anyways, just put what springframwork jars you need in WEB-INF/lib . I'd be suprised if there is a problem. HTH, Robert On Thu, Aug 21, 2008 at 7:02 AM, Jens Goldhammer [EMAIL PROTECTED] wrote: Hello, I have a axis2 web service which have to use Spring 2.5. How can I avoid that these jars are conflicting with the one which are delivered with Axis2? Thanks, Jens -- View this message in context: http://www.nabble.com/Axis2-and-Spring-2.5-tp19085761p19085761.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 and Spring 2.5
Thanks, I will give it a try. Jens iksrazal wrote: axis2 1.4 doesn't have jars from the spring framswork in the release. One of the axis2 jars has a reference to a few spring interfaces - whose signature has been constant since spring 1.0 . Anyways, just put what springframwork jars you need in WEB-INF/lib . I'd be suprised if there is a problem. HTH, Robert On Thu, Aug 21, 2008 at 7:02 AM, Jens Goldhammer [EMAIL PROTECTED] wrote: Hello, I have a axis2 web service which have to use Spring 2.5. How can I avoid that these jars are conflicting with the one which are delivered with Axis2? Thanks, Jens -- View this message in context: http://www.nabble.com/Axis2-and-Spring-2.5-tp19085761p19085761.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Axis2-and-Spring-2.5-tp19085761p19087475.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: axis2 with spring, ibatis
Thank you Mr. Bull. Could you send me your sql-map-config.xml? My sql-map-config.xml is ?xml version=1.0 encoding=UTF-8? !DOCTYPE sqlMapConfig PUBLIC -//ibatis.apache.org//DTD SQL Map Config 2.0//EN http://ibatis.apache.org/dtd/sql-map-config-2.dtd; sqlMapConfig sqlMap resource=misc.xml/ /sqlMapConfig And I got the errors: [java] [ERROR] The ChkUniqnameService.aar service, which is not valid, caus ed Error creating bean with name 'sqlMapClient' defined in class path resource [ applicationContext.xml]: Invocation of init method failed; nested exception is j ava.lang.RuntimeException: Error occurred. Cause: com.ibatis.common.xml.Nodelet Exception: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: java.io.IOException: Could not find resour ce misc.xml -Henry Anthony Bull wrote: I'm doing iBatis, Spring in an AAR in production released Axis 2 web services. In our case it is even harder than the equivalent hibernate setup, especially if you have multiple web services doing it and don't want them treading on each other's SQL maps. If the Spring with Hibernate tutorial doesn't work in your case, I've done a tutorial on how I got my iBatis/Spring/Axis2 setup working that you can try out: http://thejavamonkey.blogspot.com/2008/04/axis-2-web-services-with-spring-and.html cheers, Ants. robert lazarski wrote: I've never used ibatis, but presumably you'd load its config files via the classpath like you do with hibernate. Hint: load the resources in an exploded AAR as its easier. There's some tips on loading hibernate files in the spring tutorial and a good place to start would be trying the same thing with ibatis. HTH, Robert On Tue, Apr 15, 2008 at 2:39 PM, Henry Lu [EMAIL PROTECTED] wrote: Are there anyones who are using axis2 with spring and ibatis to access a database? Could some one show me how to do this in the service (not client) with an aar file? I don't know how to initialize/load the ibatis map file. -Henry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Anthony - Anthony Bull Senior Developer Black Coffee Software Ltd PO Box 10-192 The Terrace Wellington, New Zealand [EMAIL PROTECTED] Ph +64 4 472 8818 Fax +64 4 472 8811 - www.bcsoft.co.nz --- This email may contain confidential or privileged information, and is intended for use only by the addressee, or addressees. If you are not the intended recipient please advise the sender immediately and do not copy, use or disclose the contents to any other person or organisation. Black Coffee Software Ltd accepts no responsibility for viruses received with this email, or to any changes made to the original content. Any views or opinions expressed in this email may be personal to the sender and are not necessarily those of Black Coffee Software Ltd. --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
axis2 with spring, ibatis
Are there anyones who are using axis2 with spring and ibatis to access a database? Could some one show me how to do this in the service (not client) with an aar file? I don't know how to initialize/load the ibatis map file. -Henry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: axis2 with spring, ibatis
I've never used ibatis, but presumably you'd load its config files via the classpath like you do with hibernate. Hint: load the resources in an exploded AAR as its easier. There's some tips on loading hibernate files in the spring tutorial and a good place to start would be trying the same thing with ibatis. HTH, Robert On Tue, Apr 15, 2008 at 2:39 PM, Henry Lu [EMAIL PROTECTED] wrote: Are there anyones who are using axis2 with spring and ibatis to access a database? Could some one show me how to do this in the service (not client) with an aar file? I don't know how to initialize/load the ibatis map file. -Henry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: axis2 with spring, ibatis
Where did you configure the loading files in an aar file for the axis2 service? There is no web.xml file, do we? -Henry robert lazarski wrote: I've never used ibatis, but presumably you'd load its config files via the classpath like you do with hibernate. Hint: load the resources in an exploded AAR as its easier. There's some tips on loading hibernate files in the spring tutorial and a good place to start would be trying the same thing with ibatis. HTH, Robert On Tue, Apr 15, 2008 at 2:39 PM, Henry Lu [EMAIL PROTECTED] wrote: Are there anyones who are using axis2 with spring and ibatis to access a database? Could some one show me how to do this in the service (not client) with an aar file? I don't know how to initialize/load the ibatis map file. -Henry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: axis2 with spring, ibatis
I'm doing iBatis, Spring in an AAR in production released Axis 2 web services. In our case it is even harder than the equivalent hibernate setup, especially if you have multiple web services doing it and don't want them treading on each other's SQL maps. If the Spring with Hibernate tutorial doesn't work in your case, I've done a tutorial on how I got my iBatis/Spring/Axis2 setup working that you can try out: http://thejavamonkey.blogspot.com/2008/04/axis-2-web-services-with-spring-and.html cheers, Ants. robert lazarski wrote: I've never used ibatis, but presumably you'd load its config files via the classpath like you do with hibernate. Hint: load the resources in an exploded AAR as its easier. There's some tips on loading hibernate files in the spring tutorial and a good place to start would be trying the same thing with ibatis. HTH, Robert On Tue, Apr 15, 2008 at 2:39 PM, Henry Lu [EMAIL PROTECTED] wrote: Are there anyones who are using axis2 with spring and ibatis to access a database? Could some one show me how to do this in the service (not client) with an aar file? I don't know how to initialize/load the ibatis map file. -Henry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Anthony - Anthony Bull Senior Developer Black Coffee Software Ltd PO Box 10-192 The Terrace Wellington, New Zealand [EMAIL PROTECTED] Ph +64 4 472 8818 Fax +64 4 472 8811 - www.bcsoft.co.nz --- This email may contain confidential or privileged information, and is intended for use only by the addressee, or addressees. If you are not the intended recipient please advise the sender immediately and do not copy, use or disclose the contents to any other person or organisation. Black Coffee Software Ltd accepts no responsibility for viruses received with this email, or to any changes made to the original content. Any views or opinions expressed in this email may be personal to the sender and are not necessarily those of Black Coffee Software Ltd. ---
Axis2 and Spring - Method expose problem
Hi, i am using Axis2 web services with spring. I am injecting some manager services in the web service by configuring them in the application context and using setter methods in the web service implementation. Just works fine, but the setter methods are exposed as web service methods if i run myservise?wsdl. What can i do to hide them ? They must be defined as public. Regards, Tobias
Re: Axis2 and Spring - Method expose problem
Two options: 1) In your services.xml, include the following: service ... excludeOperations operationsetService/operation /excludeOperations /service Replace setService with your setter. 2) Use constructor injection rather than setter injection. Ben On Dec 2, 2007 3:13 PM, Tobias Anstett [EMAIL PROTECTED] wrote: Hi, i am using Axis2 web services with spring. I am injecting some manager services in the web service by configuring them in the application context and using setter methods in the web service implementation. Just works fine, but the setter methods are exposed as web service methods if i run myservise?wsdl. What can i do to hide them ? They must be defined as public. Regards, Tobias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
axis2 with spring and application scope
I'm using axis2 1.3 with spring 2.0.4. Maybe I'm doing something wrong, I have a servicegroup and the services inside the group have scope=application. The services are spring beans, and they themselves use other springbeans. I tested that the scope is working. However, the services are not injected with the beans they need. (the beans that the services use are null) If you modify the sample service pojoguidespring (from axis distribution) to use application scope, it does not work. (from services.xml service name=SpringInit class=sample.spring.service.SpringInit scope=application service name=WeatherSpringService scope=application ) However when not setting scope (which defaults to request) sample service pojoguidespring works. Is there a way to use Spring with a servicegroup and services with application scope? Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: axis2 with spring and application scope
Does your class have implements ServiceLifeCycle ? Basically, ServiceLifeCycle is a axis2 supplied way to do init somewhat like what HttpServlet and load-on-startup does - mostly for any type of inside the aar init IIRC. So ServiceLifeCycle is just one option. Perhaps Deepal can comment on application scope with ServiceLifeCycle as I've never tried that. Are you seeing any exceptions in the logs? I know its possible to run spring outside the aar, using the servlet container to init spring via putting all the spring jars in WEB-INF/lib . HTH, Robert On Nov 22, 2007 8:08 AM, Rolando Cuevas [EMAIL PROTECTED] wrote: I'm using axis2 1.3 with spring 2.0.4. Maybe I'm doing something wrong, I have a servicegroup and the services inside the group have scope=application. The services are spring beans, and they themselves use other springbeans. I tested that the scope is working. However, the services are not injected with the beans they need. (the beans that the services use are null) If you modify the sample service pojoguidespring (from axis distribution) to use application scope, it does not work. (from services.xml service name=SpringInit class=sample.spring.service.SpringInit scope=application service name=WeatherSpringService scope=application ) However when not setting scope (which defaults to request) sample service pojoguidespring works. Is there a way to use Spring with a servicegroup and services with application scope? Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: axis2 with spring and application scope
On Nov 22, 2007 9:39 AM, robert lazarski [EMAIL PROTECTED] wrote: Does your class have implements ServiceLifeCycle ? Basically, ServiceLifeCycle is a axis2 supplied way to do init somewhat like what HttpServlet and load-on-startup does - mostly for any type of inside the aar init IIRC. So ServiceLifeCycle is just one option. Yes The class I use to init Spring implements ServiceLifeCycle. There are no exceptions in the log. I see the startup method is called. Also the log shows the spring beans are created. However when the service is called, the needed beans are not there. When the service has application scope, it seems as if the classes for the services are obtained by Axis itself (without using spring) I also tested the exploded version of my service. It shows the same behavior, the needed bean s are null. The easiest way to reproduce the situation is to modify the sample service pojoguidespring (from axis distribution). When services.xml is modified to use application scope, the service does not work. (the sample pojoguidespring works when using scope request). Thanks. Perhaps Deepal can comment on application scope with ServiceLifeCycle as I've never tried that. Are you seeing any exceptions in the logs? I know its possible to run spring outside the aar, using the servlet container to init spring via putting all the spring jars in WEB-INF/lib . HTH, Robert On Nov 22, 2007 8:08 AM, Rolando Cuevas [EMAIL PROTECTED] wrote: I'm using axis2 1.3 with spring 2.0.4. Maybe I'm doing something wrong, I have a servicegroup and the services inside the group have scope=application. The services are spring beans, and they themselves use other springbeans. I tested that the scope is working. However, the services are not injected with the beans they need. (the beans that the services use are null) If you modify the sample service pojoguidespring (from axis distribution) to use application scope, it does not work. (from services.xml service name=SpringInit class=sample.spring.service.SpringInit scope=application service name=WeatherSpringService scope=application ) However when not setting scope (which defaults to request) sample service pojoguidespring works. Is there a way to use Spring with a servicegroup and services with application scope? Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: axis2 with spring doesn't work on the weblogic, I have a temp solution
hi all, I am so disappointed to tell you it didn't work according to what Robert said yet. The issue: the standard war package without specific weblogic config file extracted into autodeploy dictionary of weblogic9.2 did work well! But the war package didn't work. The exception as follow(by the way I am using the axis2.1.3.): Caused by: java.lang.NullPointerException at org.apache.axis2.extensions.spring.receivers.SpringServletContextObje ctSupplier.getServiceObject(SpringServletContextObjectSupplier.java:58) the corresponding code is : Parameter servletConfigParam = axisService.getAxisConfiguration().getParameter(HTTPConstants.HTTP_SERVLETCONFIG); I am sure that axisService.getAxisConfiguration() was NULL! I think http://ws.apache.org/axis2/1_3/app_server.html is stale. As the link inside the web is still about weblogic8.1. The most thing is that It didn't work when I did it according to the instruction. config is below: the axis2.war\META-INF\weblogic-application.xml file : ?xml version=1.0? weblogic-application xmlns=http://www.bea.com/ns/weblogic/90; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; prefer-application-packages package-namecom.ctc.wstx.*/package-name package-namejavax.xml.*/package-name package-nameorg.apache.*/package-name /prefer-application-packages /weblogic-application the axis2.war\WEB-INF\weblogic.xml : ?xml version=1.0 encoding=UTF-8? weblogic-web-app xmlns=http://www.bea.com/ns/weblogic/90; container-descriptor prefer-web-inf-classestrue/prefer-web-inf-classes /container-descriptor /weblogic-web-app whether the app is deployed by war package or not, the exception is : java.lang.ClassCastException: com.ctc.wstx.stax.WstxInputFactory at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136 ) at weblogic.servlet.internal.WebAppHelper.addListenerElements(WebAppHelp er.java:244) at weblogic.servlet.internal.WebAppHelper$IOHelperImpl.parseXML(WebAppHe lper.java:224) at weblogic.descriptor.DescriptorCache.parseXML(DescriptorCache.java:324 ) at weblogic.servlet.internal.WebAppHelper.registerTagLibListeners(WebApp Helper.java:174) Do you have any advice? Thank you very much. Regards javafoot - Original Message - From: robert lazarski [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, November 12, 2007 8:57 PM Subject: Re: axis2 with spring doesn't work on the weblogic, I have a temp solution Oh yeah, please follow the instructions in the link first and my general ideas. If that fails, any patches need to be put into a jira issue that you create. My guess though is that this is a weblogic classloader issue that can be solved via the link below. Robert On Nov 12, 2007 7:53 AM, robert lazarski [EMAIL PROTECTED] wrote: What version of axis2 are you using? You don't seem to be using the latest stable version 1.3, as line 58 is: 58 if (servletConfigParam == null) { Furthermore, have you read this? http://ws.apache.org/axis2/1_3/app_server.html Your problem seems like its classloader related, ie, its possible by following the instructions in the above link you can solve the problem. While its been a while since I've used weblogic, some simple googling show people have been running spring / axis2 / weblogic successfully. If all else fails, while I'm hesitant to patch axis2 for specific app servers and would probably verify the problem myself first that there's absolutely no other way - the first step would be getting your code to compile with svn or a nightly: http://people.apache.org/dist/axis2/nightly/ http://ws.apache.org/axis2/svn.html HTH, Robert On Nov 12, 2007 6:22 AM, Diegoq Lin [EMAIL PROTECTED] wrote: hi all, I have a strange issue. I integrated axis2 and spring2.0.5. And I distributed the app on the tomcat5.5.20, it works well. but the same war package was put down the directory autodeploy of weblogic9.2, It didn't work and had many excetions. The most valueable exception is as follow: Caused by: java.lang.NullPointerException at org.apache.axis2.extensions.spring.receivers.SpringServletContextObje ctSupplier.getServiceObject(SpringServletContextObjectSupplier.java:58) ... 53 more I inquired the code in number 58: Parameter servletConfigParam = axisService.getAxisConfiguration() .getParameter(HTTPConstants.HTTP_SERVLETCONFIG); if (servletConfigParam == null) { throw new Exception(Axis2 Can't find ServletConfigParameter); } Object obj = servletConfigParam.getValue(); ServletContext servletContext; if (obj instanceof ServletConfig) { ServletConfig servletConfig = (ServletConfig)obj; servletContext = servletConfig.getServletContext(); } else { throw new Exception(Axis2 Can't find ServletConfig); } ApplicationContext aCtx = WebApplicationContextUtils.getWebApplicationContext(servletContext); any help
Re: axis2 with spring doesn't work on the weblogic, I have a temp solution
Yes, I have advice: prevent weblogic from loading its own stax version in its higher precedence classloader. Please read these instructions carefully from: http://ws.apache.org/axis2/1_3/app_server.html 2. Lack of namespacing on serialised items BEA WebLogic Server 9.0 comes with its own StAX implementation. This results in lack of namespacing on serialised items. In turn, WebLogic server (WLS) breaks with AXIOM on the WLS classpath. Hence a filtering classloader is required: Adding the following to weblogic-application.xml should resolve this issue: prefer-application-packages package-namecom.ctc.wstx.*/package-name package-namejavax.xml.*/package-name package-nameorg.apache.*/package-name /prefer-application-packages HTH, Robert On Nov 13, 2007 5:18 AM, Diegoq Lin [EMAIL PROTECTED] wrote: hi all, I am so disappointed to tell you it didn't work according to what Robert said yet. The issue: the standard war package without specific weblogic config file extracted into autodeploy dictionary of weblogic9.2 did work well! But the war package didn't work. The exception as follow(by the way I am using the axis2.1.3.): Caused by: java.lang.NullPointerException at org.apache.axis2.extensions.spring.receivers.SpringServletContextObje ctSupplier.getServiceObject(SpringServletContextObjectSupplier.java:58) the corresponding code is : Parameter servletConfigParam = axisService.getAxisConfiguration().getParameter(HTTPConstants.HTTP_SERVLETCONFIG); I am sure that axisService.getAxisConfiguration() was NULL! I think http://ws.apache.org/axis2/1_3/app_server.html is stale. As the link inside the web is still about weblogic8.1. The most thing is that It didn't work when I did it according to the instruction. config is below: the axis2.war\META-INF\weblogic-application.xml file : ?xml version=1.0? weblogic-application xmlns=http://www.bea.com/ns/weblogic/90; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; prefer-application-packages package-namecom.ctc.wstx.*/package-name package-namejavax.xml.*/package-name package-nameorg.apache.*/package-name /prefer-application-packages /weblogic-application the axis2.war\WEB-INF\weblogic.xml : ?xml version=1.0 encoding=UTF-8? weblogic-web-app xmlns=http://www.bea.com/ns/weblogic/90; container-descriptor prefer-web-inf-classestrue/prefer-web-inf-classes /container-descriptor /weblogic-web-app whether the app is deployed by war package or not, the exception is : java.lang.ClassCastException: com.ctc.wstx.stax.WstxInputFactory at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136 ) at weblogic.servlet.internal.WebAppHelper.addListenerElements(WebAppHelp er.java:244) at weblogic.servlet.internal.WebAppHelper$IOHelperImpl.parseXML(WebAppHe lper.java:224) at weblogic.descriptor.DescriptorCache.parseXML(DescriptorCache.java:324 ) at weblogic.servlet.internal.WebAppHelper.registerTagLibListeners(WebApp Helper.java:174) Do you have any advice? Thank you very much. Regards javafoot - Original Message - From: robert lazarski [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, November 12, 2007 8:57 PM Subject: Re: axis2 with spring doesn't work on the weblogic, I have a temp solution Oh yeah, please follow the instructions in the link first and my general ideas. If that fails, any patches need to be put into a jira issue that you create. My guess though is that this is a weblogic classloader issue that can be solved via the link below. Robert On Nov 12, 2007 7:53 AM, robert lazarski [EMAIL PROTECTED] wrote: What version of axis2 are you using? You don't seem to be using the latest stable version 1.3, as line 58 is: 58 if (servletConfigParam == null) { Furthermore, have you read this? http://ws.apache.org/axis2/1_3/app_server.html Your problem seems like its classloader related, ie, its possible by following the instructions in the above link you can solve the problem. While its been a while since I've used weblogic, some simple googling show people have been running spring / axis2 / weblogic successfully. If all else fails, while I'm hesitant to patch axis2 for specific app servers and would probably verify the problem myself first that there's absolutely no other way - the first step would be getting your code to compile with svn or a nightly: http://people.apache.org/dist/axis2/nightly/ http://ws.apache.org/axis2/svn.html HTH, Robert On Nov 12, 2007 6:22 AM, Diegoq Lin [EMAIL PROTECTED] wrote: hi all, I have a strange issue. I integrated axis2 and spring2.0.5. And I distributed the app on the tomcat5.5.20, it works well. but the same war package was put down the directory autodeploy of weblogic9.2, It didn't work and had many excetions. The most valueable exception is as follow
axis2 with spring doesn't work on the weblogic, I have a temp solution
hi all, I have a strange issue. I integrated axis2 and spring2.0.5. And I distributed the app on the tomcat5.5.20, it works well. but the same war package was put down the directory autodeploy of weblogic9.2, It didn't work and had many excetions. The most valueable exception is as follow: Caused by: java.lang.NullPointerException at org.apache.axis2.extensions.spring.receivers.SpringServletContextObje ctSupplier.getServiceObject(SpringServletContextObjectSupplier.java:58) ... 53 more I inquired the code in number 58: Parameter servletConfigParam = axisService.getAxisConfiguration() .getParameter(HTTPConstants.HTTP_SERVLETCONFIG); if (servletConfigParam == null) { throw new Exception(Axis2 Can't find ServletConfigParameter); } Object obj = servletConfigParam.getValue(); ServletContext servletContext; if (obj instanceof ServletConfig) { ServletConfig servletConfig = (ServletConfig)obj; servletContext = servletConfig.getServletContext(); } else { throw new Exception(Axis2 Can't find ServletConfig); } ApplicationContext aCtx = WebApplicationContextUtils.getWebApplicationContext(servletContext); any help would be appreciated. the method main function is just find out the spring application context in the servletContext properties. after servlet initialized phase, ConfigurationContext and AxisConfiguration objects are impossibly null. why axis2 get a null object? see the getAxisConfiguration method: public AxisConfiguration getAxisConfiguration() { if (this instanceof AxisConfiguration) { return (AxisConfiguration) this; } if (this.parent != null) { return this.parent.getAxisConfiguration(); } return null; } the implementation of the method is the problem! I don't know how to do correctly. my temp solution that can make the application work on the weblogic is as follow: 1.add the bean in applicationContext.xml: ?xml version=1.0 encoding=UTF-8? beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd; bean id=myVersion class=sample.axisversion.Version / bean id=globalSpringContext class=sample.axisversion.GlobalSpringContext lazy-init=false / /beans 2.new the class GlobalSpringContext.java: package sample.axisversion; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; public class GlobalSpringContext implements ApplicationContextAware { private static ApplicationContext ac; /* (non-Javadoc) * @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext) */ public void setApplicationContext(ApplicationContext ac) throws BeansException { GlobalSpringContext.ac = ac; } public static ApplicationContext getApplicationContext() { return ac; } } 3.new the MyServiceObjectSupplier.java: package sample.axisversion; import org.apache.axis2.AxisFault; import org.apache.axis2.description.AxisService; import org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier; import org.apache.axis2.i18n.Messages; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.ApplicationContext; public class MyServiceObjectSupplier extends SpringServletContextObjectSupplier { private static Log log = LogFactory.getLog(MyServiceObjectSupplier.class); /** * Method getServiceObject that is Spring aware via ServletContext. * * @param axisService * @return Returns Object. * @throws AxisFault */ public Object getServiceObject(AxisService axisService) throws AxisFault { try { String beanName = ((String)axisService.getParameter(SERVICE_SPRING_BEANNAME).getValue()).trim(); if (beanName != null) { ApplicationContext aCtx = GlobalSpringContext.getApplicationContext(); if (aCtx == null) { log.warn(Axis2 Can't find Spring's ApplicationContext); return null; } else if (aCtx.getBean(beanName) == null) { throw new Exception(Axis2 Can't find Spring Bean: + beanName); } return aCtx.getBean(beanName); } else { throw new AxisFault( Messages.getMessage(paramIsNotSpecified, SERVICE_SPRING_BEANNAME)); } } catch (Exception e) { throw AxisFault.makeFault(e); } } } 4.services.xml: service name=Version description This service is to get the running Axis version /description
Re: axis2 with spring doesn't work on the weblogic, I have a temp solution
What version of axis2 are you using? You don't seem to be using the latest stable version 1.3, as line 58 is: 58 if (servletConfigParam == null) { Furthermore, have you read this? http://ws.apache.org/axis2/1_3/app_server.html Your problem seems like its classloader related, ie, its possible by following the instructions in the above link you can solve the problem. While its been a while since I've used weblogic, some simple googling show people have been running spring / axis2 / weblogic successfully. If all else fails, while I'm hesitant to patch axis2 for specific app servers and would probably verify the problem myself first that there's absolutely no other way - the first step would be getting your code to compile with svn or a nightly: http://people.apache.org/dist/axis2/nightly/ http://ws.apache.org/axis2/svn.html HTH, Robert On Nov 12, 2007 6:22 AM, Diegoq Lin [EMAIL PROTECTED] wrote: hi all, I have a strange issue. I integrated axis2 and spring2.0.5. And I distributed the app on the tomcat5.5.20, it works well. but the same war package was put down the directory autodeploy of weblogic9.2, It didn't work and had many excetions. The most valueable exception is as follow: Caused by: java.lang.NullPointerException at org.apache.axis2.extensions.spring.receivers.SpringServletContextObje ctSupplier.getServiceObject(SpringServletContextObjectSupplier.java:58) ... 53 more I inquired the code in number 58: Parameter servletConfigParam = axisService.getAxisConfiguration() .getParameter(HTTPConstants.HTTP_SERVLETCONFIG); if (servletConfigParam == null) { throw new Exception(Axis2 Can't find ServletConfigParameter); } Object obj = servletConfigParam.getValue(); ServletContext servletContext; if (obj instanceof ServletConfig) { ServletConfig servletConfig = (ServletConfig)obj; servletContext = servletConfig.getServletContext(); } else { throw new Exception(Axis2 Can't find ServletConfig); } ApplicationContext aCtx = WebApplicationContextUtils.getWebApplicationContext(servletContext); any help would be appreciated. the method main function is just find out the spring application context in the servletContext properties. after servlet initialized phase, ConfigurationContext and AxisConfiguration objects are impossibly null. why axis2 get a null object? see the getAxisConfiguration method: public AxisConfiguration getAxisConfiguration() { if (this instanceof AxisConfiguration) { return (AxisConfiguration) this; } if (this.parent != null) { return this.parent.getAxisConfiguration(); } return null; } the implementation of the method is the problem! I don't know how to do correctly. my temp solution that can make the application work on the weblogic is as follow: 1.add the bean in applicationContext.xml: ?xml version=1.0 encoding=UTF-8? beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd; bean id=myVersion class=sample.axisversion.Version / bean id=globalSpringContext class=sample.axisversion.GlobalSpringContext lazy-init=false / /beans 2.new the class GlobalSpringContext.java: package sample.axisversion; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; public class GlobalSpringContext implements ApplicationContextAware { private static ApplicationContext ac; /* (non-Javadoc) * @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext) */ public void setApplicationContext(ApplicationContext ac) throws BeansException { GlobalSpringContext.ac = ac; } public static ApplicationContext getApplicationContext() { return ac; } } 3.new the MyServiceObjectSupplier.java: package sample.axisversion; import org.apache.axis2.AxisFault; import org.apache.axis2.description.AxisService; import org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier; import org.apache.axis2.i18n.Messages; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.ApplicationContext; public class MyServiceObjectSupplier extends SpringServletContextObjectSupplier { private static Log log = LogFactory.getLog(MyServiceObjectSupplier.class); /** * Method getServiceObject that is Spring aware via ServletContext. * * @param axisService * @return Returns Object. * @throws AxisFault */ public Object getServiceObject(AxisService axisService) throws AxisFault { try
Re: axis2 with spring doesn't work on the weblogic, I have a temp solution
Oh yeah, please follow the instructions in the link first and my general ideas. If that fails, any patches need to be put into a jira issue that you create. My guess though is that this is a weblogic classloader issue that can be solved via the link below. Robert On Nov 12, 2007 7:53 AM, robert lazarski [EMAIL PROTECTED] wrote: What version of axis2 are you using? You don't seem to be using the latest stable version 1.3, as line 58 is: 58 if (servletConfigParam == null) { Furthermore, have you read this? http://ws.apache.org/axis2/1_3/app_server.html Your problem seems like its classloader related, ie, its possible by following the instructions in the above link you can solve the problem. While its been a while since I've used weblogic, some simple googling show people have been running spring / axis2 / weblogic successfully. If all else fails, while I'm hesitant to patch axis2 for specific app servers and would probably verify the problem myself first that there's absolutely no other way - the first step would be getting your code to compile with svn or a nightly: http://people.apache.org/dist/axis2/nightly/ http://ws.apache.org/axis2/svn.html HTH, Robert On Nov 12, 2007 6:22 AM, Diegoq Lin [EMAIL PROTECTED] wrote: hi all, I have a strange issue. I integrated axis2 and spring2.0.5. And I distributed the app on the tomcat5.5.20, it works well. but the same war package was put down the directory autodeploy of weblogic9.2, It didn't work and had many excetions. The most valueable exception is as follow: Caused by: java.lang.NullPointerException at org.apache.axis2.extensions.spring.receivers.SpringServletContextObje ctSupplier.getServiceObject(SpringServletContextObjectSupplier.java:58) ... 53 more I inquired the code in number 58: Parameter servletConfigParam = axisService.getAxisConfiguration() .getParameter(HTTPConstants.HTTP_SERVLETCONFIG); if (servletConfigParam == null) { throw new Exception(Axis2 Can't find ServletConfigParameter); } Object obj = servletConfigParam.getValue(); ServletContext servletContext; if (obj instanceof ServletConfig) { ServletConfig servletConfig = (ServletConfig)obj; servletContext = servletConfig.getServletContext(); } else { throw new Exception(Axis2 Can't find ServletConfig); } ApplicationContext aCtx = WebApplicationContextUtils.getWebApplicationContext(servletContext); any help would be appreciated. the method main function is just find out the spring application context in the servletContext properties. after servlet initialized phase, ConfigurationContext and AxisConfiguration objects are impossibly null. why axis2 get a null object? see the getAxisConfiguration method: public AxisConfiguration getAxisConfiguration() { if (this instanceof AxisConfiguration) { return (AxisConfiguration) this; } if (this.parent != null) { return this.parent.getAxisConfiguration(); } return null; } the implementation of the method is the problem! I don't know how to do correctly. my temp solution that can make the application work on the weblogic is as follow: 1.add the bean in applicationContext.xml: ?xml version=1.0 encoding=UTF-8? beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd; bean id=myVersion class=sample.axisversion.Version / bean id=globalSpringContext class=sample.axisversion.GlobalSpringContext lazy-init=false / /beans 2.new the class GlobalSpringContext.java: package sample.axisversion; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; public class GlobalSpringContext implements ApplicationContextAware { private static ApplicationContext ac; /* (non-Javadoc) * @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext) */ public void setApplicationContext(ApplicationContext ac) throws BeansException { GlobalSpringContext.ac = ac; } public static ApplicationContext getApplicationContext() { return ac; } } 3.new the MyServiceObjectSupplier.java: package sample.axisversion; import org.apache.axis2.AxisFault; import org.apache.axis2.description.AxisService; import org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier; import org.apache.axis2.i18n.Messages; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import
questions regarding axis2 with Spring
I hope someone could help me to solve this problem.Thanks!!! I combined axis2 with Spring framework. When I visit the endpoint address (http://localhost/services/sVendorWebservice) and got following message: org.apache.axis2.AxisFault: I can not find a service for this request to be serviced. Check the WSDL and the request URI; but the wsdl discrption can be shown in http://localhost/services/sVendorWebservice?wsdl. But the instesting part in wsdl is that the request URI in wsdl is http://localhost:80//services/sVendorWebservice;, not http://localhost:80/services/sVendorWebservice; - wsdl:service name=sVendorWebservice - wsdl:port name=sVendorWebserviceSOAP11port_http binding=axis2:sVendorWebserviceSOAP11Binding soap:address location=http://localhost:80//services/sVendorWebservice; / /wsdl:port - wsdl:port name=sVendorWebserviceSOAP12port_http binding=axis2:sVendorWebserviceSOAP12Binding soap12:address location=http://localhost:80//services/sVendorWebservice; / /wsdl:port - wsdl:port name=sVendorWebserviceHttpport1 binding=axis2:sVendorWebserviceHttpBinding http:address location=http://localhost:80//rest/sVendorWebservice; / /wsdl:port /wsdl:service -- View this message in context: http://www.nabble.com/questions-regarding-axis2-with-Spring-tf4579418.html#a13072537 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: questions regarding axis2 with Spring
That's probably not an error due to spring, but rather your services aren't installed or your client is hitting the wrong url. Go to this url to see what services you have installed and what url your client should use to access them: http://localhost:8080/axis2/axis2-web/HappyAxis.jsp HTH, Robert On 10/6/07, ianwong [EMAIL PROTECTED] wrote: I hope someone could help me to solve this problem.Thanks!!! I combined axis2 with Spring framework. When I visit the endpoint address (http://localhost/services/sVendorWebservice) and got following message: org.apache.axis2.AxisFault: I can not find a service for this request to be serviced. Check the WSDL and the request URI; but the wsdl discrption can be shown in http://localhost/services/sVendorWebservice?wsdl. But the instesting part in wsdl is that the request URI in wsdl is http://localhost:80//services/sVendorWebservice;, not http://localhost:80/services/sVendorWebservice; - wsdl:service name=sVendorWebservice - wsdl:port name=sVendorWebserviceSOAP11port_http binding=axis2:sVendorWebserviceSOAP11Binding soap:address location=http://localhost:80//services/sVendorWebservice; / /wsdl:port - wsdl:port name=sVendorWebserviceSOAP12port_http binding=axis2:sVendorWebserviceSOAP12Binding soap12:address location=http://localhost:80//services/sVendorWebservice; / /wsdl:port - wsdl:port name=sVendorWebserviceHttpport1 binding=axis2:sVendorWebserviceHttpBinding http:address location=http://localhost:80//rest/sVendorWebservice; / /wsdl:port /wsdl:service -- View this message in context: http://www.nabble.com/questions-regarding-axis2-with-Spring-tf4579418.html#a13072537 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: questions regarding axis2 with Spring
I didn't deploy the axis2 war in my applicaiton, so http://localhost:8080/axis2/axis2-web/HappyAxis.jsp does not exist. Do I need pack whole web services files into a war or jar file, then deploy it into web applicaiton? Btw, what the actuall address for saving services.xml? I tired many places:\WEB-INF; \WEB-INF\services; \WEB-INF\services\sVendorWebservice\META-INF , but always got that error message. And I got a expcetions only one time: Invalid service META-INF directory not found Thanks!!! iksrazal wrote: That's probably not an error due to spring, but rather your services aren't installed or your client is hitting the wrong url. Go to this url to see what services you have installed and what url your client should use to access them: http://localhost:8080/axis2/axis2-web/HappyAxis.jsp HTH, Robert On 10/6/07, ianwong [EMAIL PROTECTED] wrote: I hope someone could help me to solve this problem.Thanks!!! I combined axis2 with Spring framework. When I visit the endpoint address (http://localhost/services/sVendorWebservice) and got following message: org.apache.axis2.AxisFault: I can not find a service for this request to be serviced. Check the WSDL and the request URI; but the wsdl discrption can be shown in http://localhost/services/sVendorWebservice?wsdl. But the instesting part in wsdl is that the request URI in wsdl is http://localhost:80//services/sVendorWebservice;, not http://localhost:80/services/sVendorWebservice; - wsdl:service name=sVendorWebservice - wsdl:port name=sVendorWebserviceSOAP11port_http binding=axis2:sVendorWebserviceSOAP11Binding soap:address location=http://localhost:80//services/sVendorWebservice; / /wsdl:port - wsdl:port name=sVendorWebserviceSOAP12port_http binding=axis2:sVendorWebserviceSOAP12Binding soap12:address location=http://localhost:80//services/sVendorWebservice; / /wsdl:port - wsdl:port name=sVendorWebserviceHttpport1 binding=axis2:sVendorWebserviceHttpBinding http:address location=http://localhost:80//rest/sVendorWebservice; / /wsdl:port /wsdl:service -- View this message in context: http://www.nabble.com/questions-regarding-axis2-with-Spring-tf4579418.html#a13072537 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/questions-regarding-axis2-with-Spring-tf4579418.html#a13072777 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: questions regarding axis2 with Spring
I placed the aar file into \WEB-INF\services\sVendorWebservice\. The arr includes services.xml Finally, a exception occurs: org.apache.axis2.deployment.DeploymentException: Invalid service META-INF directory not found; nested exception is: org.apache.axis2.deployment.DeploymentException: Invalid service META-INF directory not found at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs(ArchiveReader.java:255) Where is the proper place for aar? ianwong wrote: I hope someone could help me to solve this problem.Thanks!!! I combined axis2 with Spring framework. When I visit the endpoint address (http://localhost/services/sVendorWebservice) and got following message: org.apache.axis2.AxisFault: I can not find a service for this request to be serviced. Check the WSDL and the request URI; but the wsdl discrption can be shown in http://localhost/services/sVendorWebservice?wsdl. But the instesting part in wsdl is that the request URI in wsdl is http://localhost:80//services/sVendorWebservice;, not http://localhost:80/services/sVendorWebservice; - wsdl:service name=sVendorWebservice - wsdl:port name=sVendorWebserviceSOAP11port_http binding=axis2:sVendorWebserviceSOAP11Binding soap:address location=http://localhost:80//services/sVendorWebservice; / /wsdl:port - wsdl:port name=sVendorWebserviceSOAP12port_http binding=axis2:sVendorWebserviceSOAP12Binding soap12:address location=http://localhost:80//services/sVendorWebservice; / /wsdl:port - wsdl:port name=sVendorWebserviceHttpport1 binding=axis2:sVendorWebserviceHttpBinding http:address location=http://localhost:80//rest/sVendorWebservice; / /wsdl:port /wsdl:service -- View this message in context: http://www.nabble.com/questions-regarding-axis2-with-Spring-tf4579418.html#a13074394 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sample Axis2 with Spring
Quick Guide or sample code? -- View this message in context: http://www.nabble.com/Sample-Axis2-with-Spring-tf3854131.html#a10919298 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 with Spring
Rosan, see my comments inline: On 3/29/07, Rosan Roche [EMAIL PROTECTED] wrote: Hi, I am trying the example in http://ws.apache.org/axis2/1_1_1/spring.html#23 I put the services and modules directory under WEB-INF/ dir of my application. Also copied the springExample.aar file under services. 1) Should I include the AxisServlet under web.xml since this is not mentioned in the above url? I tried both including/excluding the axis servlet. In the custom war case, you want it to act just like the axis2.war does only with you own name and additional features. Also, for your own war you'll probably need axis2-web too, so in my tomcat that's : ~/tomcat/webapps/axis2/axis2-web Or could be: ~/tomcat/webapps/mywar/axis2-web So to access the axis2 welcome! page simply use the url http://localhost:8080/mywar . That page will give you a services link , and clicking thru that should show the spring service associated with you war. To get that far, you need the AxisServlet configured pretty much identically to the way it is configured in the default axis2.war - and the axis2-web folder. Lastly, don't forget you'll need /tomcat/webapps/axis2/WEB-INF/conf directory in your war as in ~/tomcat/webapps/mywar/WEB-INF/conf 2) How can I make spring read the services.xml file. Looks like the service is not configured. Spring does _NOT_ read the services.xml file - it simply does not need it. Its an axis2 detail, and if configured correctly axis2 will auotmatically read the contents of any aar in the services dir. 3) Should the aar file also contain the wsdl ? You need a wsdl only if you are using databinding, ie, running wsdl2java . POJO and RPC based services don't need an wsdl for example. I still get the below exception while accessing the url: http://localhost:8080/mm/services ERROR org.apache.axis2.transport.http.AxisServlet - org.apache.axis2.AxisFault: I can not find a service for this request to be serviced. Check the WSDL and the request URI Try just: http://localhost:8080/mm To get the axis2 welcome! page. Note that the client in the spring example uses http://localhost:8080/axis2/services/SpringAwareService as the endpoint. You may consider using the axis2.war first before attempting to create your own war. Or perhaps rename the axis2.war to the name of your war, and place your entire web.xml in the axis2.xml . Then follow the instructions above to get to the 'welcome!page. Let us know if you still get stuck. HTH, Robert Thanks robert lazarski [EMAIL PROTECTED] wrote: Jetty should be ok. I assume since you got this far that all the axis2 jars are under WEB-INF/lib. If you look at the expanded axis2.war via 'jar xf axis2.war', you'll see the services dir and also a modules dir. I suggest simply copying in its entirety the services and modules directory to your expanded war. Then place your new aar, with the services.xml configured for spring, under the services dir. From that point, let us know if you still have problems. Robert On 3/27/07, Rosan Roche wrote: Where should the aar file be placed. I am using Jetty server from eclipse to test. After the server startup, while checking for services, I get the exception: I can not find a service for this request to be serviced. Check the WSDL and the request URI. Thanks robert lazarski wrote: http://ws.apache.org/axis2/1_1_1/spring.html#24 points to the without a servlet context section , yet you have a web.xml and are loading spring there. That's fine, but you need to have an AAR file with just the services.xml file in it. Try http://ws.apache.org/axis2/1_1_1/spring.html#23 and see how that goes. As shown further down in the same docs, the structure of your AAR in this case will be like: ./springExample.aar ./META-INF ./META-INF/MANIFEST.MF ./META-INF/services.xml Further hint: look at the Axis2 Web Application Home Page section in this link where you can see a list of your services: http://ws.apache.org/axis2/1_1_1/installationguide.html HTH, Robert On 3/27/07, Rosan Roche wrote: I am trying to integrate the existing Spring application I have with axis2. I am following the example from http://ws.apache.org/axis2/1_1_1/spring.html#24. I have added the Axis servlet to my web.xml file along with the existing servlet that is being used by the main application. When I try to access the service at http://localhost:8080/mm/services/SpringAwareService, I get an exception: org.apache.axis2.AxisFault: I can not find a service for this request to be serviced. Check the WSDL and the request URI How does the services.xml get loaded? Should it be explicitly loaded while startup? Should I create a WSDL? web.xml PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; Media Management contextConfigLocation classpath:applicationContext.xml configuration deployment
Re: Axis2 with Spring
s/axis2.xml/web.xml Robert On 3/30/07, robert lazarski [EMAIL PROTECTED] wrote: Rosan, see my comments inline: On 3/29/07, Rosan Roche [EMAIL PROTECTED] wrote: Hi, I am trying the example in http://ws.apache.org/axis2/1_1_1/spring.html#23 I put the services and modules directory under WEB-INF/ dir of my application. Also copied the springExample.aar file under services. 1) Should I include the AxisServlet under web.xml since this is not mentioned in the above url? I tried both including/excluding the axis servlet. In the custom war case, you want it to act just like the axis2.war does only with you own name and additional features. Also, for your own war you'll probably need axis2-web too, so in my tomcat that's : ~/tomcat/webapps/axis2/axis2-web Or could be: ~/tomcat/webapps/mywar/axis2-web So to access the axis2 welcome! page simply use the url http://localhost:8080/mywar . That page will give you a services link , and clicking thru that should show the spring service associated with you war. To get that far, you need the AxisServlet configured pretty much identically to the way it is configured in the default axis2.war - and the axis2-web folder. Lastly, don't forget you'll need /tomcat/webapps/axis2/WEB-INF/conf directory in your war as in ~/tomcat/webapps/mywar/WEB-INF/conf 2) How can I make spring read the services.xml file. Looks like the service is not configured. Spring does _NOT_ read the services.xml file - it simply does not need it. Its an axis2 detail, and if configured correctly axis2 will auotmatically read the contents of any aar in the services dir. 3) Should the aar file also contain the wsdl ? You need a wsdl only if you are using databinding, ie, running wsdl2java . POJO and RPC based services don't need an wsdl for example. I still get the below exception while accessing the url: http://localhost:8080/mm/services ERROR org.apache.axis2.transport.http.AxisServlet - org.apache.axis2.AxisFault: I can not find a service for this request to be serviced. Check the WSDL and the request URI Try just: http://localhost:8080/mm To get the axis2 welcome! page. Note that the client in the spring example uses http://localhost:8080/axis2/services/SpringAwareService as the endpoint. You may consider using the axis2.war first before attempting to create your own war. Or perhaps rename the axis2.war to the name of your war, and place your entire web.xml in the axis2.xml . Then follow the instructions above to get to the 'welcome!page. Let us know if you still get stuck. HTH, Robert Thanks robert lazarski [EMAIL PROTECTED] wrote: Jetty should be ok. I assume since you got this far that all the axis2 jars are under WEB-INF/lib. If you look at the expanded axis2.war via 'jar xf axis2.war', you'll see the services dir and also a modules dir. I suggest simply copying in its entirety the services and modules directory to your expanded war. Then place your new aar, with the services.xml configured for spring, under the services dir. From that point, let us know if you still have problems. Robert On 3/27/07, Rosan Roche wrote: Where should the aar file be placed. I am using Jetty server from eclipse to test. After the server startup, while checking for services, I get the exception: I can not find a service for this request to be serviced. Check the WSDL and the request URI. Thanks robert lazarski wrote: http://ws.apache.org/axis2/1_1_1/spring.html#24 points to the without a servlet context section , yet you have a web.xml and are loading spring there. That's fine, but you need to have an AAR file with just the services.xml file in it. Try http://ws.apache.org/axis2/1_1_1/spring.html#23 and see how that goes. As shown further down in the same docs, the structure of your AAR in this case will be like: ./springExample.aar ./META-INF ./META-INF/MANIFEST.MF ./META-INF/services.xml Further hint: look at the Axis2 Web Application Home Page section in this link where you can see a list of your services: http://ws.apache.org/axis2/1_1_1/installationguide.html HTH, Robert On 3/27/07, Rosan Roche wrote: I am trying to integrate the existing Spring application I have with axis2. I am following the example from http://ws.apache.org/axis2/1_1_1/spring.html#24. I have added the Axis servlet to my web.xml file along with the existing servlet that is being used by the main application. When I try to access the service at http://localhost:8080/mm/services/SpringAwareService, I get an exception: org.apache.axis2.AxisFault: I can not find a service for this request to be serviced. Check the WSDL and the request URI How does the services.xml get loaded? Should it be explicitly loaded while startup? Should I create a WSDL? web.xml PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd;
Re: Axis2 with Spring
Hi, I am trying the example in http://ws.apache.org/axis2/1_1_1/spring.html#23 I put the services and modules directory under WEB-INF/ dir of my application. Also copied the springExample.aar file under services. 1) Should I include the AxisServlet under web.xml since this is not mentioned in the above url? I tried both including/excluding the axis servlet. 2) How can I make spring read the services.xml file. Looks like the service is not configured. 3) Should the aar file also contain the wsdl ? I still get the below exception while accessing the url: http://localhost:8080/mm/services ERROR org.apache.axis2.transport.http.AxisServlet - org.apache.axis2.AxisFault: I can not find a service for this request to be serviced. Check the WSDL and the request URI Thanks robert lazarski [EMAIL PROTECTED] wrote: Jetty should be ok. I assume since you got this far that all the axis2 jars are under WEB-INF/lib. If you look at the expanded axis2.war via 'jar xf axis2.war', you'll see the services dir and also a modules dir. I suggest simply copying in its entirety the services and modules directory to your expanded war. Then place your new aar, with the services.xml configured for spring, under the services dir. From that point, let us know if you still have problems. Robert On 3/27/07, Rosan Roche wrote: Where should the aar file be placed. I am using Jetty server from eclipse to test. After the server startup, while checking for services, I get the exception: I can not find a service for this request to be serviced. Check the WSDL and the request URI. Thanks robert lazarski wrote: http://ws.apache.org/axis2/1_1_1/spring.html#24 points to the without a servlet context section , yet you have a web.xml and are loading spring there. That's fine, but you need to have an AAR file with just the services.xml file in it. Try http://ws.apache.org/axis2/1_1_1/spring.html#23 and see how that goes. As shown further down in the same docs, the structure of your AAR in this case will be like: ./springExample.aar ./META-INF ./META-INF/MANIFEST.MF ./META-INF/services.xml Further hint: look at the Axis2 Web Application Home Page section in this link where you can see a list of your services: http://ws.apache.org/axis2/1_1_1/installationguide.html HTH, Robert On 3/27/07, Rosan Roche wrote: I am trying to integrate the existing Spring application I have with axis2. I am following the example from http://ws.apache.org/axis2/1_1_1/spring.html#24. I have added the Axis servlet to my web.xml file along with the existing servlet that is being used by the main application. When I try to access the service at http://localhost:8080/mm/services/SpringAwareService, I get an exception: org.apache.axis2.AxisFault: I can not find a service for this request to be serviced. Check the WSDL and the request URI How does the services.xml get loaded? Should it be explicitly loaded while startup? Should I create a WSDL? web.xml PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; Media Management contextConfigLocation classpath:applicationContext.xml configuration deployment org.springframework.web.context.ContextLoaderListener mm wicket.protocol.http.WicketServlet applicationFactoryClassName wicket.spring.SpringWebApplicationFactory 1 axis org.apache.axis2.transport.http.AxisServlet 5 axis /services/* Thanks Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - TV dinner still cooling? Check out Tonight's Picks on Yahoo! TV.
Re: Axis2 with Spring
Where should the aar file be placed. I am using Jetty server from eclipse to test. After the server startup, while checking for services, I get the exception: I can not find a service for this request to be serviced. Check the WSDL and the request URI. Thanks robert lazarski [EMAIL PROTECTED] wrote: http://ws.apache.org/axis2/1_1_1/spring.html#24 points to the without a servlet context section , yet you have a web.xml and are loading spring there. That's fine, but you need to have an AAR file with just the services.xml file in it. Try http://ws.apache.org/axis2/1_1_1/spring.html#23 and see how that goes. As shown further down in the same docs, the structure of your AAR in this case will be like: ./springExample.aar ./META-INF ./META-INF/MANIFEST.MF ./META-INF/services.xml Further hint: look at the Axis2 Web Application Home Page section in this link where you can see a list of your services: http://ws.apache.org/axis2/1_1_1/installationguide.html HTH, Robert On 3/27/07, Rosan Roche wrote: I am trying to integrate the existing Spring application I have with axis2. I am following the example from http://ws.apache.org/axis2/1_1_1/spring.html#24. I have added the Axis servlet to my web.xml file along with the existing servlet that is being used by the main application. When I try to access the service at http://localhost:8080/mm/services/SpringAwareService, I get an exception: org.apache.axis2.AxisFault: I can not find a service for this request to be serviced. Check the WSDL and the request URI How does the services.xml get loaded? Should it be explicitly loaded while startup? Should I create a WSDL? web.xml PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; Media Management contextConfigLocation classpath:applicationContext.xml configuration deployment development -- org.springframework.web.context.ContextLoaderListener mm wicket.protocol.http.WicketServlet applicationFactoryClassName wicket.spring.SpringWebApplicationFactory 1 axis org.apache.axis2.transport.http.AxisServlet 5 axis /services/* Thanks Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list.
Re: Axis2 with Spring
Jetty should be ok. I assume since you got this far that all the axis2 jars are under WEB-INF/lib. If you look at the expanded axis2.war via 'jar xf axis2.war', you'll see the services dir and also a modules dir. I suggest simply copying in its entirety the services and modules directory to your expanded war. Then place your new aar, with the services.xml configured for spring, under the services dir. From that point, let us know if you still have problems. Robert On 3/27/07, Rosan Roche [EMAIL PROTECTED] wrote: Where should the aar file be placed. I am using Jetty server from eclipse to test. After the server startup, while checking for services, I get the exception: I can not find a service for this request to be serviced. Check the WSDL and the request URI. Thanks robert lazarski [EMAIL PROTECTED] wrote: http://ws.apache.org/axis2/1_1_1/spring.html#24 points to the without a servlet context section , yet you have a web.xml and are loading spring there. That's fine, but you need to have an AAR file with just the services.xml file in it. Try http://ws.apache.org/axis2/1_1_1/spring.html#23 and see how that goes. As shown further down in the same docs, the structure of your AAR in this case will be like: ./springExample.aar ./META-INF ./META-INF/MANIFEST.MF ./META-INF/services.xml Further hint: look at the Axis2 Web Application Home Page section in this link where you can see a list of your services: http://ws.apache.org/axis2/1_1_1/installationguide.html HTH, Robert On 3/27/07, Rosan Roche wrote: I am trying to integrate the existing Spring application I have with axis2. I am following the example from http://ws.apache.org/axis2/1_1_1/spring.html#24. I have added the Axis servlet to my web.xml file along with the existing servlet that is being used by the main application. When I try to access the service at http://localhost:8080/mm/services/SpringAwareService, I get an exception: org.apache.axis2.AxisFault: I can not find a service for this request to be serviced. Check the WSDL and the request URI How does the services.xml get loaded? Should it be explicitly loaded while startup? Should I create a WSDL? web.xml PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; Media Management contextConfigLocation classpath:applicationContext.xml configuration deployment org.springframework.web.context.ContextLoaderListener mm wicket.protocol.http.WicketServlet applicationFactoryClassName wicket.spring.SpringWebApplicationFactory 1 axis org.apache.axis2.transport.http.AxisServlet 5 axis /services/* Thanks Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Loading a resource from the classpath in Axis2 with Spring
Hello, I'm running Axis2 1.1.1 with Spring. I've got my ServiceTCCL set to composite (It'd be great to see some documentation on this; I know there are three settings, but I'm not exactly sure what each of them does). My problem is that I'm using iBATIS, which tries to load resources from the classpath. This doesn't work because it is not possible to set the ClassLoader that iBATIS uses (I think). (In my ServiceLifeCycle.startUp, I set Spring's ClassLoader like this: )appCtx.setClassLoader(service.getClassLoader()). So my question is, is there a solution for this? Right now, the only thing I can think of is to put the resources in the servlet's WEB-INF/classes directory. Also, as a side note, I am able to load the first iBATIS config file (because this is set in my Spring app context XML file), it's the files that this first config file references that cannot be read (this happens in iBATIS code). I tried to put all my config data in that first file, but iBATIS will not let you do this. Thanks for any help, Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loading a resource from the classpath in Axis2 with Spring
Ian, So if we enforce the ServiceTCCL/composite for startUp would that fix it? Please log a JIRA enhancement issue. thanks, dims On 3/9/07, Ian Shafer [EMAIL PROTECTED] wrote: Hello, I'm running Axis2 1.1.1 with Spring. I've got my ServiceTCCL set to composite (It'd be great to see some documentation on this; I know there are three settings, but I'm not exactly sure what each of them does). My problem is that I'm using iBATIS, which tries to load resources from the classpath. This doesn't work because it is not possible to set the ClassLoader that iBATIS uses (I think). (In my ServiceLifeCycle.startUp, I set Spring's ClassLoader like this: )appCtx.setClassLoader(service.getClassLoader()). So my question is, is there a solution for this? Right now, the only thing I can think of is to put the resources in the servlet's WEB-INF/classes directory. Also, as a side note, I am able to load the first iBATIS config file (because this is set in my Spring app context XML file), it's the files that this first config file references that cannot be read (this happens in iBATIS code). I tried to put all my config data in that first file, but iBATIS will not let you do this. Thanks for any help, Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loading a resource from the classpath in Axis2 with Spring
I assume he's already loading spring via startUp() as the tutorial suggests, does the idea you have add to that concept somehow ? The issue is I was never able to get xml files via the classpath found for hibernate inside the AAR - iBATIS and Hibernate both can be configured via spring. So the issue is you can pass files to spring as such: property name=mappingLocations valueclasspath*:**/MyEntity.hbm.xml/value /property Running in spring DEBUG mode with that config will show all the classpath locations . The issue AFAICT is that I was never able to get the lib dir inside the aar to be found by spring as a classpath location. Robert On 3/9/07, Davanum Srinivas [EMAIL PROTECTED] wrote: Ian, So if we enforce the ServiceTCCL/composite for startUp would that fix it? Please log a JIRA enhancement issue. thanks, dims On 3/9/07, Ian Shafer [EMAIL PROTECTED] wrote: Hello, I'm running Axis2 1.1.1 with Spring. I've got my ServiceTCCL set to composite (It'd be great to see some documentation on this; I know there are three settings, but I'm not exactly sure what each of them does). My problem is that I'm using iBATIS, which tries to load resources from the classpath. This doesn't work because it is not possible to set the ClassLoader that iBATIS uses (I think). (In my ServiceLifeCycle.startUp, I set Spring's ClassLoader like this: )appCtx.setClassLoader(service.getClassLoader()). So my question is, is there a solution for this? Right now, the only thing I can think of is to put the resources in the servlet's WEB-INF/classes directory. Also, as a side note, I am able to load the first iBATIS config file (because this is set in my Spring app context XML file), it's the files that this first config file references that cannot be read (this happens in iBATIS code). I tried to put all my config data in that first file, but iBATIS will not let you do this. Thanks for any help, Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loading a resource from the classpath in Axis2 with Spring
Ian-- The scenario seems to manifest by which context loader you are using to load the config file where a WebApplicationContext classLoader will favour loading from /WEB-INF but other contexts such as ClassPathXmlApplicationContext or FileSystemXmlApplicationContext favour either locating the configfile on CLASSPATH -or- absolute path (usually specified as file:some valid file URL path) Cheers, Martin-- --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. --- Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. - Original Message - From: Ian Shafer [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Friday, March 09, 2007 12:12 PM Subject: Loading a resource from the classpath in Axis2 with Spring Hello, I'm running Axis2 1.1.1 with Spring. I've got my ServiceTCCL set to composite (It'd be great to see some documentation on this; I know there are three settings, but I'm not exactly sure what each of them does). My problem is that I'm using iBATIS, which tries to load resources from the classpath. This doesn't work because it is not possible to set the ClassLoader that iBATIS uses (I think). (In my ServiceLifeCycle.startUp, I set Spring's ClassLoader like this: )appCtx.setClassLoader(service.getClassLoader()). So my question is, is there a solution for this? Right now, the only thing I can think of is to put the resources in the servlet's WEB-INF/classes directory. Also, as a side note, I am able to load the first iBATIS config file (because this is set in my Spring app context XML file), it's the files that this first config file references that cannot be read (this happens in iBATIS code). I tried to put all my config data in that first file, but iBATIS will not let you do this. Thanks for any help, Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loading a resource from the classpath in Axis2 with Spring
Am Freitag, den 09.03.2007, 09:12 -0800 schrieb Ian Shafer: Also, as a side note, I am able to load the first iBATIS config file (because this is set in my Spring app context XML file), it's the files that this first config file references that cannot be read (this happens in iBATIS code). I tried to put all my config data in that first file, but iBATIS will not let you do this. There are other ways to store multiple configuration files in your app context XML file--I don't know if you have tried this, maybe it would help: http://www.jroller.com/page/gmazza?entry=refactoring_the_spring_mvc_web Glen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Article on using Axis2 and Spring
In case you didn't see this. http://www.devx.com/Java/Article/33839 -- Paul Fremantle VP/Technology, WSO2 and OASIS WS-RX TC Co-chair http://bloglines.com/blog/paulfremantle [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
axis2 and spring
I am trying to figure out if I can integrate spring with axis2 outside and inside the aar at the same time. For instance I have a bunch of services implemented within their own .aar file and I want them to each have their own spring application context, but also when I create that application context in the startup() method in each of my Services I want to set a parent application context that is defined outside the aar. The idea being is that beans defined outside the aar provide shared services such defining a 'datasource' bean to beans defined within the aar. So can the two methods of creating an application context inside and outside the aar co-exist together - I see that the docs suggest that when using the outside aar approach that the axis2-spring-*.jar files must be moved from WEB-INF/lib so I don't see how the spring application context could be created outside the aar. Many Thanks Trevor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: axis2 and spring
Your treading new ground - I think you may be the first person to try this with axis2 and spring. In the ClassPathXmlApplicationContext class , as shown in startUp() in the aar scenario , there is a constuctor that supports passing the parent ApplicationContext . So what I would try first is putting the ApplicationContextHolder bean at the Servlet level / parent application context level. From there there you could try using the axis2 class ApplicationContextHolder static method getContext() to use that for the parent app ctx arg in startUp() . That may introduce classloader issues since that took a while to get right, though it may just work. Alternatively, forget the services.xml spring config and the lifecycle stuff , and just use getContext().getBean() in each service in a locally configured, yet another bean that implements ApplicationContextAware. I'm probably forgetting something but that should get you started. This would be kool if you got it working so let us know about your progress . It'd be kool, if you were interested, you're able to, and it works in the end, to get this in the docs. HTH, Robert On 1/10/07, Trevor McCullough [EMAIL PROTECTED] wrote: I am trying to figure out if I can integrate spring with axis2 outside and inside the aar at the same time. For instance I have a bunch of services implemented within their own .aar file and I want them to each have their own spring application context, but also when I create that application context in the startup() method in each of my Services I want to set a parent application context that is defined outside the aar. The idea being is that beans defined outside the aar provide shared services such defining a 'datasource' bean to beans defined within the aar. So can the two methods of creating an application context inside and outside the aar co-exist together - I see that the docs suggest that when using the outside aar approach that the axis2-spring-*.jar files must be moved from WEB-INF/lib so I don't see how the spring application context could be created outside the aar. Many Thanks Trevor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 and Spring: Preserving Service Isolation
Hi Robert,I am happy to load spring.jar from the Axis2/WEB-INF/lib folder.cheers,Declan- Original Message From: robert lazarski [EMAIL PROTECTED]To: axis-user@ws.apache.orgSent: Wednesday, 23 August, 2006 11:53:05 PMSubject: Re: Axis2 and Spring: Preserving Service IsolationYes, the spring docs are focused so far on the simpler cases.Configuring spring via na AAR isn't documented yet as I need to domore testing, but to asnswer your question I need to know where do youwant to load the spring.jar from , inside the AAR or WEB-INF/lib ?If the spring.jar is loaded from WEB-INF/lib , that's no problem and Ican show you how to load your applicationContext.xml / beanRef.xmlfrom the aar to configure Spring and you can use theServiceObjectSupplier method to wire your beans as explained in thedocs. One caveat: I need to test this with multiple AAR's, but myinitial tests shows that it can work for one AAR .If the spring.jar is loaded inside the AAR , you still can load yourapplicationContext.xml from the aar. I'm still thinking thru, however,if you wanted to how you could use the ServiceObjectSupplier in thatcase . That's because the Spring ApplicationContext object, in thespring jar inside the aar case , will not be visible at theWEB-INF/lib level where the AbstractMessageReceiver will attempt towire the bean. There's probably a solution here but I still need tothink it thru.In the case of the latter, perhaps I can getAxisService.getClassLoader() at the ServiceObjectSupplier /AbstracMessageReceiver level to get the spring ApplicationContextobject (not the xml file) from the AAR/lib/spring.jar , though thatmay not work in terms of classloader isolation. Someone such as Dimsor Deepal may be able to comment .In any case, the solution at the service level will involve theservice implementing theorg.apache.axis2.engine.Service interfaceand doing the spring config in init() . There is a blocker for thenext release, axis2-1033, that when resolved will permit init() to becalled on server startup much like a servlet load on startup. Myspring inside an aar tests have been calling a service first thatconfigures spring until axis2-1033 is resolved. Once you let me knowwhich scenario you have in mind I'll work with you to get itimplemented.Cheers,Roberthttp://www.braziloutsource.com/On 8/23/06, Declan Dunleavy [EMAIL PROTECTED] wrote: Hi, I emailed Robert Lazarski to get more information about integrating Axis2 with Spring, to which he helpfully pointed me to the following solution: Spring support is in the nightlies: http://people.apache.org/dist/axis2/nightly/ Its documented here: http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/xdocs/latest/spring.html This solution outlined here requires the Spring applicationContext.xml to live outside the AAR service file in the Axis2 WEB-INF folder and is configured within the web.xml, which is not as modular as I would like. I was wondering if there's any way to preserve service isolation by incorporating the ApplicationContext.xml / BeanFactory.xml inside the AAR. As I would prefer not to have to update the axis2 WEB-INF folder applicationContext.xml file with updates to the AARs bean classes every time I release new code. I wasn't sure if it was possible but thought I'd ask Robert anyway. He suggested I post the question here. Thanks in advance for any replies, Declan-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 and Spring: Preserving Service Isolation
() .createXMLStreamWriter(writer)); writer.flush(); System.out.println(Response: + writer.toString()); } catch (Exception ex) { ex.printStackTrace(); } } } I'll be working thru the rest of the classloader issues mentioned as time permits. HTH, Robert http://www.braziloutsource.com/ On 8/24/06, Declan Dunleavy [EMAIL PROTECTED] wrote: Hi Robert, I am happy to load spring.jar from the Axis2/WEB-INF/lib folder. cheers, Declan - Original Message From: robert lazarski [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Wednesday, 23 August, 2006 11:53:05 PM Subject: Re: Axis2 and Spring: Preserving Service Isolation Yes, the spring docs are focused so far on the simpler cases. Configuring spring via na AAR isn't documented yet as I need to do more testing, but to asnswer your question I need to know where do you want to load the spring.jar from , inside the AAR or WEB-INF/lib ? If the spring.jar is loaded from WEB-INF/lib , that's no problem and I can show you how to load your applicationContext.xml / beanRef.xml from the aar to configure Spring and you can use the ServiceObjectSupplier method to wire your beans as explained in the docs. One caveat: I need to test this with multiple AAR's, but my initial tests shows that it can work for one AAR . If the spring.jar is loaded inside the AAR , you still can load your applicationContext.xml from the aar. I'm still thinking thru, however, if you wanted to how you could use the ServiceObjectSupplier in that case . That's because the Spring ApplicationContext object, in the spring jar inside the aar case , will not be visible at the WEB-INF/lib level where the AbstractMessageReceiver will attempt to wire the bean. There's probably a solution here but I still need to think it thru. In the case of the latter, perhaps I can get AxisService.getClassLoader() at the ServiceObjectSupplier / AbstracMessageReceiver level to get the spring ApplicationContext object (not the xml file) from the AAR/lib/spring.jar , though that may not work in terms of classloader isolation. Someone such as Dims or Deepal may be able to comment . In any case, the solution at the service level will involve the service implementing the org.apache.axis2.engine.Service interface and doing the spring config in init() . There is a blocker for the next release, axis2-1033, that when resolved will permit init() to be called on server startup much like a servlet load on startup. My spring inside an aar tests have been calling a service first that configures spring until axis2-1033 is resolved. Once you let me know which scenario you have in mind I'll work with you to get it implemented. Cheers, Robert http://www.braziloutsource.com/ On 8/23/06, Declan Dunleavy [EMAIL PROTECTED] wrote: Hi, I emailed Robert Lazarski to get more information about integrating Axis2 with Spring, to which he helpfully pointed me to the following solution: Spring support is in the nightlies: http://people.apache.org/dist/axis2/nightly/ Its documented here: http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/xdocs/latest/spring.html This solution outlined here requires the Spring applicationContext.xml to live outside the AAR service file in the Axis2 WEB-INF folder and is configured within the web.xml, which is not as modular as I would like. I was wondering if there's any way to preserve service isolation by incorporating the ApplicationContext.xml / BeanFactory.xml inside the AAR. As I would prefer not to have to update the axis2 WEB-INF folder applicationContext.xml file with updates to the AARs bean classes every time I release new code. I wasn't sure if it was possible but thought I'd ask Robert anyway. He suggested I post the question here. Thanks in advance for any replies, Declan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 and Spring: Preserving Service Isolation
OK, by placing the axis2-spring-SNAPSHOT.jar along with the spring.jar inside the aar seems to work, which is I think a good solution as each Spring / AAR classloader should then be completely isolated, ie, the ServiceObjectSupplier will then be taken from the AAR classloader. More test are needed - especially multiple AAR's - but so far it looks promising. Robert http://www.braziloutsource.com/ On 8/24/06, robert lazarski [EMAIL PROTECTED] wrote: What I'm going to show is experimental. If you have the spring jar in WEB-INF/lib and only one AAR, it seems to work. Multiple AAR's still need to be tested. Furthermore, I'm hoping axis2-1033 when resolved will avoid the need for a Spring init service. Have your AAR like so: ./springExample.aar ./META-INF ./META-INF/MANIFEST.MF ./META-INF/services.xml ./applicationContext.xml ./spring ./spring/MyBean.class ./spring/MyBeanImpl.class ./spring/SpringAwareService.class ./spring/SpringInit.class services.xml is: serviceGroup service name=SpringInit description Spring init /description parameter name=ServiceClass locked=falsespring.SpringInit/parameter operation name=springInit messageReceiver class=org.apache.axis2.receivers.RawXMLINOutMessageReceiver/ /operation /service service name=SpringAwareService description simple spring example /description parameter name=ServiceObjectSupplier locked=falseorg.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier/parameter parameter name=SpringBeanName locked=falsespringAwareService/parameter operation name=getValue messageReceiver class=org.apache.axis2.receivers.RawXMLINOutMessageReceiver/ /operation /service /serviceGroup The Spring init service follows - the rest is based on the tutorial: package spring; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMText; import org.apache.axis2.engine.Service; import org.apache.axis2.context.ConfigurationContext; import org.apache.axis2.context.OperationContext; import org.apache.axis2.context.ServiceContext; import org.apache.axis2.description.AxisService; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class SpringInit implements Service { private static Log logger = LogFactory .getLog(SpringInit .class); // The web service public OMElement springInit(OMElement ignore) { OMFactory factory= OMAbstractFactory.getOMFactory(); OMNamespace payloadNs= factory.createOMNamespace( http://springExample.org/example1;, example1); OMElement payload = factory.createOMElement(string, payloadNs); OMText response = factory.createOMText(Spring did application context init); payload.addChild(response); return payload; } /* */ public void init(ServiceContext serviceContext) { AxisService axisService = serviceContext.getAxisService(); ClassLoader classLoader = axisService.getClassLoader(); ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(new String[] {applicationContext.xml}, false); ctx.setClassLoader(classLoader); ctx.refresh(); if (logger.isDebugEnabled()) { logger.debug(\n\ninit() set spring classloader via axisService.getClassLoader() ... ); } } public void setOperationContext(OperationContext arg0) { } public void destroy(ServiceContext arg0) { } } You need to call the spring init client for now: package client; import java.io.StringWriter; import javax.xml.stream.XMLOutputFactory; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.client.Options; import org.apache.axis2.client.ServiceClient; public class SpringInitClient { /** Access point inside the servlet container. **/ private static EndpointReference targetEPR = new EndpointReference( // http://localhost:8080/axis2/services/springExample;); http://localhost:9080/axis2/services/SpringInit;); /** * Simple axis2 client. * * @param args Main */ public static void main(String[] args) { try { OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace omNs = factory.createOMNamespace( http://springExample.org/example1;, example1); OMElement method = factory.createOMElement(springInit, omNs); OMElement value = factory.createOMElement(Text, omNs
Axis2 and Spring: Preserving Service Isolation
Hi,I emailed Robert Lazarski to get more information about integrating Axis2 with Spring, to which he helpfully pointed me to the following solution: Spring support is in the nightlies: http://people.apache.org/dist/axis2/nightly/ Its documented here: http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/xdocs/latest/spring.htmlThis solution outlined here requires the Spring applicationContext.xml to live outside the AAR service file in the Axis2 WEB-INF folder and is configured within the web.xml, which is not as modular as I would like.I was wondering if there's any way to preserve service isolation by incorporating the ApplicationContext.xml / BeanFactory.xml inside the AAR. As I would prefer not to have to update the axis2 WEB-INF folder applicationContext.xml file with updates to the AARs bean classes every time I release new code. I wasn't sure if it was possible but thought I'd ask Robert anyway. He suggested I post the question here.Thanks in advance for any replies,Declan
Re: Axis2 and Spring: Preserving Service Isolation
Yes, the spring docs are focused so far on the simpler cases. Configuring spring via na AAR isn't documented yet as I need to do more testing, but to asnswer your question I need to know where do you want to load the spring.jar from , inside the AAR or WEB-INF/lib ? If the spring.jar is loaded from WEB-INF/lib , that's no problem and I can show you how to load your applicationContext.xml / beanRef.xml from the aar to configure Spring and you can use the ServiceObjectSupplier method to wire your beans as explained in the docs. One caveat: I need to test this with multiple AAR's, but my initial tests shows that it can work for one AAR . If the spring.jar is loaded inside the AAR , you still can load your applicationContext.xml from the aar. I'm still thinking thru, however, if you wanted to how you could use the ServiceObjectSupplier in that case . That's because the Spring ApplicationContext object, in the spring jar inside the aar case , will not be visible at the WEB-INF/lib level where the AbstractMessageReceiver will attempt to wire the bean. There's probably a solution here but I still need to think it thru. In the case of the latter, perhaps I can get AxisService.getClassLoader() at the ServiceObjectSupplier / AbstracMessageReceiver level to get the spring ApplicationContext object (not the xml file) from the AAR/lib/spring.jar , though that may not work in terms of classloader isolation. Someone such as Dims or Deepal may be able to comment . In any case, the solution at the service level will involve the service implementing the org.apache.axis2.engine.Service interface and doing the spring config in init() . There is a blocker for the next release, axis2-1033, that when resolved will permit init() to be called on server startup much like a servlet load on startup. My spring inside an aar tests have been calling a service first that configures spring until axis2-1033 is resolved. Once you let me know which scenario you have in mind I'll work with you to get it implemented. Cheers, Robert http://www.braziloutsource.com/ On 8/23/06, Declan Dunleavy [EMAIL PROTECTED] wrote: Hi, I emailed Robert Lazarski to get more information about integrating Axis2 with Spring, to which he helpfully pointed me to the following solution: Spring support is in the nightlies: http://people.apache.org/dist/axis2/nightly/ Its documented here: http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/xdocs/latest/spring.html This solution outlined here requires the Spring applicationContext.xml to live outside the AAR service file in the Axis2 WEB-INF folder and is configured within the web.xml, which is not as modular as I would like. I was wondering if there's any way to preserve service isolation by incorporating the ApplicationContext.xml / BeanFactory.xml inside the AAR. As I would prefer not to have to update the axis2 WEB-INF folder applicationContext.xml file with updates to the AARs bean classes every time I release new code. I wasn't sure if it was possible but thought I'd ask Robert anyway. He suggested I post the question here. Thanks in advance for any replies, Declan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] use spring configured bean inside axis2 as implementation class
Hi Anderson,Thanks for the feedback and I definitely appreciate it.Once you are free please try out the fix by Dims to the class loading issue.I guess that will take care of the main concern you have. Also you don't have to expose your spring beans (the ones that implement the business logic) directly to leverage the spring support.also please see my comments inline. Regards, Rajith On 8/3/06, Dave Andreasen [EMAIL PROTECTED] wrote: Hi Rajith, Here is how I am putting my application together. I have a set of core services that are Spring beans. I use Hibernate as my persistence tier. The Web services layer calls a Spring service that implements the business logic. Axis2's Spring support allows the developer to expose Spring beans as Web Services. However, I don't really want to expose my Spring beans directly as Web Services. My main motivation for this is that I can change the service interfaces without affecting my public Web services interface. I can also hide some service interfaces that are used by other services but should not be publicly available (I could also just not expose them in the WSDL too). I am also thinking it might help me with versioning down the road since I can have different Web service endpoints for different versions of my API. [RA] You don't have to expose your spring beans (the ones that implement the business logic) directly to leverage the spring support.You could still have the WebService that calls your core spring beans (which implements the business logic) as Spring beans. So you are not directly exposing your business logic, but still you are using spring to wire your web service with the spring beans that implement the business logic. For examplepublic class MyWebService { private MyGreeting myGreeting; // let spring inject the dependencypublic void setMyGreeting(myGreeting){ this.myGreeting = myGreeting; } public String greet(String name){ return myGreeting.greetAccordingToTheTimeOfDay(name); }}//your business logicpublic class MyGreetingImpl implements MyGreeting{ public String greetAccordingToTheTimeOfDay(String name){ // if morning return Good morning + name: } public String greetWithLove(String name){ // . }} My main issues with using Axis2 and Spring revolved around the Service classloader. Spring likes to use the context classloader which does not have access to the resources deployed with the service. I tried setting the classloader for Spring (one can set the classloader for the application context and the bean loader) but I ran into some problems with setting properties on Spring beans that I chalked up to permissions issues. My current workaround is ugly but it works. I deploy the Spring jars and the core services jar in the WEB-INF/lib for Axis2. My service AAR just contains the Web Service skeletons. I do want to try the latest build. The changes in the Service classloader look promising. Unfortunately I am going on vacation for a few days after today. I am also trying to do a QA drop before I go so I am quite busy today. That means I can't try the nightly build until late next week. I would really like to not have to mess with the axis2.war so I am eager to try it out. Thanks for the quick response on the issue though. Dave From: Rajith Attapattu [mailto: [EMAIL PROTECTED]] Sent: Tuesday, August 01, 2006 7:50 PM To: axis-user@ws.apache.org; [EMAIL PROTECTED]Subject: Re: [axis2] use spring configured bean inside axis2 as implementation class Anderson ,I didn't use the extensions because they didn't apply to the approach we used for creating our Spring beans. I did create an Axis module that loads my Spring beans on Axis startup. Anderson if you don't mind I would like to hear about your use case about the spring bean creation. Perhaps we can improve our spring support based on your feedback.Regards,Rajith On 7/31/06, Dave Andreasen [EMAIL PROTECTED] wrote: I had the same issue. The problem is related to the Service using it's own classloader and Spring wanting to use the thread context classloader. See http://issues.apache.org/jira/browse/AXIS2-400. There have been some extensions made to support Spring in Axis2 in the nightly builds. You try pulling them down to see if they help you out. Look at JIRA issue http://issues.apache.org/jira/browse/AXIS2-272 for more information I didn't use the extensions because they didn't apply to the approach we used for creating our Spring beans. I did create an Axis module that loads my Spring beans on Axis startup. Hope this helps! Dave Andreasen From: Shaowei Mao [mailto: [EMAIL PROTECTED]] Sent: Monday, July 31, 2006 2:59 PM To: axis-user@ws.apache.org Subject: [axis2] use spring configured bean inside axis2 as implementation class Hi, I am trying to use spring configured bean by creating spring container inside skeleton generated by wsdl2java to create my own implementation class for web service, but spring container BeanFactory can't
RE: [axis2] use spring configured bean inside axis2 as implementation class
Hi Rajith, Here is how I am putting my application together. I have a set of core services that are Spring beans. I use Hibernate as my persistence tier. The Web services layer calls a Spring service that implements the business logic. Axis2s Spring support allows the developer to expose Spring beans as Web Services. However, I dont really want to expose my Spring beans directly as Web Services. My main motivation for this is that I can change the service interfaces without affecting my public Web services interface. I can also hide some service interfaces that are used by other services but should not be publicly available (I could also just not expose them in the WSDL too). I am also thinking it might help me with versioning down the road since I can have different Web service endpoints for different versions of my API. My main issues with using Axis2 and Spring revolved around the Service classloader. Spring likes to use the context classloader which does not have access to the resources deployed with the service. I tried setting the classloader for Spring (one can set the classloader for the application context and the bean loader) but I ran into some problems with setting properties on Spring beans that I chalked up to permissions issues. My current workaround is ugly but it works. I deploy the Spring jars and the core services jar in the WEB-INF/lib for Axis2. My service AAR just contains the Web Service skeletons. I do want to try the latest build. The changes in the Service classloader look promising. Unfortunately I am going on vacation for a few days after today. I am also trying to do a QA drop before I go so I am quite busy today. That means I cant try the nightly build until late next week. I would really like to not have to mess with the axis2.war so I am eager to try it out. Thanks for the quick response on the issue though. Dave From: Rajith Attapattu [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 7:50 PM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: Re: [axis2] use spring configured bean inside axis2 as implementation class Anderson, I didn't use the extensions because they didn't apply to the approach we used for creating our Spring beans. I did create an Axis module that loads my Spring beans on Axis startup. Anderson if you don't mind I would like to hear about your use case about the spring bean creation. Perhaps we can improve our spring support based on your feedback. Regards, Rajith On 7/31/06, Dave Andreasen [EMAIL PROTECTED] wrote: I had the same issue. The problem is related to the Service using it's own classloader and Spring wanting to use the thread context classloader. See http://issues.apache.org/jira/browse/AXIS2-400. There have been some extensions made to support Spring in Axis2 in the nightly builds. You try pulling them down to see if they help you out. Look at JIRA issue http://issues.apache.org/jira/browse/AXIS2-272 for more information I didn't use the extensions because they didn't apply to the approach we used for creating our Spring beans. I did create an Axis module that loads my Spring beans on Axis startup. Hope this helps! Dave Andreasen From: Shaowei Mao [mailto:[EMAIL PROTECTED]] Sent: Monday, July 31, 2006 2:59 PM To: axis-user@ws.apache.org Subject: [axis2] use spring configured bean inside axis2 as implementation class Hi, I am trying to use spring configured bean by creating spring container inside skeleton generated by wsdl2java to create my own implementation class for web service, but spring container BeanFactory can't load my classes packaged inside axis2 aar file. I think this is related to class loader aixs2 is using for each web service. Does anyone have sample code to solve this problem? Shaowei Mao aMind Solutions LLC Phone: 425-313-3107 Email: [EMAIL PROTECTED] website: www.amindsolutions.com
Re: [axis2] use spring configured bean inside axis2 as implementation class
Dave,Shaowei, If you pick up tonight's nightly, i've fixed this issue class loader problem and you won't need the hack. thanks, dims On 7/31/06, Shaowei Mao [EMAIL PROTECTED] wrote: Dave, thanks for info. I solved class loader problem by setting current thread context class loader. This should work for me now. Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); From: Dave Andreasen [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 1:11 PM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: RE: [axis2] use spring configured bean inside axis2 as implementation class I had the same issue. The problem is related to the Service using it's own classloader and Spring wanting to use the thread context classloader. See http://issues.apache.org/jira/browse/AXIS2-400. There have been some extensions made to support Spring in Axis2 in the nightly builds. You try pulling them down to see if they help you out. Look at JIRA issue http://issues.apache.org/jira/browse/AXIS2-272 for more information I didn't use the extensions because they didn't apply to the approach we used for creating our Spring beans. I did create an Axis module that loads my Spring beans on Axis startup. Hope this helps! Dave Andreasen From: Shaowei Mao [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 2:59 PM To: axis-user@ws.apache.org Subject: [axis2] use spring configured bean inside axis2 as implementation class Hi, I am trying to use spring configured bean by creating spring container inside skeleton generated by wsdl2java to create my own implementation class for web service, but spring container BeanFactory can't load my classes packaged inside axis2 aar file. I think this is related to class loader aixs2 is using for each web service. Does anyone have sample code to solve this problem? Shaowei Mao aMind Solutions LLC Phone: 425-313-3107 Email: [EMAIL PROTECTED] website: www.amindsolutions.com -- Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [axis2] use spring configured bean inside axis2 as implementation class
How did you fix it? -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 11:34 AM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: Re: [axis2] use spring configured bean inside axis2 as implementation class Dave,Shaowei, If you pick up tonight's nightly, i've fixed this issue class loader problem and you won't need the hack. thanks, dims On 7/31/06, Shaowei Mao [EMAIL PROTECTED] wrote: Dave, thanks for info. I solved class loader problem by setting current thread context class loader. This should work for me now. Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader( )); From: Dave Andreasen [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 1:11 PM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: RE: [axis2] use spring configured bean inside axis2 as implementation class I had the same issue. The problem is related to the Service using it's own classloader and Spring wanting to use the thread context classloader. See http://issues.apache.org/jira/browse/AXIS2-400. There have been some extensions made to support Spring in Axis2 in the nightly builds. You try pulling them down to see if they help you out. Look at JIRA issue http://issues.apache.org/jira/browse/AXIS2-272 for more information I didn't use the extensions because they didn't apply to the approach we used for creating our Spring beans. I did create an Axis module that loads my Spring beans on Axis startup. Hope this helps! Dave Andreasen From: Shaowei Mao [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 2:59 PM To: axis-user@ws.apache.org Subject: [axis2] use spring configured bean inside axis2 as implementation class Hi, I am trying to use spring configured bean by creating spring container inside skeleton generated by wsdl2java to create my own implementation class for web service, but spring container BeanFactory can't load my classes packaged inside axis2 aar file. I think this is related to class loader aixs2 is using for each web service. Does anyone have sample code to solve this problem? Shaowei Mao aMind Solutions LLC Phone: 425-313-3107 Email: [EMAIL PROTECTED] website: www.amindsolutions.com -- Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] use spring configured bean inside axis2 as implementation class
http://mail-archives.apache.org/mod_mbox/ws-axis-cvs/200608.mbox/[EMAIL PROTECTED] http://mail-archives.apache.org/mod_mbox/ws-axis-cvs/200608.mbox/[EMAIL PROTECTED] -- dims On 8/1/06, Shaowei Mao [EMAIL PROTECTED] wrote: How did you fix it? -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 11:34 AM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: Re: [axis2] use spring configured bean inside axis2 as implementation class Dave,Shaowei, If you pick up tonight's nightly, i've fixed this issue class loader problem and you won't need the hack. thanks, dims On 7/31/06, Shaowei Mao [EMAIL PROTECTED] wrote: Dave, thanks for info. I solved class loader problem by setting current thread context class loader. This should work for me now. Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader( )); From: Dave Andreasen [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 1:11 PM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: RE: [axis2] use spring configured bean inside axis2 as implementation class I had the same issue. The problem is related to the Service using it's own classloader and Spring wanting to use the thread context classloader. See http://issues.apache.org/jira/browse/AXIS2-400. There have been some extensions made to support Spring in Axis2 in the nightly builds. You try pulling them down to see if they help you out. Look at JIRA issue http://issues.apache.org/jira/browse/AXIS2-272 for more information I didn't use the extensions because they didn't apply to the approach we used for creating our Spring beans. I did create an Axis module that loads my Spring beans on Axis startup. Hope this helps! Dave Andreasen From: Shaowei Mao [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 2:59 PM To: axis-user@ws.apache.org Subject: [axis2] use spring configured bean inside axis2 as implementation class Hi, I am trying to use spring configured bean by creating spring container inside skeleton generated by wsdl2java to create my own implementation class for web service, but spring container BeanFactory can't load my classes packaged inside axis2 aar file. I think this is related to class loader aixs2 is using for each web service. Does anyone have sample code to solve this problem? Shaowei Mao aMind Solutions LLC Phone: 425-313-3107 Email: [EMAIL PROTECTED] website: www.amindsolutions.com -- Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] use spring configured bean inside axis2 as implementation class
Anderson,I didn't use the extensions because they didn't apply to the approach we used for creating our Spring beans. I did create an Axis module that loads my Spring beans on Axis startup. Anderson if you don't mind I would like to hear about your use case about the spring bean creation. Perhaps we can improve our spring support based on your feedback.Regards, RajithOn 7/31/06, Dave Andreasen [EMAIL PROTECTED] wrote: I had the same issue. The problem is related to the Service using it's own classloader and Spring wanting to use the thread context classloader. See http://issues.apache.org/jira/browse/AXIS2-400. There have been some extensions made to support Spring in Axis2 in the nightly builds. You try pulling them down to see if they help you out. Look at JIRA issue http://issues.apache.org/jira/browse/AXIS2-272 for more information I didn't use the extensions because they didn't apply to the approach we used for creating our Spring beans. I did create an Axis module that loads my Spring beans on Axis startup. Hope this helps! Dave Andreasen From: Shaowei Mao [mailto:[EMAIL PROTECTED]] Sent: Monday, July 31, 2006 2:59 PM To: axis-user@ws.apache.org Subject: [axis2] use spring configured bean inside axis2 as implementation class Hi, I am trying to use spring configured bean by creating spring container inside skeleton generated by wsdl2java to create my own implementation class for web service, but spring container BeanFactory can't load my classes packaged inside axis2 aar file. I think this is related to class loader aixs2 is using for each web service. Does anyone have sample code to solve this problem? Shaowei Mao aMind Solutions LLC Phone: 425-313-3107 Email: [EMAIL PROTECTED] website: www.amindsolutions.com
RE: [axis2] use spring configured bean inside axis2 as implementation class
I had the same issue. The problem is related to the Service using its own classloader and Spring wanting to use the thread context classloader. See http://issues.apache.org/jira/browse/AXIS2-400. There have been some extensions made to support Spring in Axis2 in the nightly builds. You try pulling them down to see if they help you out. Look at JIRA issue http://issues.apache.org/jira/browse/AXIS2-272 for more information I didnt use the extensions because they didnt apply to the approach we used for creating our Spring beans. I did create an Axis module that loads my Spring beans on Axis startup. Hope this helps! Dave Andreasen From: Shaowei Mao [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 2:59 PM To: axis-user@ws.apache.org Subject: [axis2] use spring configured bean inside axis2 as implementation class Hi, I am trying to use spring configured bean by creating spring container inside skeleton generated by wsdl2java to create my own implementation class for web service, but spring container BeanFactory can't load my classes packaged inside axis2 aar file. I think this is related to class loader aixs2 is using for each web service. Does anyone have sample code to solve this problem? Shaowei Mao aMind Solutions LLC Phone: 425-313-3107 Email: [EMAIL PROTECTED] website: www.amindsolutions.com
RE: [axis2] use spring configured bean inside axis2 as implementation class
Dave, thanks for info. I solved class loader problem by setting current thread context class loader. This should work for me now. Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); From: Dave Andreasen [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 1:11 PM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: RE: [axis2] use spring configured bean inside axis2 as implementation class I had the same issue. The problem is related to the Service using its own classloader and Spring wanting to use the thread context classloader. See http://issues.apache.org/jira/browse/AXIS2-400. There have been some extensions made to support Spring in Axis2 in the nightly builds. You try pulling them down to see if they help you out. Look at JIRA issue http://issues.apache.org/jira/browse/AXIS2-272 for more information I didnt use the extensions because they didnt apply to the approach we used for creating our Spring beans. I did create an Axis module that loads my Spring beans on Axis startup. Hope this helps! Dave Andreasen From: Shaowei Mao [mailto:[EMAIL PROTECTED]] Sent: Monday, July 31, 2006 2:59 PM To: axis-user@ws.apache.org Subject: [axis2] use spring configured bean inside axis2 as implementation class Hi, I am trying to use spring configured bean by creating spring container inside skeleton generated by wsdl2java to create my own implementation class for web service, but spring container BeanFactory can't load my classes packaged inside axis2 aar file. I think this is related to class loader aixs2 is using for each web service. Does anyone have sample code to solve this problem? Shaowei Mao aMind Solutions LLC Phone: 425-313-3107 Email: [EMAIL PROTECTED] website: www.amindsolutions.com