|
From: Michael S. <mi...@sc...> - 2005-01-08 02:25:27
|
On Thursday 06 January 2005 02:42, Michael Schuerig wrote:
> I've stumbled again on my quest to make Axis and Spring work together
> in the way I want them to. One of my operations has an out parameter
> (in WSDL: a part of the output message that does not appear in the
> operation's parameterOrder attribute; see JAX-RPC 4.3.4).
[snip]
> I'll probably have a go at it in the next couple of days. Thus if
> anyone else intends to do something similar, please contact me.
So, now I've got a factory bean that creates a "tweakable" web service
client using Axis. The factory helps with declarative type mapping,
unwraps business exceptions, handles out parameters and allows to set
document-style services to be "wrapped". See below for a sample
configuration.
I really don't want to keep this to myself. The same goes for other
smallish-but-reusable stuff I've written in the past few months; tests
included, of course. But what can I do to avoid this? I could put the
code on my web site where nobody will find it. What I'm looking for is
some kind of Spring Component Playground for bits and pieces that snap
into Spring but are not (yet) part of the official distribution.
Something with a wider scope and access than the existing sandbox.
Michael
<bean id="webserviceclient"
class="de.schuerig.webservices.AxisClientFactoryBean">
<property name="serviceFactoryClass">
<value>org.apache.axis.client.ServiceFactory</value>
</property>
<property name="wsdlDocumentUrl">
<value>http://serviceprovider.net/service?wsdl</value>
</property>
<property name="timeout">
<value>30000</value> <!-- milliseconds -->
</property>
<property name="namespaceUri">
<value>http://serviceprovider.net/service</value>
</property>
<property name="typeNamespaceUri">
<value>http://serviceprovider.net/service/types</value>
</property>
<property name="serviceName">
<value>TheService</value>
</property>
<property name="portName">
<value>TheSoapPort</value>
</property>
<property name="serviceInterface">
<value>net.example.TheService</value>
</property>
<property name="wrappedStyle">
<value>false</value>
</property>
<property name="encodingStyleUri">
<value></value> <!-- for literal -->
</property>
<property name="typeMappings">
<list>
<bean class="de.schuerig.webservices.TypeMappingDesc">
<property name="javaType">
<value>net.example.SomeBean</value>
</property>
<property name="xmlType">
<value>someBean</value>
</property>
</bean>
<bean class="de.schuerig.webservices.TypeMappingDesc">
<property name="javaType">
<value>net.example.SomeBean[]</value>
</property>
<property name="xmlType">
<value>SomeBeanList</value>
</property>
</bean>
<bean class="de.schuerig.webservices.TypeMappingDesc">
<property name="javaType">
<value>net.example.SpecialBean</value>
</property>
<property name="xmlType">
<value>specialBean</value>
</property>
<property name="serializerFactory">
<value>net.example.SpecialBeanSerializerFactory</value>
</property>
<property name="deserializerFactory">
<value>net.example.SpecialBeanDeserializerFactory</value>
</property>
</bean>
</list>
</property>
</bean>
--
Michael Schuerig The more it stays the same,
mailto:mi...@sc... The less it changes!
http://www.schuerig.de/michael/ --Spinal Tap, The Majesty of Rock
|