Re: writing a beanMapping
Sonja Pieper wrote: Virga wrote: if you use WSDL2Java you don't need to do registerTypeMapping, it will do it for you:-) no actually it really does not and I have asked around some more where I work, the people told me: oh geez no we write the clients ourselves. and yes it seems to be the registerTypeMapping that is missing. Once I have found a solution I will post it. Thx again. Anyhow is this a bug or am I missing a parameter during the generation? Ciao Sonja -- [EMAIL PROTECTED], Tel: 91374-370 Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut. --Ernest Hemingway
Re: writing a beanMapping
Sonja Pieper wrote: Sonja Pieper wrote: Virga wrote: if you use WSDL2Java you don't need to do registerTypeMapping, it will do it for you:-) no actually it really does not and I have asked around some more where I work, the people told me: oh geez no we write the clients ourselves. and yes it seems to be the registerTypeMapping that is missing. Once I have found a solution I will post it. The solution was: I took the code that Virga posted incorporated it in the generated client and now everything now works fine. Should I file a bug-report? Is it a bug? I am still not sure, but actually the most important is: it works. So I think the beanMapping and the whole namespace thing was not it, it is only the WSDL2Java which - called from ant at least - did not work as supposed. Oh well I hope anyone who has this problem in the future (if at all) will find this thread in the archives :-) Ciao -- [EMAIL PROTECTED], Tel: 91374-370 Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut. --Ernest Hemingway
Re: writing a beanMapping
maybe the namespace you specified is already reserved for http://xml.apache.org/axis/wsdd/; try to change : deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; service name=Servicename provider=java:RPC parameter name=className value=my.package.ServiceInterface/ parameter name=allowedMethods value=method1 method2/ beanMapping qname=ns:ReturnValue xmlns:ns=urn:Servicename languageSpecificType=java:my.package.ReturnValue/ /service /deployment to this : deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; service name=Servicename provider=java:RPC parameter name=className value=my.package.ServiceInterface/ parameter name=allowedMethods value=method1 method2/ beanMapping qname=ns1:ReturnValue xmlns:ns1=urn:Servicename languageSpecificType=java:my.package.ReturnValue/ /service /deployment
Re: writing a beanMapping
thx for the hint but I am still getting the following exception: org.xml.sax.SAXException: No deserializer for {urn:Addresschecker}ReturnValue I have no idea what the {...} part really means ... -- [EMAIL PROTECTED], Tel: 91374-370 Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut. --Ernest Hemingway
Re: writing a beanMapping
maybe you could post your complete .wsdd file because i don't see any urn:Addresschecker in your file. for example if you decide to use xmlns:ns1=urn:Addresschecker as namespace instead of doing something like xmlns:ns1=http://mypackage.something; then you should do : beanMapping xmlns:ns1=urn:Addresschecker qname=ns1:ReturnValue languageSpecificType=java:mypackage.ReturnValue/ thus in your client class you should do: QName myQn = new QName(urn:Addresschecker, ReturnValue); call.registerTypeMapping(mypackage.ReturnValue.class, myQn, new org.apache.axis.encoding.ser.BeanSerializerFactory(mypackage.ReturnValue.cla ss, myQn), new org.apache.axis.encoding.ser.BeanDeserializerFactory(mypackage.ReturnValue.c lass, myQn)); instead of: beanMapping xmlns:ns1=http://mypackage.something; qname=ns1:ReturnValue languageSpecificType=java:mypackage.ReturnValue/ and client code : QName myQn = new QName(http://mypackage.something;, ReturnValue); call.registerTypeMapping(mypackage.ReturnValue.class, myQn, new org.apache.axis.encoding.ser.BeanSerializerFactory(mypackage.ReturnValue.cla ss, myQn), new org.apache.axis.encoding.ser.BeanDeserializerFactory(mypackage.ReturnValue.c lass, myQn));
Re: writing a beanMapping
Virga wrote: maybe you could post your complete .wsdd file because i don't see any urn:Addresschecker in your file. for example if you decide to use xmlns:ns1=urn:Addresschecker as namespace instead of doing something like xmlns:ns1=http://mypackage.something; then you should do : I think that I have done this now (I am working on it :-) ... - the file is posted below. beanMapping xmlns:ns1=urn:Addresschecker qname=ns1:ReturnValue languageSpecificType=java:mypackage.ReturnValue/ thus in your client class you should do: I am generating my client via the WSDL2Java tool ..? Do I have to do this as well? Where do I put the beanMapping? Within the service tag or without? In the samples there was a file where it was not inside the service tag. Thx for the help -- my deploy.wsdd: deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; xmlns:ns1=http://localhost:8180/axis/services/Addresschecker; service name=Addresschecker provider=java:RPC namespace http://localhost:8180/axis/services/Addresschecker /namespace parameter name=className value=my.package.AddressCheckerInterface/ parameter name=allowedMethods value=checkAddress checkEmail/ /service beanMapping qname=ns1:ReturnValue languageSpecificType=java:my.package.ReturnValue/ /deployment -- [EMAIL PROTECTED], Tel: 91374-370 Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut. --Ernest Hemingway
Re: writing a beanMapping
if you use WSDL2Java you don't need to do registerTypeMapping, it will do it for you:-) you should set your beanMapping inside the service if you want to use this bean mapping only for a specified service, but if you have other services that use the same bean mapping then you should set it globally, put it outside any service tag like i did.
Re: writing a beanMapping
Virga wrote: if you use WSDL2Java you don't need to do registerTypeMapping, it will do it for you:-) well at least I cannot find the part where the de/serializers are registered. The generated class implements Serializable though ? The interesting thing is: if I kick the beanMapping completely I get a java.io.Exception that there is no serializer for my ReturnValue java.io.IOException: No serializer found for class de.einsundeins.addresschecker.ReturnValue in registry [EMAIL PROTECTED] And if I keep it in I get this one: org.xml.sax.SAXException: No deserializer for {http://localhost:8180/axis/services/Addresschecker}ReturnValue I generate my client with the following parameters to WDSL2Java: java ...WDSL2Java -o src/ -a -p client http://localhost:8180/axis/services/Addresschecker?wdsl Well actually I am using ant for this. Maybe the call via ant is broken? I have really no idea what to do, so I guess I will call it a day and hope that tomorrow I have better ideas. Thx for your help, and I thought porting the application from apache soap to axis would take about one hour :-) Ciao Sonja -- [EMAIL PROTECTED], Tel: 91374-370 Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut. --Ernest Hemingway