• Post Reply Bookmark Topic Watch Topic
  • New Topic

can you help with this?  RSS feed

 
Georgia Matheou
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello

i have the following program that takes two complex numbers and makes some mathematic operations
the program is

i only put the add function, i need to make is as a web service and call it
any help please?

Thanks,
Geo
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which API, and which WS implementation, are you planning to work with?
 
Georgia Matheou
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using NetBeans 6.0 with java application server.
I know the add class will my one method but i have a problem with the main class. how do i implement this? and how i will call it to the client after that?

Thanks,
Geo
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I generally suggest not to use an IDE when getting started with WS. While they're convenient, they abstract away a lot of detail that you really need to understand to become a proficient WS developer.

The Java App Server support the JAX-WS API, so I'd advise to start with that. Here's a nice introduction.

As regards the Complex class, you can't easily transmit custom objects (like Complex), nor can the methods you expose as WS depend on the state of the object. That means a signature like "Complex add (Complex)" isn't going to work. You need something like "String add (Complex, Complex)" which returns a datatype that SOAP can deal with.
Alternatively, you can look into JAXB as a means of transporting a Complex object through SOAP; this blog entry may get you started on that.

By the way, you should also UseAMeaningfulSubjectLine. The one you used is singularly unhelpful, as it says nothing about the problem at hand.
[ May 31, 2008: Message edited by: Ulf Dittmer ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!