axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hickman, Craig" <>
Subject RE: Service path
Date Fri, 27 Apr 2007 15:11:59 GMT
I think the easiest path is to use Spring to expose you Service and include
Axis2 within your application rather than your app within Axis2.

Add the proper axix2 libs to your applications lib directory. Add the
current version of spring.jar from the Spring Framework Site:

1.) Add the following to your web.xml


 ------------ plus the Axis2 servlets you use -------------

2.) Add the following to your applicationContext.xml

	<bean id="applicationContext"
" />

	<!-- Axis2 web service, but to Spring, its just another bean that
has dependencies   -->
	<bean id="<name of your service>" class="<the skeleton class path to
		<property name="service" ref="<setter prop as in example:
serviceManager to be reference below>" />
	<!-- just another bean/interface with a wired implementation, which
is injected by Spring into the web service -->
	<bean id="serviceManager"
		class="< path to your POJO

 3). Add the following to your Skeleton for injection of service by Spring:

	 * Setter value for Spring to injection of SSO service
	 * @param service
	public void setService(ServiceManager service) {
		this.service = service;

  4) Define you <your own name>.wsdl and services.xml with your target
namespaces as you wish and add to classpath. I use a build file and add both
to my /classes directory. The user guide specifies META-INF... But it seems
to work better, depending on your container in the /classes or /web-inf
direcory (I use oc4j)
  5. The biggest thing about the namespace attributes is to make sure they
exist in classpath. The definitions and the types have to exist, and if you
used and IDE that checks the .wsdl with a parser then you'll be able to
verify this. 

I've found this to work in every project without a hitch....

    Hope this helps....


-----Original Message-----
From: Dennis Thrys√łe [] 
Sent: Friday, April 27, 2007 3:17 AM
Subject: Service path


Is it possible to configure axis2 to place services on multiple different
paths (URLs)?

It seems like a lot goes on under the hood that requires the services
path/contextpath to be used. But I would like to webservices to be placed
all over the namespace...

I'm interested in deploying POJOs as webservices, so the input parameteres
would be a class name and a deployment path. Servlet mapping takes care of
invoking the proper servlet.

The result should be:

- POJO webservice based on given class
- Name based on class (I assume this is not configurable behaviour?)
- Accessible on URL defined by me

Let me know if I'm way off base here...



The information in this email is confidential and may be legally protected.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message