You have registered the type as element 
http://schemas.xmlsoap.org/soap/encoding/:packagename.test on the server.  You must 
use the same on the client:

        smr.mapTypes(Constants.NS_URI_SOAP_ENC,
            new QName("http://schemas.xmlsoap.org/soap/encoding/";, 
"packagename.test"), 
            test.class, beanSer,
            beanSer);

You *should* use your own namespace URI, something like "urn:Test" on both the server 
and client, instead of "http://schemas.xmlsoap.org/soap/encoding/";, but you do not 
have to.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 16, 2004 3:35 AM
Subject: Apache Soap 2.3.1 complex datatypes


> Apache Soap 2.3.1 complex datatypes
> 
> 
> Hey there,
> 
> i want to get complex datatypes from ther server to the client. The complexe
> datatype is an class with name "packagename.test" and getter-setter methods
> like an javabean. So i want to use the beanserializer.
> 
> I got the following exception:
> 
> [SOAPException: faultCode=SOAP-ENV:Client; msg=No mapping found for
> &apos;http://schemas.xmlsoap.org/soap/encoding/:packagename.test&apos; using
> encoding style &apos;http://schemas.xmlsoap.org/soap/encoding/&apos;.;
> targetException=java.lang.IllegalArgumentException: No mapping found for
> 'http://schemas.xmlsoap.org/soap/encoding/:packagename.test' using encoding
> style 'http://schemas.xmlsoap.org/soap/encoding/'.]
> 
> Client-code:
> ....
>  SOAPMappingRegistry smr = new SOAPMappingRegistry();
>         BeanSerializer beanSer = new BeanSerializer();
>         smr.mapTypes(Constants.NS_URI_SOAP_ENC,
>             new QName("urn:Test", "urn:Test"), test.class, beanSer,
>             beanSer);
> 
>         call = new Call();
>         call.setSOAPMappingRegistry(smr);
> 
>         call.setTargetObjectURI("urn:Test");
>         call.setMethodName("getKlasseTest");
> 
>         call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
> 
> 
> 
> The Server is deployed with the AdminTool:
> 
> ID     urn:Test
> Scope     Application
> Provider Type     java
> Provider Class     packagename.test
> Use Static Class     false
> Methods     getKlasseTest
> Type Mappings     [TypeMapping
> encodingStyle=http://schemas.xmlsoap.org/soap/encoding/,elementType=http://schemas.xmlsoap.org/soap/encoding/:packagename.test,javaType=packagename.test,java2XMLClassName=org.apache.soap.encoding.soapenc.BeanSerializer,xml2JavaClassName=org.apache.soap.encoding.soapenc.BeanSerializer]
> Default Mapping Registry Class
> 
> Whats wrong?
> 
> Gruß
> 
> Torven
> 
> -- 
> "Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
> Jetzt aktivieren unter http://www.gmx.net/info
> 
>

Reply via email to