axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From filip...@cirquedigital.com
Subject Re: manual provider configuration - BeanDeserializer
Date Thu, 03 Nov 2005 02:57:42 GMT
Hi,

I found a couple more pointers that hopefully will trigger
the solution in someone's mind:

The client (I'm using Python and SOAPpy) gets the following
exception:

Server.userException: java.lang.IllegalArgumentException: argument type
mismatch: <SOAPpy.Types.structType detail at 1081742604>: {'stackTrace':
'java.lang.IllegalArgumentException: argument type mismatch\n\tat
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n\tat
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\n\tat
java.lang.reflect.Method.invoke(Method.java:585)\n\tat
org.apache.axis.utils.BeanPropertyDescriptor.set(BeanPropertyDescriptor.java:142)\n\tat
org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:75)\n\tat
org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:249)\n\tat
org.apache.axis.encoding.ser.ArrayDeserializer.valueComplete(ArrayDeserializer.java:583)\n\tat
org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:509)\n\tat
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)


What I'm surprised about is to find here a reference to the
ArrayDeserializer here -- I don't think this one should be
used...

Apart from that, I also find that the parameters are described
with soapenc:string iso xsd:string in the wsdl file that's generated
from axis automatically:

   <complexType name="ExternalNote">
    <sequence>
     <element name="audience" nillable="true" type="soapenc:string"/>
     <element name="author" nillable="true" type="soapenc:string"/>
     <element name="content" nillable="true" type="soapenc:string"/>
     <element name="createdOn" nillable="true" type="soapenc:string"/>
     <element name="id" nillable="true" type="soapenc:string"/>
     <element name="node" nillable="true" type="soapenc:string"/>
     <element name="priority" nillable="true" type="soapenc:string"/>
     <element name="thumbnailPath" nillable="true" type="soapenc:string"/>
     <element name="type" nillable="true" type="soapenc:string"/>
     <element name="typist" nillable="true" type="soapenc:string"/>
    </sequence>
   </complexType>

Anybody any thoughts where I could look next ?

Thanks!
- Filip




> Hi Axis'ers,
>
> I'm trying to embed Axis in an application and have my own
> provider set up and attach services to it like so:
>
> ...
>         m_provider = new SimpleProvider();
>
>         TypeMapping tm;
>         try {
>             tm = m_provider.getTypeMappingRegistry().createTypeMapping();
>
>             n = new QName("ExternalNote", "ExternalNote");
>
>             tm.register(ExternalNote.class, n,
>                     new BeanSerializerFactory(ExternalNote.class, n),
>                     new BeanDeserializerFactory(ExternalNote.class, n));
>
>             m_provider.getTypeMappingRegistry().register(
>                     "http://schemas.xmlsoap.org/soap/encoding/", tm);
>
>         } catch (org.apache.axis.ConfigurationException e) {
>             throw new ConfigurationException(e.getMessage(), e);
>         }
>
>         Configuration[] serviceConfs = conf.getChildren("service");
>
>         for (int i = 0; i < serviceConfs.length; i++) {
>             Configuration sConf = serviceConfs[i];
>
>             AvalonProvider p = new AvalonProvider(m_serviceManager);
>
>             SOAPService s = new SOAPService(p);
>
>             s.getServiceDescription().setName(sConf.getAttribute("id"));
>             s.setOption("className", sConf.getAttribute("impl"));
>             s.setOption("allowedMethods",
> sConf.getAttribute("allowedMethods"));
>
>             ((SimpleProvider)
> m_provider).deployService(sConf.getAttribute("id"), s);
>         }
> ...
>
> All this works great; but I'm running into the following
> snag passing ExternalNote object back into Axis (the
> serialization process works well); Axis says:
>
> Nov 2, 2005 4:17:59 PM org.apache.axis.encoding.ser.BeanPropertyTarget set
> SEVERE: Could not convert
> org.apache.axis.encoding.ser.ArrayDeserializer$ArrayListExtension to bean
> field 'audience', type java.lang.String
>
> (audience is a simple String member of the ExternalNote class).
>
> Can anybody point me to where I'm going wrong? It seems
> that I'm doing something incorrectly in the typemappingregistry
> but I can't find enough documentation about it to really
> figure out how to do it correctly (most of the examples
> assume starting from wsdl).
>
> I'd be very greateful for any hints!
>
> Thanks in advance,
>
> - Filip
>
>
>
>


Mime
View raw message