axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "robert lazarski" <robertlazar...@gmail.com>
Subject Re: Exposing a Spring bean as WS with Axis2
Date Thu, 15 Nov 2007 21:35:05 GMT
Hi Marko,

The 'SpringInit-service' is only needed for the 'spring inside the
aar' case (spring jars in the aar, complete per aar classloader
isolation) , ie, not what you appear to be doing.  If your spring
based rest and pojo service 'appears to be working fine', have fun and
welcome to axis2.

Robert

On Nov 15, 2007 3:07 PM, Marko Asplund <marko.asplund@ixonos.com> wrote:
>
> I've developed a Spring-based service that I'm exposing as a Web Service
> using Axis2 1.3. The service appears to be working fine and I'm able to
> get data back with a REST request but since I'm still in the process of
> learning Axis2 I'd like to get sanity check for my deployment model.
>
> Due to starting off with an existing service which I wanted to WS-enable
> it felt more natural to add Axis2 to the existing web application and
> not the other way around, so I'm using the exploded deployment model and
> not AAR archive files.
>
> I've mostly tried to follow the "Spring-based POJO Web Service"
> instructions except that I haven't configured a SpringInit-service.
> Things seem to be working without it and Spring is being initialized in
> web.xml. Are there any potential problems with this approach?
>
>
> Here're the relevant configuration files, does everything look ok?
>
>
> WEB-INF/web.xml:
> <listener>
>   <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
> </listener>
>
> <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-mapping>
>   <servlet-name>AxisServlet</servlet-name>
>   <url-pattern>/services/*</url-pattern>
> </servlet-mapping>
>
>
> WEB-INF/applicationContext.xml:
> <bean id="commentService" class="com.acme.comment.CommentServiceImpl">
>   <property name="commentDAO" ref="commentDAO"/>
> </bean>
>
>
> WEB-INF/services/CommentService/META-INF/services.xml
> <serviceGroup>
>   <service name="CommentService" targetNamespace="http://acme.com/ws/comment/">
>     <description>Comment Service</description>
>     <schema schemaNamespace="http://acme.com/ws/comment/xsd/"/>
>
>     <parameter name="ServiceClass" locked="false">com.acme.comment.CommentService</parameter>
>
>     <parameter name="ServiceObjectSupplier" locked="false">
>       org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier
>     </parameter>
>     <parameter name="SpringBeanName" locked="false">commentService</parameter>
>
>     <operation name="getComment">
>       <messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>     </operation>
>     <operation name="getCommentsInThread">
>       <messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>     </operation>
>
>     <!-- ... more operations here ... -->
>   </service>
> </serviceGroup>
>
>
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message