Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » WebService method that returns complex type
WebService method that returns complex type [message #162574] Wed, 01 March 2006 11:36 Go to next message
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 05:28 Go to previous messageGo to next message
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 #162946 is a reply to message #162662] Mon, 06 March 2006 14:18 Go to previous messageGo to next message
James Norris is currently offline James Norris
Messages: 52
Registered: July 2009
Member
I've been using serialized XML to take a java object and turn it to/from a
String, so in my fairly simple test cases that I've been using to play
around a bit, my web services have a single String argument and return so
the wsdl is pretty simple. I'm using the xstream api
(http://xstream.codehaus.org/) to do the serialization.

Jim

"Nico" <nicolas.buttin@free.fr> wrote in message
news:8f5c3d2f6415768a2bfce940c5795e6d$1@www.eclipse.org...
>
> 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] Mon, 13 March 2006 21:36 Go to previous messageGo to next message
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!
Re: WebService method that returns complex type [message #728528 is a reply to message #163765] Fri, 23 September 2011 08:35 Go to previous message
Enrico Viappiani is currently offline Enrico Viappiani
Messages: 1
Registered: September 2011
Junior Member
I've done the default constructor for the class but doesn't work..
I have to write the beanserializer/deserializer by myself? where should I put it? some tutorial/ examples?
thanks
Previous Topic:Package two war files into an ear, help
Next Topic:New launch shortcut - org.eclipse.debug.ui.ILaunchShortcut2 class not found
Goto Forum:
  


Current Time: Tue Jul 29 08:48:07 EDT 2014

Powered by FUDForum. Page generated in 0.06127 seconds