Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » webservice
webservice [message #203143] Fri, 26 October 2007 14:44 Go to next message
Eclipse UserFriend
Originally posted by: xdzgor.hotmail.com

Hi - in general is it possible to return a "custom type" from a java
webservice? I mean for example a simple class such as

public class MyClass {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

I have not been able to get this to work using Axis2 - my client which is
a c# application always recieves a MyClass object with a null name. If I
simply return a String from my web-service method then that works fine.

Are there any general pitfalls with writing webservices in java? (I have
written several with Visual Studio c#, and this is easy - you click on the
"make webservice project" button...)

Thanks,
Peter
Re: webservice [message #203304 is a reply to message #203143] Mon, 29 October 2007 16:11 Go to previous message
Lawrence Mandel is currently offline Lawrence MandelFriend
Messages: 486
Registered: July 2009
Senior Member
Hi Peter,

>Hi - in general is it possible to return a "custom type" from a java
>webservice? I mean for example a simple class such as
>
>public class MyClass {
> private String name;
> public String getName() {
> return name;
> }
> public void setName(String name) {
> this.name = name;
> }
>}

Yes it is.

>I have not been able to get this to work using Axis2 - my client which
is
>a c# application always recieves a MyClass object with a null name. If I
>simply return a String from my web-service method then that works fine.

I'm not sure how Axis2 generates Web services. As an alternative method,
you can develop your service top down, describing your service first by
creating a WSDL document and then generating stub code that you can hook
up to your objects.

>Are there any general pitfalls with writing webservices in java? (I have
>written several with Visual Studio c#, and this is easy - you click on
the
>"make webservice project" button...)

There are definitely places where people go wrong (I see a lot of invalid
XML schemas) because of complexity but no limitations of Java Web
services.

Lawrence
Previous Topic:JSP Web Service Client test facility option missing?
Next Topic:Method DependencyManager.getModStamp missing
Goto Forum:
  


Current Time: Tue Apr 16 04:21:40 GMT 2024

Powered by FUDForum. Page generated in 0.02389 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top