You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Sandhu <ja...@cisco.com> on 2007/06/01 21:39:05 UTC

Axis2 Web Service with Spring issue

I am trying to integrate Axis2 Web Service with Spring.

Integrating Web Services with Existing Application Domain

Spring Integration has Issue:
1) It does not load ContextLoaderListener

Running Axis2 with Spring inside web

1) http://localhost:8080/web/services/AccountService?wsdl
<error>
<description>Unable to generate WSDL 1.1 for this service</description>
-
<reason>
If you wish Axis2 to automatically generate the WSDL 1.1, then please +set
useOriginalwsdl as false in your services.xml
</reason>
</error>

2) ContextLoader Issue spring does not inject code into skelton

Note: In general web service does not work





Here's the setup:

Spring applicationContext.xml


Quote:
<beans>
<!-- Axis2 web service, but to Spring, its just another bean that has
dependencies -->
<bean id="springAccountservice"
class="com.corp.account.domain.accountmanager.Acco untserviceSkeleton">
<property name="service" ref="accountManager"/>
</bean>
<!-- just another bean/interface with a wired implementation, which is
injected by Spring into the web service -->
<bean id="accountManager" class="com.corp.account.domain.impl.AccountManager
Impl"> </bean>
</beans>
2) services.xml


<parameter name="serviceObjectSupplier" locked="false">
org.apache.axis2.extensions.spring.receivers.Sprin
gServletContextObjectSupplier
</parameter>

<parameter name="SpringBeanName" locked="false">
springAccountservice
</parameter>


3) web.xml


<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListe ner
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>

Any references?

If I try to access it does not work.
-- 
View this message in context: http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html#a10919239
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Axis2 Web Service with Spring issue

Posted by Sandhu <ja...@cisco.com>.
Here is the error message:

I have also attached all the configuration files too?

Also there is another error message: AxisRESTServlet not found.

INFO: Loading Spring root WebApplicationContext
Jun 1, 2007 6:51:27 AM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Exception sending context initialized event to listener instance of
class org.springframework.web.context.ContextLoaderListe ner
org.springframework.beans.factory.BeanCreationExce ption: Error creating
bean with name 'springAccountService' defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: Error setting property values; nested
exception is org.springframework.beans.NotWritablePropertyExcep tion:
Invalid property 'service' of bean class
[com.corp.account.domain.accountmanager.AccountServ iceSkeleton]: Bean
property 'service' is not writable or has an invalid setter method: Does the
parameter type of the setter match the return type of the getter?
org.springframework.beans.NotWritablePropertyExcep tion: Invalid property
'service' of bean class [com.corp.account.domain.accountmanager.AccountServ
iceSkeleton]: Bean property 'service' is not writable or has an invalid
setter method: Does the parameter type of the setter match the return type
of the getter?
at org.springframework.beans.BeanWrapperImpl.setPrope
rtyValue(BeanWrapperImpl.java:670)
at org.springframework.beans.BeanWrapperImpl.setPrope
rtyValue(BeanWrapperImpl.java:572)
at org.springframework.beans.BeanWrapperImpl.setPrope
rtyValue(BeanWrapperImpl.java:737)
at org.springframework.beans.BeanWrapperImpl.setPrope
rtyValues(BeanWrapperImpl.java:764)
at org.springframework.beans.BeanWrapperImpl.setPrope
rtyValues(BeanWrapperImpl.java:753)
at org.springframework.beans.factory.support.Abstract
AutowireCapableBeanFactory.applyPropertyValues(Abs
tractAutowireCapableBeanFactory.java:1057)
at org.springframework.beans.factory.support.Abstract
AutowireCapableBeanFactory.populateBean(AbstractAu
towireCapableBeanFactory.java:857)
at org.springframework.beans.factory.support.Abstract
AutowireCapableBeanFactory.createBean(AbstractAuto
wireCapableBeanFactory.java:378)
at org.springframework.beans.factory.support.Abstract
BeanFactory.getBean(AbstractBeanFactory.java:233)
at org.springframework.beans.factory.support.Abstract
BeanFactory.getBean(AbstractBeanFactory.java:145)
at org.springframework.beans.factory.support.DefaultL
istableBeanFactory.preInstantiateSingletons(Defaul
tListableBeanFactory.java:283)
at org.springframework.context.support.AbstractApplic
ationContext.refresh(AbstractApplicationContext.ja va:313)
at org.springframework.web.context.support.AbstractRe
freshableWebApplicationContext.refresh(AbstractRef
reshableWebApplicationContext.java:139)
at org.springframework.web.context.ContextLoader.crea
teWebApplicationContext(ContextLoader.java:252)
at org.springframework.web.context.ContextLoader.init
WebApplicationContext(ContextLoader.java:190)
at org.springframework.web.context.ContextLoaderListe
ner.contextInitialized(ContextLoaderListener.java: 49)
at org.apache.catalina.core.StandardContext.listenerS
tart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(Sta
ndardContext.java:4336)
at org.apache.catalina.core.ContainerBase.addChildInt
ernal(ContainerBase.java:761)
at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:741)
at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:525)
http://www.nabble.com/file/p10920360/services.xml services.xml 
http://www.nabble.com/file/p10920360/AccountService.wsdl AccountService.wsdl 
http://www.nabble.com/file/p10920360/applicationContext.xml
applicationContext.xml  http://www.nabble.com/file/p10920360/web.xml web.xml 

robert lazarski wrote:
> 
> Issue #1 has nothing to do with spring. How to fix that message depends on
> if you are running an RPCMessageReceiver based service or not. This
> question
> comes up a lot, try searching the forums.
> 
> For issue #2, could you show us a Stracktrace or some hints on what may be
> wrong, beyond "If I try to access it does not work." ?
> 
> Thanks,
> Robert
> 
> On 6/1/07, Sandhu <ja...@cisco.com> wrote:
>>
>>
>> I am trying to integrate Axis2 Web Service with Spring.
>>
>> Integrating Web Services with Existing Application Domain
>>
>> Spring Integration has Issue:
>> 1) It does not load ContextLoaderListener
>>
>> Running Axis2 with Spring inside web
>>
>> 1) http://localhost:8080/web/services/AccountService?wsdl
>> <error>
>> <description>Unable to generate WSDL 1.1 for this service</description>
>> -
>> <reason>
>> If you wish Axis2 to automatically generate the WSDL 1.1, then please
>> +set
>> useOriginalwsdl as false in your services.xml
>> </reason>
>> </error>
>>
>> 2) ContextLoader Issue spring does not inject code into skelton
>>
>> Note: In general web service does not work
>>
>>
>>
>>
>>
>> Here's the setup:
>>
>> Spring applicationContext.xml
>>
>>
>> Quote:
>> <beans>
>> <!-- Axis2 web service, but to Spring, its just another bean that has
>> dependencies -->
>> <bean id="springAccountservice"
>> class="com.corp.account.domain.accountmanager.Acco untserviceSkeleton">
>> <property name="service" ref="accountManager"/>
>> </bean>
>> <!-- just another bean/interface with a wired implementation, which is
>> injected by Spring into the web service -->
>> <bean id="accountManager" class="
>> com.corp.account.domain.impl.AccountManager
>> Impl"> </bean>
>> </beans>
>> 2) services.xml
>>
>>
>> <parameter name="serviceObjectSupplier" locked="false">
>> org.apache.axis2.extensions.spring.receivers.Sprin
>> gServletContextObjectSupplier
>> </parameter>
>>
>> <parameter name="SpringBeanName" locked="false">
>> springAccountservice
>> </parameter>
>>
>>
>> 3) web.xml
>>
>>
>> <listener>
>> <listener-class>
>> org.springframework.web.context.ContextLoaderListe ner
>> </listener-class>
>> </listener>
>> <context-param>
>> <param-name>contextConfigLocation</param-name>
>> <param-value>/WEB-INF/applicationContext.xml</param-value>
>> </context-param>
>>
>> Any references?
>>
>> If I try to access it does not work.
>> --
>> View this message in context:
>> http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html#a10919239
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html#a10920360
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Axis2 Web Service with Spring issue

Posted by robert lazarski <ro...@gmail.com>.
Issue #1 has nothing to do with spring. How to fix that message depends on
if you are running an RPCMessageReceiver based service or not. This question
comes up a lot, try searching the forums.

For issue #2, could you show us a Stracktrace or some hints on what may be
wrong, beyond "If I try to access it does not work." ?

Thanks,
Robert

On 6/1/07, Sandhu <ja...@cisco.com> wrote:
>
>
> I am trying to integrate Axis2 Web Service with Spring.
>
> Integrating Web Services with Existing Application Domain
>
> Spring Integration has Issue:
> 1) It does not load ContextLoaderListener
>
> Running Axis2 with Spring inside web
>
> 1) http://localhost:8080/web/services/AccountService?wsdl
> <error>
> <description>Unable to generate WSDL 1.1 for this service</description>
> -
> <reason>
> If you wish Axis2 to automatically generate the WSDL 1.1, then please +set
> useOriginalwsdl as false in your services.xml
> </reason>
> </error>
>
> 2) ContextLoader Issue spring does not inject code into skelton
>
> Note: In general web service does not work
>
>
>
>
>
> Here's the setup:
>
> Spring applicationContext.xml
>
>
> Quote:
> <beans>
> <!-- Axis2 web service, but to Spring, its just another bean that has
> dependencies -->
> <bean id="springAccountservice"
> class="com.corp.account.domain.accountmanager.Acco untserviceSkeleton">
> <property name="service" ref="accountManager"/>
> </bean>
> <!-- just another bean/interface with a wired implementation, which is
> injected by Spring into the web service -->
> <bean id="accountManager" class="
> com.corp.account.domain.impl.AccountManager
> Impl"> </bean>
> </beans>
> 2) services.xml
>
>
> <parameter name="serviceObjectSupplier" locked="false">
> org.apache.axis2.extensions.spring.receivers.Sprin
> gServletContextObjectSupplier
> </parameter>
>
> <parameter name="SpringBeanName" locked="false">
> springAccountservice
> </parameter>
>
>
> 3) web.xml
>
>
> <listener>
> <listener-class>
> org.springframework.web.context.ContextLoaderListe ner
> </listener-class>
> </listener>
> <context-param>
> <param-name>contextConfigLocation</param-name>
> <param-value>/WEB-INF/applicationContext.xml</param-value>
> </context-param>
>
> Any references?
>
> If I try to access it does not work.
> --
> View this message in context:
> http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html#a10919239
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

RE: Axis2 Web Service with Spring issue

Posted by Sandhu <ja...@cisco.com>.
Do you have any sample code to test this.  I created sample and but having
issues.


Michael.Davis-2 wrote:
> 
> Hi,
> 
> I had to add these to my web.xml:
> 
>     <context-param>
> 	<param-name>contextConfigLocation</param-name>
> 	<param-value>/WEB-INF/applicationContext.xml</param-value>
>     </context-param>
> 
>     <listener>
> 
> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
>     </listener>
> 
> Hope that helps!
> Michael Davis
> 
> 
>> -----Original Message-----
>> From: Sandhu [mailto:jaspsand@cisco.com]
>> Sent: Friday, June 01, 2007 3:39 PM
>> To: axis-user@ws.apache.org
>> Subject: Axis2 Web Service with Spring issue
>> 
>> 
>> 
>> I am trying to integrate Axis2 Web Service with Spring.
>> 
>> Integrating Web Services with Existing Application Domain
>> 
>> Spring Integration has Issue:
>> 1) It does not load ContextLoaderListener
>> 
>> Running Axis2 with Spring inside web
>> 
>> 1) http://localhost:8080/web/services/AccountService?wsdl
>> <error>
>> <description>Unable to generate WSDL 1.1 for this 
>> service</description>
>> -
>> <reason>
>> If you wish Axis2 to automatically generate the WSDL 1.1, 
>> then please +set
>> useOriginalwsdl as false in your services.xml
>> </reason>
>> </error>
>> 
>> 2) ContextLoader Issue spring does not inject code into skelton
>> 
>> Note: In general web service does not work
>> 
>> 
>> 
>> 
>> 
>> Here's the setup:
>> 
>> Spring applicationContext.xml
>> 
>> 
>> Quote:
>> <beans>
>> <!-- Axis2 web service, but to Spring, its just another bean that has
>> dependencies -->
>> <bean id="springAccountservice"
>> class="com.corp.account.domain.accountmanager.Acco 
>> untserviceSkeleton">
>> <property name="service" ref="accountManager"/>
>> </bean>
>> <!-- just another bean/interface with a wired implementation, which is
>> injected by Spring into the web service -->
>> <bean id="accountManager" 
>> class="com.corp.account.domain.impl.AccountManager
>> Impl"> </bean>
>> </beans>
>> 2) services.xml
>> 
>> 
>> <parameter name="serviceObjectSupplier" locked="false">
>> org.apache.axis2.extensions.spring.receivers.Sprin
>> gServletContextObjectSupplier
>> </parameter>
>> 
>> <parameter name="SpringBeanName" locked="false">
>> springAccountservice
>> </parameter>
>> 
>> 
>> 3) web.xml
>> 
>> 
>> <listener>
>> <listener-class>
>> org.springframework.web.context.ContextLoaderListe ner
>> </listener-class>
>> </listener>
>> <context-param>
>> <param-name>contextConfigLocation</param-name>
>> <param-value>/WEB-INF/applicationContext.xml</param-value>
>> </context-param>
>> 
>> Any references?
>> 
>> If I try to access it does not work.
>> -- 
>> View this message in context: 
> http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html#a10919239
> Sent from the Axis - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html#a10920214
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Axis2 Web Service with Spring issue

Posted by Sandhu <ja...@cisco.com>.
Hi Raghu,

I have attached the service.xml, web.xml, and applicationContext.xml.

Please take a look and let me know what I am missing.

I have AccountManagerSkeleton.java

1) This skeleton was automatically generated using wsdl2java util.
2) Then I configure 
      applicationContext.xml
      as follows:
 Note:  Do I need to put setService method manually in
AccountManagerSkeleton.java?  I thought spring will  inject it?


a) 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">

<beans>
  !-- Configure spring to give a hook to axis2 without a ServletContext -->
  <bean id="applicationContext" 
   
class="org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder"
/>
  <!-- Axis2 Web Service, but to Spring, its just another bean that has
dependencies   -->
  <bean id="springAccountService"
class="com.corp.account.domain.accountmanager.AccountServiceSkeleton">
    <property name="service" ref="accountManager"/>
  </bean>

  <!-- just another bean / interface with a wired implementation, that's
injected by Spring
          into the Web Service -->
   <bean id="accountManager"
class="com.corp.account.domain.impl.AccountManagerImpl"> 
   </bean>
   
</beans>


Raghu Upadhyayula wrote:
> 
> Sandhu,
> 
> b) web.xml
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app version="2.4" 
> 	xmlns="http://java.sun.com/xml/ns/j2ee" 
> 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> 	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
> 	http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
> 	
> 	<!--<listener>
>         	<listener-class>
>         		org.springframework.web.context.ContextLoaderListener
>         	</listener-class>
> 	</listener>
> 	<context-param>
> 	      <param-name>contextConfigLocation</param-name>
> 	      <param-value>/WEB-INF/applicationContext.xml</param-value>
> 	    </context-param>
>     	-->
>     	<servlet>
> 		<servlet-name>AxisServlet</servlet-name>
> 		<servlet-class>
> 			org.apache.axis2.transport.http.AxisServlet
> 		</servlet-class>
> 		<load-on-startup>1</load-on-startup>
> 	</servlet>
> 	<servlet>
> 		<servlet-name>AxisRESTServlet</servlet-name>
> 		<servlet-class>
> 			org.apache.axis2.transport.http.AxisRESTServlet
> 		</servlet-class>
> 		<load-on-startup>2</load-on-startup>
> 	</servlet>
> 	
> 	<servlet-mapping>
> 		<servlet-name>AxisServlet</servlet-name>
> 		<url-pattern>/services/*</url-pattern>
> 	</servlet-mapping>
> 	<servlet-mapping>
> 		<servlet-name>AxisRESTServlet</servlet-name>
> 		<url-pattern>/rest/*</url-pattern>
> 	</servlet-mapping>
> </web-app>
> 
> 
> c)  service.xml
> 
> <!-- This file was auto-generated from WSDL -->
> <!-- by the Apache Axis2 version: #axisVersion# #today# -->
> <serviceGroup>
> <service name="AccountService"
> class="com.corp.account.domain.accountmanager.SpringInit">
> <messageReceivers>
> <messageReceiver mep="http://www.w3.org/ns/wsdl/in-only"
> class="com.corp.account.domain.accountmanager.AccountServiceMessageReceiverInOnly"/>
> <messageReceiver mep="http://www.w3.org/ns/wsdl/in-out"
> class="com.corp.account.domain.accountmanager.AccountServiceMessageReceiverInOut"/>
> </messageReceivers>
> <parameter name="ServiceClass"
> locked="false">com.corp.account.domain.accountmanager.AccountServiceSkeleton</parameter>
> <parameter name="useOriginalwsdl" locked="false">true</parameter>
> <parameter name="modifyUserWSDLPortAddress"
> locked="false">true</parameter>
> <operation name="getAccount" mep="http://www.w3.org/ns/wsdl/in-out">
> <actionMapping>urn:getAccount</actionMapping>
> <outputActionMapping>urn:getAccount</outputActionMapping>
> </operation>
> <operation name="setStatus" mep="http://www.w3.org/ns/wsdl/in-only">
> <actionMapping>urn:setStatus</actionMapping>
> </operation>
> </service>
> </serviceGroup> 
> 
>       Your exception clearly says
> 
>  
> 
> Bean property 'service' is not writable or has an invalid setter method:
> Does the parameter type of the setter match the return type of the
> getter?
> 
>  
> 
> Does your AccountServ class has a service variable, and do you have a
> setService & getService method.  Does the parameter type of the
> setService match the return type of getService??
> 
>  
> 
> Check these things and try deploying your application.
> 
>  
> 
> Thanks
> 
> Raghu
> 
>  
> 
> -----Original Message-----
> From: Sandhu [mailto:jaspsand@cisco.com] 
> Sent: Friday, June 01, 2007 1:46 PM
> To: axis-user@ws.apache.org
> Subject: RE: Axis2 Web Service with Spring issue
> 
>  
> 
>  
> 
> Thanks,
> 
>  
> 
> I have added to the web.xml.
> 
>  
> 
> But when I deploy the web application to tomcat or jboss, it says that
> 
>  
> 
>  
> 
> INFO: Loading Spring root WebApplicationContext
> 
> Jun 1, 2007 6:51:27 AM org.apache.catalina.core.StandardContext
> 
> listenerStart
> 
> SEVERE: Exception sending context initialized event to listener instance
> of
> 
> class org.springframework.web.context.ContextLoaderListe ner
> 
> org.springframework.beans.factory.BeanCreationExce ption: Error creating
> 
> bean with name 'springAccountService' defined in ServletContext resource
> 
> [/WEB-INF/applicationContext.xml]: Error setting property values; nested
> 
> exception is org.springframework.beans.NotWritablePropertyExcep tion:
> 
> Invalid property 'service' of bean class
> 
> [com.corp.account.domain.accountmanager.AccountServ iceSkeleton]: Bean
> 
> property 'service' is not writable or has an invalid setter method: Does
> the
> 
> parameter type of the setter match the return type of the getter?
> 
> org.springframework.beans.NotWritablePropertyExcep tion: Invalid
> property
> 
> 'service' of bean class
> [com.corp.account.domain.accountmanager.AccountServ
> 
> iceSkeleton]: Bean property 'service' is not writable or has an invalid
> 
> setter method: Does the parameter type of the setter match the return
> type
> 
> of the getter?
> 
> at org.springframework.beans.BeanWrapperImpl.setPrope
> 
> rtyValue(BeanWrapperImpl.java:670)
> 
> at org.springframework.beans.BeanWrapperImpl.setPrope
> 
> rtyValue(BeanWrapperImpl.java:572)
> 
> at org.springframework.beans.BeanWrapperImpl.setPrope
> 
> rtyValue(BeanWrapperImpl.java:737)
> 
> at org.springframework.beans.BeanWrapperImpl.setPrope
> 
> rtyValues(BeanWrapperImpl.java:764)
> 
> at org.springframework.beans.BeanWrapperImpl.setPrope
> 
> rtyValues(BeanWrapperImpl.java:753)
> 
> at org.springframework.beans.factory.support.Abstract
> 
> AutowireCapableBeanFactory.applyPropertyValues(Abs
> 
> tractAutowireCapableBeanFactory.java:1057)
> 
> at org.springframework.beans.factory.support.Abstract
> 
> AutowireCapableBeanFactory.populateBean(AbstractAu
> 
> towireCapableBeanFactory.java:857)
> 
> at org.springframework.beans.factory.support.Abstract
> 
> AutowireCapableBeanFactory.createBean(AbstractAuto
> 
> wireCapableBeanFactory.java:378)
> 
> at org.springframework.beans.factory.support.Abstract
> 
> BeanFactory.getBean(AbstractBeanFactory.java:233)
> 
> at org.springframework.beans.factory.support.Abstract
> 
> BeanFactory.getBean(AbstractBeanFactory.java:145)
> 
> at org.springframework.beans.factory.support.DefaultL
> 
> istableBeanFactory.preInstantiateSingletons(Defaul
> 
> tListableBeanFactory.java:283)
> 
> at org.springframework.context.support.AbstractApplic
> 
> ationContext.refresh(AbstractApplicationContext.ja va:313)
> 
> at org.springframework.web.context.support.AbstractRe
> 
> freshableWebApplicationContext.refresh(AbstractRef
> 
> reshableWebApplicationContext.java:139)
> 
> at org.springframework.web.context.ContextLoader.crea
> 
> teWebApplicationContext(ContextLoader.java:252)
> 
> at org.springframework.web.context.ContextLoader.init
> 
> WebApplicationContext(ContextLoader.java:190)
> 
> at org.springframework.web.context.ContextLoaderListe
> 
> ner.contextInitialized(ContextLoaderListener.java: 49)
> 
> at org.apache.catalina.core.StandardContext.listenerS
> 
> tart(StandardContext.java:3827)
> 
> at org.apache.catalina.core.StandardContext.start(Sta
> 
> ndardContext.java:4336)
> 
> at org.apache.catalina.core.ContainerBase.addChildInt
> 
> ernal(ContainerBase.java:761)
> 
> at org.apache.catalina.core.ContainerBase.addChild(Co
> ntainerBase.java:741)
> 
> at org.apache.catalina.core.StandardHost.addChild(Sta
> ndardHost.java:525)
> 
>  
> 
> Michael.Davis-2 wrote:
> 
>> 
> 
>> Hi,
> 
>> 
> 
>> I had to add these to my web.xml:
> 
>> 
> 
>>     <context-param>
> 
>>     <param-name>contextConfigLocation</param-name>
> 
>>     <param-value>/WEB-INF/applicationContext.xml</param-value>
> 
>>     </context-param>
> 
>> 
> 
>>     <listener>
> 
>> 
> 
>>
> <listener-class>org.springframework.web.context.ContextLoaderListener</l
> istener-class>
> 
>>     </listener>
> 
>> 
> 
>> Hope that helps!
> 
>> Michael Davis
> 
>> 
> 
>> 
> 
>>> -----Original Message-----
> 
>>> From: Sandhu [mailto:jaspsand@cisco.com]
> 
>>> Sent: Friday, June 01, 2007 3:39 PM
> 
>>> To: axis-user@ws.apache.org
> 
>>> Subject: Axis2 Web Service with Spring issue
> 
>>> 
> 
>>> 
> 
>>> 
> 
>>> I am trying to integrate Axis2 Web Service with Spring.
> 
>>> 
> 
>>> Integrating Web Services with Existing Application Domain
> 
>>> 
> 
>>> Spring Integration has Issue:
> 
>>> 1) It does not load ContextLoaderListener
> 
>>> 
> 
>>> Running Axis2 with Spring inside web
> 
>>> 
> 
>>> 1) http://localhost:8080/web/services/AccountService?wsdl
> 
>>> <error>
> 
>>> <description>Unable to generate WSDL 1.1 for this 
> 
>>> service</description>
> 
>>> -
> 
>>> <reason>
> 
>>> If you wish Axis2 to automatically generate the WSDL 1.1, 
> 
>>> then please +set
> 
>>> useOriginalwsdl as false in your services.xml
> 
>>> </reason>
> 
>>> </error>
> 
>>> 
> 
>>> 2) ContextLoader Issue spring does not inject code into skelton
> 
>>> 
> 
>>> Note: In general web service does not work
> 
>>> 
> 
>>> 
> 
>>> 
> 
>>> 
> 
>>> 
> 
>>> Here's the setup:
> 
>>> 
> 
>>> Spring applicationContext.xml
> 
>>> 
> 
>>> 
> 
>>> Quote:
> 
>>> <beans>
> 
>>> <!-- Axis2 web service, but to Spring, its just another bean that has
> 
>>> dependencies -->
> 
>>> <bean id="springAccountservice"
> 
>>> class="com.corp.account.domain.accountmanager.Acco 
> 
>>> untserviceSkeleton">
> 
>>> <property name="service" ref="accountManager"/>
> 
>>> </bean>
> 
>>> <!-- just another bean/interface with a wired implementation, which
> is
> 
>>> injected by Spring into the web service -->
> 
>>> <bean id="accountManager" 
> 
>>> class="com.corp.account.domain.impl.AccountManager
> 
>>> Impl"> </bean>
> 
>>> </beans>
> 
>>> 2) services.xml
> 
>>> 
> 
>>> 
> 
>>> <parameter name="serviceObjectSupplier" locked="false">
> 
>>> org.apache.axis2.extensions.spring.receivers.Sprin
> 
>>> gServletContextObjectSupplier
> 
>>> </parameter>
> 
>>> 
> 
>>> <parameter name="SpringBeanName" locked="false">
> 
>>> springAccountservice
> 
>>> </parameter>
> 
>>> 
> 
>>> 
> 
>>> 3) web.xml
> 
>>> 
> 
>>> 
> 
>>> <listener>
> 
>>> <listener-class>
> 
>>> org.springframework.web.context.ContextLoaderListe ner
> 
>>> </listener-class>
> 
>>> </listener>
> 
>>> <context-param>
> 
>>> <param-name>contextConfigLocation</param-name>
> 
>>> <param-value>/WEB-INF/applicationContext.xml</param-value>
> 
>>> </context-param>
> 
>>> 
> 
>>> Any references?
> 
>>> 
> 
>>> If I try to access it does not work.
> 
>>> -- 
> 
>>> View this message in context: 
> 
>>
> http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html
> #a10919239
> 
>> Sent from the Axis - User mailing list archive at Nabble.com.
> 
>> 
> 
>> 
> 
>> ---------------------------------------------------------------------
> 
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> 
>> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
>> 
> 
>> 
> 
>> ---------------------------------------------------------------------
> 
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> 
>> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
>> 
> 
>> 
> 
>> 
> 
>  
> 
> -- 
> 
> View this message in context:
> http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html
> #a10920210
> 
> Sent from the Axis - User mailing list archive at Nabble.com.
> 
>  
> 
>  
> 
> ---------------------------------------------------------------------
> 
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> 
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
>  
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html#a10920438
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Axis2 Web Service with Spring issue

Posted by Raghu Upadhyayula <ru...@responsys.com>.
Sandhu,

 

      Your exception clearly says

 

Bean property 'service' is not writable or has an invalid setter method:
Does the parameter type of the setter match the return type of the
getter?

 

Does your AccountServ class has a service variable, and do you have a
setService & getService method.  Does the parameter type of the
setService match the return type of getService??

 

Check these things and try deploying your application.

 

Thanks

Raghu

 

-----Original Message-----
From: Sandhu [mailto:jaspsand@cisco.com] 
Sent: Friday, June 01, 2007 1:46 PM
To: axis-user@ws.apache.org
Subject: RE: Axis2 Web Service with Spring issue

 

 

Thanks,

 

I have added to the web.xml.

 

But when I deploy the web application to tomcat or jboss, it says that

 

 

INFO: Loading Spring root WebApplicationContext

Jun 1, 2007 6:51:27 AM org.apache.catalina.core.StandardContext

listenerStart

SEVERE: Exception sending context initialized event to listener instance
of

class org.springframework.web.context.ContextLoaderListe ner

org.springframework.beans.factory.BeanCreationExce ption: Error creating

bean with name 'springAccountService' defined in ServletContext resource

[/WEB-INF/applicationContext.xml]: Error setting property values; nested

exception is org.springframework.beans.NotWritablePropertyExcep tion:

Invalid property 'service' of bean class

[com.corp.account.domain.accountmanager.AccountServ iceSkeleton]: Bean

property 'service' is not writable or has an invalid setter method: Does
the

parameter type of the setter match the return type of the getter?

org.springframework.beans.NotWritablePropertyExcep tion: Invalid
property

'service' of bean class
[com.corp.account.domain.accountmanager.AccountServ

iceSkeleton]: Bean property 'service' is not writable or has an invalid

setter method: Does the parameter type of the setter match the return
type

of the getter?

at org.springframework.beans.BeanWrapperImpl.setPrope

rtyValue(BeanWrapperImpl.java:670)

at org.springframework.beans.BeanWrapperImpl.setPrope

rtyValue(BeanWrapperImpl.java:572)

at org.springframework.beans.BeanWrapperImpl.setPrope

rtyValue(BeanWrapperImpl.java:737)

at org.springframework.beans.BeanWrapperImpl.setPrope

rtyValues(BeanWrapperImpl.java:764)

at org.springframework.beans.BeanWrapperImpl.setPrope

rtyValues(BeanWrapperImpl.java:753)

at org.springframework.beans.factory.support.Abstract

AutowireCapableBeanFactory.applyPropertyValues(Abs

tractAutowireCapableBeanFactory.java:1057)

at org.springframework.beans.factory.support.Abstract

AutowireCapableBeanFactory.populateBean(AbstractAu

towireCapableBeanFactory.java:857)

at org.springframework.beans.factory.support.Abstract

AutowireCapableBeanFactory.createBean(AbstractAuto

wireCapableBeanFactory.java:378)

at org.springframework.beans.factory.support.Abstract

BeanFactory.getBean(AbstractBeanFactory.java:233)

at org.springframework.beans.factory.support.Abstract

BeanFactory.getBean(AbstractBeanFactory.java:145)

at org.springframework.beans.factory.support.DefaultL

istableBeanFactory.preInstantiateSingletons(Defaul

tListableBeanFactory.java:283)

at org.springframework.context.support.AbstractApplic

ationContext.refresh(AbstractApplicationContext.ja va:313)

at org.springframework.web.context.support.AbstractRe

freshableWebApplicationContext.refresh(AbstractRef

reshableWebApplicationContext.java:139)

at org.springframework.web.context.ContextLoader.crea

teWebApplicationContext(ContextLoader.java:252)

at org.springframework.web.context.ContextLoader.init

WebApplicationContext(ContextLoader.java:190)

at org.springframework.web.context.ContextLoaderListe

ner.contextInitialized(ContextLoaderListener.java: 49)

at org.apache.catalina.core.StandardContext.listenerS

tart(StandardContext.java:3827)

at org.apache.catalina.core.StandardContext.start(Sta

ndardContext.java:4336)

at org.apache.catalina.core.ContainerBase.addChildInt

ernal(ContainerBase.java:761)

at org.apache.catalina.core.ContainerBase.addChild(Co
ntainerBase.java:741)

at org.apache.catalina.core.StandardHost.addChild(Sta
ndardHost.java:525)

 

Michael.Davis-2 wrote:

> 

> Hi,

> 

> I had to add these to my web.xml:

> 

>     <context-param>

>     <param-name>contextConfigLocation</param-name>

>     <param-value>/WEB-INF/applicationContext.xml</param-value>

>     </context-param>

> 

>     <listener>

> 

>
<listener-class>org.springframework.web.context.ContextLoaderListener</l
istener-class>

>     </listener>

> 

> Hope that helps!

> Michael Davis

> 

> 

>> -----Original Message-----

>> From: Sandhu [mailto:jaspsand@cisco.com]

>> Sent: Friday, June 01, 2007 3:39 PM

>> To: axis-user@ws.apache.org

>> Subject: Axis2 Web Service with Spring issue

>> 

>> 

>> 

>> I am trying to integrate Axis2 Web Service with Spring.

>> 

>> Integrating Web Services with Existing Application Domain

>> 

>> Spring Integration has Issue:

>> 1) It does not load ContextLoaderListener

>> 

>> Running Axis2 with Spring inside web

>> 

>> 1) http://localhost:8080/web/services/AccountService?wsdl

>> <error>

>> <description>Unable to generate WSDL 1.1 for this 

>> service</description>

>> -

>> <reason>

>> If you wish Axis2 to automatically generate the WSDL 1.1, 

>> then please +set

>> useOriginalwsdl as false in your services.xml

>> </reason>

>> </error>

>> 

>> 2) ContextLoader Issue spring does not inject code into skelton

>> 

>> Note: In general web service does not work

>> 

>> 

>> 

>> 

>> 

>> Here's the setup:

>> 

>> Spring applicationContext.xml

>> 

>> 

>> Quote:

>> <beans>

>> <!-- Axis2 web service, but to Spring, its just another bean that has

>> dependencies -->

>> <bean id="springAccountservice"

>> class="com.corp.account.domain.accountmanager.Acco 

>> untserviceSkeleton">

>> <property name="service" ref="accountManager"/>

>> </bean>

>> <!-- just another bean/interface with a wired implementation, which
is

>> injected by Spring into the web service -->

>> <bean id="accountManager" 

>> class="com.corp.account.domain.impl.AccountManager

>> Impl"> </bean>

>> </beans>

>> 2) services.xml

>> 

>> 

>> <parameter name="serviceObjectSupplier" locked="false">

>> org.apache.axis2.extensions.spring.receivers.Sprin

>> gServletContextObjectSupplier

>> </parameter>

>> 

>> <parameter name="SpringBeanName" locked="false">

>> springAccountservice

>> </parameter>

>> 

>> 

>> 3) web.xml

>> 

>> 

>> <listener>

>> <listener-class>

>> org.springframework.web.context.ContextLoaderListe ner

>> </listener-class>

>> </listener>

>> <context-param>

>> <param-name>contextConfigLocation</param-name>

>> <param-value>/WEB-INF/applicationContext.xml</param-value>

>> </context-param>

>> 

>> Any references?

>> 

>> If I try to access it does not work.

>> -- 

>> View this message in context: 

>
http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html
#a10919239

> Sent from the Axis - User mailing list archive at Nabble.com.

> 

> 

> ---------------------------------------------------------------------

> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org

> For additional commands, e-mail: axis-user-help@ws.apache.org

> 

> 

> ---------------------------------------------------------------------

> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org

> For additional commands, e-mail: axis-user-help@ws.apache.org

> 

> 

> 

 

-- 

View this message in context:
http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html
#a10920210

Sent from the Axis - User mailing list archive at Nabble.com.

 

 

---------------------------------------------------------------------

To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org

For additional commands, e-mail: axis-user-help@ws.apache.org

 


Re: Axis2 Web Service with Spring issue

Posted by robert lazarski <ro...@gmail.com>.
#1 looks ok, #2 you do need a setService. It'd be easier to read /
understand / maintain  if you did:

<property name="accountManager" ref="accountManager"/>

and have a setAccountManager() in your skeleton.

HTH,
Robert

On 6/1/07, Sandhu <ja...@cisco.com> wrote:
>
>
> Hi Robert,
>
> I am not clear on this.   My ignorance.
>
> 1) AccountMgrImpl.java
>
> mport com.corp.account.domain.AccountManager;
> import com.corp.account.domain.bo.Account;
>
> public class AccountManagerImpl implements AccountManager {
>
>         public Account getAccount(String accountId) {
>                 Account acct = new Account();
>                 acct.setAccountId(accountId);
>                 // hardcoded results for simplicity.
>                 // These can be easily procured from any datasource behind
> a DAO.
>                 if ("1".equals(accountId)){
>                         acct.setAddress("123 Main St, Washington DC");
>                         acct.setFirstName("John");
>                         acct.setLastName("Doe");
>                         acct.setStatus(true);
>                 } else if ("2".equals(accountId)) {
>                         acct.setAddress("2222, Lincoln Av, New York");
>                         acct.setFirstName("Jane");
>                         acct.setLastName("Smith");
>                         acct.setStatus(false);
>                 }
>                 return acct;
>         }
>
>         public void setStatus (String accountId, boolean status) {
>                 Account acct = getAccount(accountId);
>                 acct.setStatus(status);
>         }
>
> }
>
> 2) I generated AccountServiceSkeleton.java using wsdl2java.
>
> Do I need to add?
> public void setservice(AccountManager service) {
>                 this.service = service;
>         }
>
> in this skeleton?
>
>
>
>     /**
>      * AccountServiceSkeleton.java
>      *
>      * This file was auto-generated from WSDL
>      * by the Apache Axis2 version: 1.2 Apr 27, 2007 (04:35:37 IST)
>      */
>     package com.corp.account.domain.accountmanager;
>
>     /**
>      *  AccountServiceSkeleton java skeleton for the axisService
>      */
>     public class AccountServiceSkeleton implements
> AccountServiceSkeletonInterface{
>
>
>         /**
>          * Auto generated method signature
>
>
>                                      * @param getAccount0
>          */
>
>
>                  public
> com.corp.account.accountmanager.types.GetAccountResponse getAccount
>                   (
>                   com.corp.account.accountmanager.types.GetAccount
> getAccount0
>                   )
>             {
>                 //Todo fill this with the necessary business logic
>                 throw new  java.lang.UnsupportedOperationException("Please
> implement " + this.getClass().getName() + "#getAccount");
>         }
>
>
>         /**
>          * Auto generated method signature
>
>
>                                      * @param setStatus2
>          */
>
>
>                  public void setStatus
>                   (
>                   com.corp.account.accountmanager.types.SetStatussetStatus2
>                   )
>             {
>                 //Todo fill this with the necessary business logic
>
>         }
>     }
>
>
> robert lazarski wrote:
> >
> > You likely have a var name wrong or the var is private. Try double
> > checking
> > all your var names and make sure those vars you set by spring are
> public.
> >
> > HTH,
> > Robert
> >
> > On 6/1/07, Sandhu <ja...@cisco.com> wrote:
> >>
> >>
> >> Thanks,
> >>
> >> I have added to the web.xml.
> >>
> >> But when I deploy the web application to tomcat or jboss, it says that
> >>
> >>
> >> INFO: Loading Spring root WebApplicationContext
> >> Jun 1, 2007 6:51:27 AM org.apache.catalina.core.StandardContext
> >> listenerStart
> >> SEVERE: Exception sending context initialized event to listener
> instance
> >> of
> >> class org.springframework.web.context.ContextLoaderListe ner
> >> org.springframework.beans.factory.BeanCreationExce ption: Error
> creating
> >> bean with name 'springAccountService' defined in ServletContext
> resource
> >> [/WEB-INF/applicationContext.xml]: Error setting property values;
> nested
> >> exception is org.springframework.beans.NotWritablePropertyExcep tion:
> >> Invalid property 'service' of bean class
> >> [com.corp.account.domain.accountmanager.AccountServ iceSkeleton]: Bean
> >> property 'service' is not writable or has an invalid setter method:
> Does
> >> the
> >> parameter type of the setter match the return type of the getter?
> >> org.springframework.beans.NotWritablePropertyExcep tion: Invalid
> property
> >> 'service' of bean class [
> >> com.corp.account.domain.accountmanager.AccountServ
> >> iceSkeleton]: Bean property 'service' is not writable or has an invalid
> >> setter method: Does the parameter type of the setter match the return
> >> type
> >> of the getter?
> >> at org.springframework.beans.BeanWrapperImpl.setPrope
> >> rtyValue(BeanWrapperImpl.java:670)
> >> at org.springframework.beans.BeanWrapperImpl.setPrope
> >> rtyValue(BeanWrapperImpl.java:572)
> >> at org.springframework.beans.BeanWrapperImpl.setPrope
> >> rtyValue(BeanWrapperImpl.java:737)
> >> at org.springframework.beans.BeanWrapperImpl.setPrope
> >> rtyValues(BeanWrapperImpl.java:764)
> >> at org.springframework.beans.BeanWrapperImpl.setPrope
> >> rtyValues(BeanWrapperImpl.java:753)
> >> at org.springframework.beans.factory.support.Abstract
> >> AutowireCapableBeanFactory.applyPropertyValues(Abs
> >> tractAutowireCapableBeanFactory.java:1057)
> >> at org.springframework.beans.factory.support.Abstract
> >> AutowireCapableBeanFactory.populateBean(AbstractAu
> >> towireCapableBeanFactory.java:857)
> >> at org.springframework.beans.factory.support.Abstract
> >> AutowireCapableBeanFactory.createBean(AbstractAuto
> >> wireCapableBeanFactory.java:378)
> >> at org.springframework.beans.factory.support.Abstract
> >> BeanFactory.getBean(AbstractBeanFactory.java:233)
> >> at org.springframework.beans.factory.support.Abstract
> >> BeanFactory.getBean(AbstractBeanFactory.java:145)
> >> at org.springframework.beans.factory.support.DefaultL
> >> istableBeanFactory.preInstantiateSingletons(Defaul
> >> tListableBeanFactory.java:283)
> >> at org.springframework.context.support.AbstractApplic
> >> ationContext.refresh(AbstractApplicationContext.ja va:313)
> >> at org.springframework.web.context.support.AbstractRe
> >> freshableWebApplicationContext.refresh(AbstractRef
> >> reshableWebApplicationContext.java:139)
> >> at org.springframework.web.context.ContextLoader.crea
> >> teWebApplicationContext(ContextLoader.java:252)
> >> at org.springframework.web.context.ContextLoader.init
> >> WebApplicationContext(ContextLoader.java:190)
> >> at org.springframework.web.context.ContextLoaderListe
> >> ner.contextInitialized(ContextLoaderListener.java: 49)
> >> at org.apache.catalina.core.StandardContext.listenerS
> >> tart(StandardContext.java:3827)
> >> at org.apache.catalina.core.StandardContext.start(Sta
> >> ndardContext.java:4336)
> >> at org.apache.catalina.core.ContainerBase.addChildInt
> >> ernal(ContainerBase.java:761)
> >> at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java
> >> :741)
> >> at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java
> :525)
> >>
> >> Michael.Davis-2 wrote:
> >> >
> >> > Hi,
> >> >
> >> > I had to add these to my web.xml:
> >> >
> >> >     <context-param>
> >> >       <param-name>contextConfigLocation</param-name>
> >> >       <param-value>/WEB-INF/applicationContext.xml</param-value>
> >> >     </context-param>
> >> >
> >> >     <listener>
> >> >
> >> > <listener-class>org.springframework.web.context.ContextLoaderListener
> >> </listener-class>
> >> >     </listener>
> >> >
> >> > Hope that helps!
> >> > Michael Davis
> >> >
> >> >
> >> >> -----Original Message-----
> >> >> From: Sandhu [mailto:jaspsand@cisco.com]
> >> >> Sent: Friday, June 01, 2007 3:39 PM
> >> >> To: axis-user@ws.apache.org
> >> >> Subject: Axis2 Web Service with Spring issue
> >> >>
> >> >>
> >> >>
> >> >> I am trying to integrate Axis2 Web Service with Spring.
> >> >>
> >> >> Integrating Web Services with Existing Application Domain
> >> >>
> >> >> Spring Integration has Issue:
> >> >> 1) It does not load ContextLoaderListener
> >> >>
> >> >> Running Axis2 with Spring inside web
> >> >>
> >> >> 1) http://localhost:8080/web/services/AccountService?wsdl
> >> >> <error>
> >> >> <description>Unable to generate WSDL 1.1 for this
> >> >> service</description>
> >> >> -
> >> >> <reason>
> >> >> If you wish Axis2 to automatically generate the WSDL 1.1,
> >> >> then please +set
> >> >> useOriginalwsdl as false in your services.xml
> >> >> </reason>
> >> >> </error>
> >> >>
> >> >> 2) ContextLoader Issue spring does not inject code into skelton
> >> >>
> >> >> Note: In general web service does not work
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> Here's the setup:
> >> >>
> >> >> Spring applicationContext.xml
> >> >>
> >> >>
> >> >> Quote:
> >> >> <beans>
> >> >> <!-- Axis2 web service, but to Spring, its just another bean that
> has
> >> >> dependencies -->
> >> >> <bean id="springAccountservice"
> >> >> class="com.corp.account.domain.accountmanager.Acco
> >> >> untserviceSkeleton">
> >> >> <property name="service" ref="accountManager"/>
> >> >> </bean>
> >> >> <!-- just another bean/interface with a wired implementation, which
> is
> >> >> injected by Spring into the web service -->
> >> >> <bean id="accountManager"
> >> >> class="com.corp.account.domain.impl.AccountManager
> >> >> Impl"> </bean>
> >> >> </beans>
> >> >> 2) services.xml
> >> >>
> >> >>
> >> >> <parameter name="serviceObjectSupplier" locked="false">
> >> >> org.apache.axis2.extensions.spring.receivers.Sprin
> >> >> gServletContextObjectSupplier
> >> >> </parameter>
> >> >>
> >> >> <parameter name="SpringBeanName" locked="false">
> >> >> springAccountservice
> >> >> </parameter>
> >> >>
> >> >>
> >> >> 3) web.xml
> >> >>
> >> >>
> >> >> <listener>
> >> >> <listener-class>
> >> >> org.springframework.web.context.ContextLoaderListe ner
> >> >> </listener-class>
> >> >> </listener>
> >> >> <context-param>
> >> >> <param-name>contextConfigLocation</param-name>
> >> >> <param-value>/WEB-INF/applicationContext.xml</param-value>
> >> >> </context-param>
> >> >>
> >> >> Any references?
> >> >>
> >> >> If I try to access it does not work.
> >> >> --
> >> >> View this message in context:
> >> >
> >>
> http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html#a10919239
> >> > Sent from the Axis - User mailing list archive at Nabble.com.
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html#a10920210
> >> Sent from the Axis - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html#a10920591
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: Axis2 Web Service with Spring issue

Posted by Sandhu <ja...@cisco.com>.
Hi Robert,

I am not clear on this.   My ignorance. 

1) AccountMgrImpl.java

mport com.corp.account.domain.AccountManager;
import com.corp.account.domain.bo.Account;

public class AccountManagerImpl implements AccountManager {

	public Account getAccount(String accountId) {
		Account acct = new Account();
		acct.setAccountId(accountId);
		// hardcoded results for simplicity. 
		// These can be easily procured from any datasource behind a DAO.
		if ("1".equals(accountId)){
			acct.setAddress("123 Main St, Washington DC");
			acct.setFirstName("John");
			acct.setLastName("Doe");
			acct.setStatus(true);
		} else if ("2".equals(accountId)) {
			acct.setAddress("2222, Lincoln Av, New York");
			acct.setFirstName("Jane");
			acct.setLastName("Smith");
			acct.setStatus(false);
		}
		return acct;
	}

	public void setStatus (String accountId, boolean status) {
		Account acct = getAccount(accountId);
		acct.setStatus(status);
	}

}

2) I generated AccountServiceSkeleton.java using wsdl2java.

Do I need to add?
public void setservice(AccountManager service) {
		this.service = service;
	}

in this skeleton?  



    /**
     * AccountServiceSkeleton.java
     *
     * This file was auto-generated from WSDL
     * by the Apache Axis2 version: 1.2 Apr 27, 2007 (04:35:37 IST)
     */
    package com.corp.account.domain.accountmanager;
    
    /**
     *  AccountServiceSkeleton java skeleton for the axisService
     */
    public class AccountServiceSkeleton implements
AccountServiceSkeletonInterface{
        
         
        /**
         * Auto generated method signature
         
         
                                     * @param getAccount0
         */
        

                 public
com.corp.account.accountmanager.types.GetAccountResponse getAccount
                  (
                  com.corp.account.accountmanager.types.GetAccount
getAccount0
                  )
            {
                //Todo fill this with the necessary business logic
                throw new  java.lang.UnsupportedOperationException("Please
implement " + this.getClass().getName() + "#getAccount");
        }
     
         
        /**
         * Auto generated method signature
         
         
                                     * @param setStatus2
         */
        

                 public void setStatus
                  (
                  com.corp.account.accountmanager.types.SetStatus setStatus2
                  )
            {
                //Todo fill this with the necessary business logic
                
        }
    }
    

robert lazarski wrote:
> 
> You likely have a var name wrong or the var is private. Try double
> checking
> all your var names and make sure those vars you set by spring are public.
> 
> HTH,
> Robert
> 
> On 6/1/07, Sandhu <ja...@cisco.com> wrote:
>>
>>
>> Thanks,
>>
>> I have added to the web.xml.
>>
>> But when I deploy the web application to tomcat or jboss, it says that
>>
>>
>> INFO: Loading Spring root WebApplicationContext
>> Jun 1, 2007 6:51:27 AM org.apache.catalina.core.StandardContext
>> listenerStart
>> SEVERE: Exception sending context initialized event to listener instance
>> of
>> class org.springframework.web.context.ContextLoaderListe ner
>> org.springframework.beans.factory.BeanCreationExce ption: Error creating
>> bean with name 'springAccountService' defined in ServletContext resource
>> [/WEB-INF/applicationContext.xml]: Error setting property values; nested
>> exception is org.springframework.beans.NotWritablePropertyExcep tion:
>> Invalid property 'service' of bean class
>> [com.corp.account.domain.accountmanager.AccountServ iceSkeleton]: Bean
>> property 'service' is not writable or has an invalid setter method: Does
>> the
>> parameter type of the setter match the return type of the getter?
>> org.springframework.beans.NotWritablePropertyExcep tion: Invalid property
>> 'service' of bean class [
>> com.corp.account.domain.accountmanager.AccountServ
>> iceSkeleton]: Bean property 'service' is not writable or has an invalid
>> setter method: Does the parameter type of the setter match the return
>> type
>> of the getter?
>> at org.springframework.beans.BeanWrapperImpl.setPrope
>> rtyValue(BeanWrapperImpl.java:670)
>> at org.springframework.beans.BeanWrapperImpl.setPrope
>> rtyValue(BeanWrapperImpl.java:572)
>> at org.springframework.beans.BeanWrapperImpl.setPrope
>> rtyValue(BeanWrapperImpl.java:737)
>> at org.springframework.beans.BeanWrapperImpl.setPrope
>> rtyValues(BeanWrapperImpl.java:764)
>> at org.springframework.beans.BeanWrapperImpl.setPrope
>> rtyValues(BeanWrapperImpl.java:753)
>> at org.springframework.beans.factory.support.Abstract
>> AutowireCapableBeanFactory.applyPropertyValues(Abs
>> tractAutowireCapableBeanFactory.java:1057)
>> at org.springframework.beans.factory.support.Abstract
>> AutowireCapableBeanFactory.populateBean(AbstractAu
>> towireCapableBeanFactory.java:857)
>> at org.springframework.beans.factory.support.Abstract
>> AutowireCapableBeanFactory.createBean(AbstractAuto
>> wireCapableBeanFactory.java:378)
>> at org.springframework.beans.factory.support.Abstract
>> BeanFactory.getBean(AbstractBeanFactory.java:233)
>> at org.springframework.beans.factory.support.Abstract
>> BeanFactory.getBean(AbstractBeanFactory.java:145)
>> at org.springframework.beans.factory.support.DefaultL
>> istableBeanFactory.preInstantiateSingletons(Defaul
>> tListableBeanFactory.java:283)
>> at org.springframework.context.support.AbstractApplic
>> ationContext.refresh(AbstractApplicationContext.ja va:313)
>> at org.springframework.web.context.support.AbstractRe
>> freshableWebApplicationContext.refresh(AbstractRef
>> reshableWebApplicationContext.java:139)
>> at org.springframework.web.context.ContextLoader.crea
>> teWebApplicationContext(ContextLoader.java:252)
>> at org.springframework.web.context.ContextLoader.init
>> WebApplicationContext(ContextLoader.java:190)
>> at org.springframework.web.context.ContextLoaderListe
>> ner.contextInitialized(ContextLoaderListener.java: 49)
>> at org.apache.catalina.core.StandardContext.listenerS
>> tart(StandardContext.java:3827)
>> at org.apache.catalina.core.StandardContext.start(Sta
>> ndardContext.java:4336)
>> at org.apache.catalina.core.ContainerBase.addChildInt
>> ernal(ContainerBase.java:761)
>> at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java
>> :741)
>> at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:525)
>>
>> Michael.Davis-2 wrote:
>> >
>> > Hi,
>> >
>> > I had to add these to my web.xml:
>> >
>> >     <context-param>
>> >       <param-name>contextConfigLocation</param-name>
>> >       <param-value>/WEB-INF/applicationContext.xml</param-value>
>> >     </context-param>
>> >
>> >     <listener>
>> >
>> > <listener-class>org.springframework.web.context.ContextLoaderListener
>> </listener-class>
>> >     </listener>
>> >
>> > Hope that helps!
>> > Michael Davis
>> >
>> >
>> >> -----Original Message-----
>> >> From: Sandhu [mailto:jaspsand@cisco.com]
>> >> Sent: Friday, June 01, 2007 3:39 PM
>> >> To: axis-user@ws.apache.org
>> >> Subject: Axis2 Web Service with Spring issue
>> >>
>> >>
>> >>
>> >> I am trying to integrate Axis2 Web Service with Spring.
>> >>
>> >> Integrating Web Services with Existing Application Domain
>> >>
>> >> Spring Integration has Issue:
>> >> 1) It does not load ContextLoaderListener
>> >>
>> >> Running Axis2 with Spring inside web
>> >>
>> >> 1) http://localhost:8080/web/services/AccountService?wsdl
>> >> <error>
>> >> <description>Unable to generate WSDL 1.1 for this
>> >> service</description>
>> >> -
>> >> <reason>
>> >> If you wish Axis2 to automatically generate the WSDL 1.1,
>> >> then please +set
>> >> useOriginalwsdl as false in your services.xml
>> >> </reason>
>> >> </error>
>> >>
>> >> 2) ContextLoader Issue spring does not inject code into skelton
>> >>
>> >> Note: In general web service does not work
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> Here's the setup:
>> >>
>> >> Spring applicationContext.xml
>> >>
>> >>
>> >> Quote:
>> >> <beans>
>> >> <!-- Axis2 web service, but to Spring, its just another bean that has
>> >> dependencies -->
>> >> <bean id="springAccountservice"
>> >> class="com.corp.account.domain.accountmanager.Acco
>> >> untserviceSkeleton">
>> >> <property name="service" ref="accountManager"/>
>> >> </bean>
>> >> <!-- just another bean/interface with a wired implementation, which is
>> >> injected by Spring into the web service -->
>> >> <bean id="accountManager"
>> >> class="com.corp.account.domain.impl.AccountManager
>> >> Impl"> </bean>
>> >> </beans>
>> >> 2) services.xml
>> >>
>> >>
>> >> <parameter name="serviceObjectSupplier" locked="false">
>> >> org.apache.axis2.extensions.spring.receivers.Sprin
>> >> gServletContextObjectSupplier
>> >> </parameter>
>> >>
>> >> <parameter name="SpringBeanName" locked="false">
>> >> springAccountservice
>> >> </parameter>
>> >>
>> >>
>> >> 3) web.xml
>> >>
>> >>
>> >> <listener>
>> >> <listener-class>
>> >> org.springframework.web.context.ContextLoaderListe ner
>> >> </listener-class>
>> >> </listener>
>> >> <context-param>
>> >> <param-name>contextConfigLocation</param-name>
>> >> <param-value>/WEB-INF/applicationContext.xml</param-value>
>> >> </context-param>
>> >>
>> >> Any references?
>> >>
>> >> If I try to access it does not work.
>> >> --
>> >> View this message in context:
>> >
>> http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html#a10919239
>> > Sent from the Axis - User mailing list archive at Nabble.com.
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> > For additional commands, e-mail: axis-user-help@ws.apache.org
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> > For additional commands, e-mail: axis-user-help@ws.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html#a10920210
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html#a10920591
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Axis2 Web Service with Spring issue

Posted by robert lazarski <ro...@gmail.com>.
You likely have a var name wrong or the var is private. Try double checking
all your var names and make sure those vars you set by spring are public.

HTH,
Robert

On 6/1/07, Sandhu <ja...@cisco.com> wrote:
>
>
> Thanks,
>
> I have added to the web.xml.
>
> But when I deploy the web application to tomcat or jboss, it says that
>
>
> INFO: Loading Spring root WebApplicationContext
> Jun 1, 2007 6:51:27 AM org.apache.catalina.core.StandardContext
> listenerStart
> SEVERE: Exception sending context initialized event to listener instance
> of
> class org.springframework.web.context.ContextLoaderListe ner
> org.springframework.beans.factory.BeanCreationExce ption: Error creating
> bean with name 'springAccountService' defined in ServletContext resource
> [/WEB-INF/applicationContext.xml]: Error setting property values; nested
> exception is org.springframework.beans.NotWritablePropertyExcep tion:
> Invalid property 'service' of bean class
> [com.corp.account.domain.accountmanager.AccountServ iceSkeleton]: Bean
> property 'service' is not writable or has an invalid setter method: Does
> the
> parameter type of the setter match the return type of the getter?
> org.springframework.beans.NotWritablePropertyExcep tion: Invalid property
> 'service' of bean class [
> com.corp.account.domain.accountmanager.AccountServ
> iceSkeleton]: Bean property 'service' is not writable or has an invalid
> setter method: Does the parameter type of the setter match the return type
> of the getter?
> at org.springframework.beans.BeanWrapperImpl.setPrope
> rtyValue(BeanWrapperImpl.java:670)
> at org.springframework.beans.BeanWrapperImpl.setPrope
> rtyValue(BeanWrapperImpl.java:572)
> at org.springframework.beans.BeanWrapperImpl.setPrope
> rtyValue(BeanWrapperImpl.java:737)
> at org.springframework.beans.BeanWrapperImpl.setPrope
> rtyValues(BeanWrapperImpl.java:764)
> at org.springframework.beans.BeanWrapperImpl.setPrope
> rtyValues(BeanWrapperImpl.java:753)
> at org.springframework.beans.factory.support.Abstract
> AutowireCapableBeanFactory.applyPropertyValues(Abs
> tractAutowireCapableBeanFactory.java:1057)
> at org.springframework.beans.factory.support.Abstract
> AutowireCapableBeanFactory.populateBean(AbstractAu
> towireCapableBeanFactory.java:857)
> at org.springframework.beans.factory.support.Abstract
> AutowireCapableBeanFactory.createBean(AbstractAuto
> wireCapableBeanFactory.java:378)
> at org.springframework.beans.factory.support.Abstract
> BeanFactory.getBean(AbstractBeanFactory.java:233)
> at org.springframework.beans.factory.support.Abstract
> BeanFactory.getBean(AbstractBeanFactory.java:145)
> at org.springframework.beans.factory.support.DefaultL
> istableBeanFactory.preInstantiateSingletons(Defaul
> tListableBeanFactory.java:283)
> at org.springframework.context.support.AbstractApplic
> ationContext.refresh(AbstractApplicationContext.ja va:313)
> at org.springframework.web.context.support.AbstractRe
> freshableWebApplicationContext.refresh(AbstractRef
> reshableWebApplicationContext.java:139)
> at org.springframework.web.context.ContextLoader.crea
> teWebApplicationContext(ContextLoader.java:252)
> at org.springframework.web.context.ContextLoader.init
> WebApplicationContext(ContextLoader.java:190)
> at org.springframework.web.context.ContextLoaderListe
> ner.contextInitialized(ContextLoaderListener.java: 49)
> at org.apache.catalina.core.StandardContext.listenerS
> tart(StandardContext.java:3827)
> at org.apache.catalina.core.StandardContext.start(Sta
> ndardContext.java:4336)
> at org.apache.catalina.core.ContainerBase.addChildInt
> ernal(ContainerBase.java:761)
> at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java
> :741)
> at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:525)
>
> Michael.Davis-2 wrote:
> >
> > Hi,
> >
> > I had to add these to my web.xml:
> >
> >     <context-param>
> >       <param-name>contextConfigLocation</param-name>
> >       <param-value>/WEB-INF/applicationContext.xml</param-value>
> >     </context-param>
> >
> >     <listener>
> >
> > <listener-class>org.springframework.web.context.ContextLoaderListener
> </listener-class>
> >     </listener>
> >
> > Hope that helps!
> > Michael Davis
> >
> >
> >> -----Original Message-----
> >> From: Sandhu [mailto:jaspsand@cisco.com]
> >> Sent: Friday, June 01, 2007 3:39 PM
> >> To: axis-user@ws.apache.org
> >> Subject: Axis2 Web Service with Spring issue
> >>
> >>
> >>
> >> I am trying to integrate Axis2 Web Service with Spring.
> >>
> >> Integrating Web Services with Existing Application Domain
> >>
> >> Spring Integration has Issue:
> >> 1) It does not load ContextLoaderListener
> >>
> >> Running Axis2 with Spring inside web
> >>
> >> 1) http://localhost:8080/web/services/AccountService?wsdl
> >> <error>
> >> <description>Unable to generate WSDL 1.1 for this
> >> service</description>
> >> -
> >> <reason>
> >> If you wish Axis2 to automatically generate the WSDL 1.1,
> >> then please +set
> >> useOriginalwsdl as false in your services.xml
> >> </reason>
> >> </error>
> >>
> >> 2) ContextLoader Issue spring does not inject code into skelton
> >>
> >> Note: In general web service does not work
> >>
> >>
> >>
> >>
> >>
> >> Here's the setup:
> >>
> >> Spring applicationContext.xml
> >>
> >>
> >> Quote:
> >> <beans>
> >> <!-- Axis2 web service, but to Spring, its just another bean that has
> >> dependencies -->
> >> <bean id="springAccountservice"
> >> class="com.corp.account.domain.accountmanager.Acco
> >> untserviceSkeleton">
> >> <property name="service" ref="accountManager"/>
> >> </bean>
> >> <!-- just another bean/interface with a wired implementation, which is
> >> injected by Spring into the web service -->
> >> <bean id="accountManager"
> >> class="com.corp.account.domain.impl.AccountManager
> >> Impl"> </bean>
> >> </beans>
> >> 2) services.xml
> >>
> >>
> >> <parameter name="serviceObjectSupplier" locked="false">
> >> org.apache.axis2.extensions.spring.receivers.Sprin
> >> gServletContextObjectSupplier
> >> </parameter>
> >>
> >> <parameter name="SpringBeanName" locked="false">
> >> springAccountservice
> >> </parameter>
> >>
> >>
> >> 3) web.xml
> >>
> >>
> >> <listener>
> >> <listener-class>
> >> org.springframework.web.context.ContextLoaderListe ner
> >> </listener-class>
> >> </listener>
> >> <context-param>
> >> <param-name>contextConfigLocation</param-name>
> >> <param-value>/WEB-INF/applicationContext.xml</param-value>
> >> </context-param>
> >>
> >> Any references?
> >>
> >> If I try to access it does not work.
> >> --
> >> View this message in context:
> >
> http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html#a10919239
> > Sent from the Axis - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html#a10920210
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

RE: Axis2 Web Service with Spring issue

Posted by Sandhu <ja...@cisco.com>.
Thanks,

I have added to the web.xml.

But when I deploy the web application to tomcat or jboss, it says that


INFO: Loading Spring root WebApplicationContext
Jun 1, 2007 6:51:27 AM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Exception sending context initialized event to listener instance of
class org.springframework.web.context.ContextLoaderListe ner
org.springframework.beans.factory.BeanCreationExce ption: Error creating
bean with name 'springAccountService' defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: Error setting property values; nested
exception is org.springframework.beans.NotWritablePropertyExcep tion:
Invalid property 'service' of bean class
[com.corp.account.domain.accountmanager.AccountServ iceSkeleton]: Bean
property 'service' is not writable or has an invalid setter method: Does the
parameter type of the setter match the return type of the getter?
org.springframework.beans.NotWritablePropertyExcep tion: Invalid property
'service' of bean class [com.corp.account.domain.accountmanager.AccountServ
iceSkeleton]: Bean property 'service' is not writable or has an invalid
setter method: Does the parameter type of the setter match the return type
of the getter?
at org.springframework.beans.BeanWrapperImpl.setPrope
rtyValue(BeanWrapperImpl.java:670)
at org.springframework.beans.BeanWrapperImpl.setPrope
rtyValue(BeanWrapperImpl.java:572)
at org.springframework.beans.BeanWrapperImpl.setPrope
rtyValue(BeanWrapperImpl.java:737)
at org.springframework.beans.BeanWrapperImpl.setPrope
rtyValues(BeanWrapperImpl.java:764)
at org.springframework.beans.BeanWrapperImpl.setPrope
rtyValues(BeanWrapperImpl.java:753)
at org.springframework.beans.factory.support.Abstract
AutowireCapableBeanFactory.applyPropertyValues(Abs
tractAutowireCapableBeanFactory.java:1057)
at org.springframework.beans.factory.support.Abstract
AutowireCapableBeanFactory.populateBean(AbstractAu
towireCapableBeanFactory.java:857)
at org.springframework.beans.factory.support.Abstract
AutowireCapableBeanFactory.createBean(AbstractAuto
wireCapableBeanFactory.java:378)
at org.springframework.beans.factory.support.Abstract
BeanFactory.getBean(AbstractBeanFactory.java:233)
at org.springframework.beans.factory.support.Abstract
BeanFactory.getBean(AbstractBeanFactory.java:145)
at org.springframework.beans.factory.support.DefaultL
istableBeanFactory.preInstantiateSingletons(Defaul
tListableBeanFactory.java:283)
at org.springframework.context.support.AbstractApplic
ationContext.refresh(AbstractApplicationContext.ja va:313)
at org.springframework.web.context.support.AbstractRe
freshableWebApplicationContext.refresh(AbstractRef
reshableWebApplicationContext.java:139)
at org.springframework.web.context.ContextLoader.crea
teWebApplicationContext(ContextLoader.java:252)
at org.springframework.web.context.ContextLoader.init
WebApplicationContext(ContextLoader.java:190)
at org.springframework.web.context.ContextLoaderListe
ner.contextInitialized(ContextLoaderListener.java: 49)
at org.apache.catalina.core.StandardContext.listenerS
tart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(Sta
ndardContext.java:4336)
at org.apache.catalina.core.ContainerBase.addChildInt
ernal(ContainerBase.java:761)
at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:741)
at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:525)

Michael.Davis-2 wrote:
> 
> Hi,
> 
> I had to add these to my web.xml:
> 
>     <context-param>
> 	<param-name>contextConfigLocation</param-name>
> 	<param-value>/WEB-INF/applicationContext.xml</param-value>
>     </context-param>
> 
>     <listener>
> 
> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
>     </listener>
> 
> Hope that helps!
> Michael Davis
> 
> 
>> -----Original Message-----
>> From: Sandhu [mailto:jaspsand@cisco.com]
>> Sent: Friday, June 01, 2007 3:39 PM
>> To: axis-user@ws.apache.org
>> Subject: Axis2 Web Service with Spring issue
>> 
>> 
>> 
>> I am trying to integrate Axis2 Web Service with Spring.
>> 
>> Integrating Web Services with Existing Application Domain
>> 
>> Spring Integration has Issue:
>> 1) It does not load ContextLoaderListener
>> 
>> Running Axis2 with Spring inside web
>> 
>> 1) http://localhost:8080/web/services/AccountService?wsdl
>> <error>
>> <description>Unable to generate WSDL 1.1 for this 
>> service</description>
>> -
>> <reason>
>> If you wish Axis2 to automatically generate the WSDL 1.1, 
>> then please +set
>> useOriginalwsdl as false in your services.xml
>> </reason>
>> </error>
>> 
>> 2) ContextLoader Issue spring does not inject code into skelton
>> 
>> Note: In general web service does not work
>> 
>> 
>> 
>> 
>> 
>> Here's the setup:
>> 
>> Spring applicationContext.xml
>> 
>> 
>> Quote:
>> <beans>
>> <!-- Axis2 web service, but to Spring, its just another bean that has
>> dependencies -->
>> <bean id="springAccountservice"
>> class="com.corp.account.domain.accountmanager.Acco 
>> untserviceSkeleton">
>> <property name="service" ref="accountManager"/>
>> </bean>
>> <!-- just another bean/interface with a wired implementation, which is
>> injected by Spring into the web service -->
>> <bean id="accountManager" 
>> class="com.corp.account.domain.impl.AccountManager
>> Impl"> </bean>
>> </beans>
>> 2) services.xml
>> 
>> 
>> <parameter name="serviceObjectSupplier" locked="false">
>> org.apache.axis2.extensions.spring.receivers.Sprin
>> gServletContextObjectSupplier
>> </parameter>
>> 
>> <parameter name="SpringBeanName" locked="false">
>> springAccountservice
>> </parameter>
>> 
>> 
>> 3) web.xml
>> 
>> 
>> <listener>
>> <listener-class>
>> org.springframework.web.context.ContextLoaderListe ner
>> </listener-class>
>> </listener>
>> <context-param>
>> <param-name>contextConfigLocation</param-name>
>> <param-value>/WEB-INF/applicationContext.xml</param-value>
>> </context-param>
>> 
>> Any references?
>> 
>> If I try to access it does not work.
>> -- 
>> View this message in context: 
> http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html#a10919239
> Sent from the Axis - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html#a10920210
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Axis2 Web Service with Spring issue

Posted by Mi...@servicecanada.gc.ca.
Hi,

I had to add these to my web.xml:

    <context-param>
	<param-name>contextConfigLocation</param-name>
	<param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>

    <listener>
	<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

Hope that helps!
Michael Davis


> -----Original Message-----
> From: Sandhu [mailto:jaspsand@cisco.com]
> Sent: Friday, June 01, 2007 3:39 PM
> To: axis-user@ws.apache.org
> Subject: Axis2 Web Service with Spring issue
> 
> 
> 
> I am trying to integrate Axis2 Web Service with Spring.
> 
> Integrating Web Services with Existing Application Domain
> 
> Spring Integration has Issue:
> 1) It does not load ContextLoaderListener
> 
> Running Axis2 with Spring inside web
> 
> 1) http://localhost:8080/web/services/AccountService?wsdl
> <error>
> <description>Unable to generate WSDL 1.1 for this 
> service</description>
> -
> <reason>
> If you wish Axis2 to automatically generate the WSDL 1.1, 
> then please +set
> useOriginalwsdl as false in your services.xml
> </reason>
> </error>
> 
> 2) ContextLoader Issue spring does not inject code into skelton
> 
> Note: In general web service does not work
> 
> 
> 
> 
> 
> Here's the setup:
> 
> Spring applicationContext.xml
> 
> 
> Quote:
> <beans>
> <!-- Axis2 web service, but to Spring, its just another bean that has
> dependencies -->
> <bean id="springAccountservice"
> class="com.corp.account.domain.accountmanager.Acco 
> untserviceSkeleton">
> <property name="service" ref="accountManager"/>
> </bean>
> <!-- just another bean/interface with a wired implementation, which is
> injected by Spring into the web service -->
> <bean id="accountManager" 
> class="com.corp.account.domain.impl.AccountManager
> Impl"> </bean>
> </beans>
> 2) services.xml
> 
> 
> <parameter name="serviceObjectSupplier" locked="false">
> org.apache.axis2.extensions.spring.receivers.Sprin
> gServletContextObjectSupplier
> </parameter>
> 
> <parameter name="SpringBeanName" locked="false">
> springAccountservice
> </parameter>
> 
> 
> 3) web.xml
> 
> 
> <listener>
> <listener-class>
> org.springframework.web.context.ContextLoaderListe ner
> </listener-class>
> </listener>
> <context-param>
> <param-name>contextConfigLocation</param-name>
> <param-value>/WEB-INF/applicationContext.xml</param-value>
> </context-param>
> 
> Any references?
> 
> If I try to access it does not work.
> -- 
> View this message in context: 
http://www.nabble.com/Axis2-Web-Service-with-Spring-issue-tf3854117.html#a10919239
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org