The ideal way is to have AXIS integrated into your app/web server. For
example JBoss.Net 3.2 integrates AXIS 1.0 into the app server itself and
so you can consume and publish web services without any classpath
conflicts.. 

A simple work around that I have used successfully is to use AXIS to
publish and host my services and to use 'Apache SOAP' to call other
remote web services from within your servlet context..

You can use IBMs WSTK (bundled with WSAD) to generate an Apache SOAP
proxy from the remote service's WSDL.. 

works a treat

Yours
Phil



On Thu, 2003-02-20 at 09:05, Jim Carlson wrote:
> Hello,
>    I'm trying to determine the correct way to invoke a web service, from 
> within a servlet container context, which is itself running an Axis server.
>    My specific scenario is that I'm running Tomcat 4.1, and I have a 
> webapp which contains the Axis jars and server-config.wsdd.  This webapp 
> should both publish and consume my web services.  (In each case, the 
> other party is another, similar Tomcat/Axis server.)  In addition, I 
> have some custom typemappings that need to work on both client and 
> server end.
>    I have no problem configuring the Axis server to publish my services 
> with the custom typemappings.  However, I don't know how to create a 
> Service and a Call, from within the same webapp, which use the 
> typemappings from server-config.wsdd.  It seems like there should be an 
> easy way to do this (without replicating config information anywhere).
>    I can get an instance of AxisServer by calling 
> AxisServletBase.getEngine(someOtherServlet).  This AxisServlet has the 
> typemappings from server-config.wsdd.  Next, I've tried the following 
> techniques:
> 
>      new Service(axisServer.getConfig()).createCall();
> 
>      new Service(axisServer.getClientEngine().getConfig()).createCall();
> 
>      new 
> Service().setTypeMappingRegistry(axisServer.getTypeMappingRegistry());
> 
> ... and some other permutations as well.  In the first case, 
> Call.invoke() behaves very oddly, I think because it has server-side 
> handlers instead of client-side handlers.  In both the first and second 
> cases, a subsequent check of Service.getTypeMappingRegistry() shows that 
> my custom mappings did not actually transfer over.  In the third 
> case.... well here's the implementation of 
> Service.setTypeMappingRegistry() from axis/client/Service.java:
> 
>      public void setTypeMappingRegistry(TypeMappingRegistry registry)
>                      throws ServiceException  {
>      }
> 
> A no-op.  That was a fun surprise.  Anyhow, I will continue digging 
> through the source, but I thought someone on this list would probably 
> already know the *correct* way to acheive this.  Note that I am trying 
> to avoid having a second client.wsdd file, or programmatically copying 
> over the individual Mappings, because both of these techniques 
> unnecessarily replicate configuration data.  I hope there is something 
> better.
> 
> 
> Thanks!
> 
> Jim

Reply via email to