WebService method that returns complex type [message #162574] |
Wed, 01 March 2006 16:36 |
Eclipse User |
|
|
|
Originally posted by: markp.softlanding.com
I have a Java Bean that I am using to generate a WSDL and a web service
using WTP 1.0.1. In this method, I want to return an object like this:
public interface ISVNResult {
public String getCommandOutput();
public boolean isSuccessful();
}
I generate the Web service and the WSDL. The WSDL it generates looks
like this:
<element name="checkoutProjectResponse">
<complexType>
<sequence>
<element name="checkoutProjectReturn" type="xsd:anyType"/>
</sequence>
</complexType>
</element>
When I test it using the Web Services Explorer in Tomcat 5.0.28 and
AXIS, I get this:
SEVERE: java.io.IOException:
AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userExcept ion
faultSubcode:
faultString: java.io.IOException: No serializer found for class
org.tigris.subversion.alf.SVNSuccess in registry
org.apache.axis.encoding.TypeMappingDelegate@1b2d7df
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.io.IOException: No
serializer found for class org.tigris.subversion.alf.SVNSuccess in
registry org.apache.axis.encoding.TypeMappingDelegate@1b2d7df
at
org.apache.axis.encoding.SerializationContext.serializeActua l(Serializat
ionContext.java:1429)
at
org.apache.axis.encoding.SerializationContext.serialize(Seri alizationCon
text.java:914)
at org.apache.axis.message.RPCParam.serialize(RPCParam.java:200 )
at org.apache.axis.message.RPCElement.outputImpl(RPCElement.jav a:433)
at
org.apache.axis.message.MessageElement.output(MessageElement .java:1208)
at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:13 9)
at
org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope .java:477)
snip...
Is there something I can do that will make this work? I could go back
to just returning Strings in my method, but this seemed more expressive.
Mark
|
|
|
Re: WebService method that returns complex type [message #162662 is a reply to message #162574] |
Thu, 02 March 2006 10:28 |
Eclipse User |
|
|
|
Originally posted by: nicolas.buttin.free.fr
Hi,
I asked the same question but I haven't been answered...
The only solution I found is to add to the WSDD deployment file of your
web service something like this into your service markup :
<beanMapping qname="myNS:ISVNResult" xmlns:myNS="urn:YourService"
languageSpecificType="java:your.parckage.ISVNResult"/>
You will then need to call the Axis AdminClient tool on you web service.
If someone knows a simple solution, I would be very interested to read it!
Nico
|
|
|
|
Re: WebService method that returns complex type [message #163765 is a reply to message #162574] |
Tue, 14 March 2006 02:36 |
Eclipse User |
|
|
|
Originally posted by: tim.stapleton.beyondbrowsing.com
I have been able to return complex types through Webservices using WTP.
Have you checked that you have a default constructor on the Class that will be returned?
The beanserializer/deserializer that will be used by default for a complex type require this. The WTP seems to fail on this but not explain that this is the problem.
I had to run the same project on JBuilder2006 to find out my mistake!
|
|
|
|
Powered by
FUDForum. Page generated in 0.04054 seconds