You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by SOA Work <so...@web.de> on 2006/01/19 11:35:43 UTC

WSDL2Java generated files do not register mapping for return type?

Hi there,

I just tried to test my web service with some java test code. I used axis 1_3 WSDL2Java ant task.
My service returns an array of compley types. I have a java bean contact ("service.do.Contact") ant the return type
is Contact[].

The ant task generates the service classes and an own java bean service.do.Contact (slightly different from my own, of course. but it fits).

Now my problem: as long as the returned array is empty, the operation call works fine. If the array is not empty the test fails with the following exception:

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: java.io.IOException: No serializer found for class service.do.Contact in registry org.apache.axis.encoding.TypeMappingDelegate@1582a7c
 faultActor: 
 faultNode: 
 faultDetail: 
	{http://xml.apache.org/axis/}hostname:lala

java.io.IOException: No serializer found for class service.do.Contact in registry org.apache.axis.encoding.TypeMappingDelegate@1582a7c
	at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
	at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
....


I'm not used to axis but doesn't this mean I have to register a bean deserializer somewhere? Shouldn't the generated sources do this of it's own?

Thx in advance
Dominik


______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193


Re: WSDL2Java generated files do not register mapping for return type?

Posted by Simone Bonazzoli <s....@gmail.com>.
in the file .wsdd you have to specify the type mapping, in axis doc you can
see some examples...

2006/1/19, SOA Work <so...@web.de>:
>
>
> Hi there,
>
> I just tried to test my web service with some java test code. I used axis
> 1_3 WSDL2Java ant task.
> My service returns an array of compley types. I have a java bean contact
> ("service.do.Contact") ant the return type
> is Contact[].
>
> The ant task generates the service classes and an own java bean
> service.do.Contact (slightly different from my own, of course. but it
> fits).
>
> Now my problem: as long as the returned array is empty, the operation call
> works fine. If the array is not empty the test fails with the following
> exception:
>
> AxisFault
> faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> faultSubcode:
> faultString: java.io.IOException: No serializer found for class
> service.do.Contact in registry
> org.apache.axis.encoding.TypeMappingDelegate@1582a7c
> faultActor:
> faultNode:
> faultDetail:
>         {http://xml.apache.org/axis/}hostname:lala
>
> java.io.IOException: No serializer found for class service.do.Contact in
> registry org.apache.axis.encoding.TypeMappingDelegate@1582a7c
>         at org.apache.axis.message.SOAPFaultBuilder.createFault(
> SOAPFaultBuilder.java:222)
>         at org.apache.axis.message.SOAPFaultBuilder.endElement(
> SOAPFaultBuilder.java:129)
> ....
>
>
> I'm not used to axis but doesn't this mean I have to register a bean
> deserializer somewhere? Shouldn't the generated sources do this of it's own?
>
> Thx in advance
> Dominik
>
>
> ______________________________________________________________
> Verschicken Sie romantische, coole und witzige Bilder per SMS!
> Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
>
>