|
From: Colin S. <col...@ex...> - 2005-01-08 03:48:56
|
Michael, For about a good 6 months or so now I keep meaning to set up a 'cookbook' area on the wiki where people can put shorts bits of code and tips for doing things. You could perhaps put up the stuff on the wiki, and I'll try to organize it a bit more in about 2-3 weeks when I am done with the project I am on now... Colin Michael Schuerig wrote: >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> > > > |