aspose file tools*
The moose likes Web Services and the fly likes AXIS 1, ant, java2wsdl in NetBeans 5.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "AXIS 1, ant, java2wsdl in NetBeans 5.5" Watch "AXIS 1, ant, java2wsdl in NetBeans 5.5" New topic
Author

AXIS 1, ant, java2wsdl in NetBeans 5.5

Dalibor Karlovic
Greenhorn

Joined: Aug 24, 2007
Posts: 4
Hello,

I'm doing some overdue school work in which I must use AXIS1 on Tomcat using NetBeans 5, for which I found a nice PDF. It explains how to do simple WS on the above combo and it worked for me. But, in my project, things aren't as smooth.

I have couple of beans in org.foi.dkarlovi.bean (User, Weather, WeatherFilter, Portfolio) and an interface org.foi.dkarlovi.service.server.PrognosticarInterface:



What I'm trying to do is run java2wsdl on my interface, run wsdl2java on the generated WSDL and write the implementation. When running java2wsdl I get those "Please register beanmapping/typemapping for 'org.foi.dkarlovi.bean.*'", I've found that some sort of beanmapping must be done (guess it goes in the Ant task), but where does it go and how? The article I've found puts it to deploy.wsdd, but I get that after running java2wsdl (which gives me errors in the first place) and wsdl2java. I know I'm missing something, but am going slightly mad.

TIA

build.xml:

Marko Debac
Ranch Hand

Joined: Aug 21, 2006
Posts: 121
dkarlovi@foi.hr,
why dont you use Sun Java App Server with Netbeans 5.5.1. for your project? and you will not have trouble with Axis and stuff..

Regardes,
Marko
Dalibor Karlovic
Greenhorn

Joined: Aug 24, 2007
Posts: 4
Originally posted by Marko Debac:
dkarlovi@foi.hr,
why dont you use Sun Java App Server with Netbeans 5.5.1. for your project? and you will not have trouble with Axis and stuff..

Regardes,
Marko


I can't, the assignment says "AXIS 1.4, Tomcat 5.5, MySQL 4.1". I said it was overdue. I wouldn't be using NetBeans either if I had a choice.
Dalibor Karlovic
Greenhorn

Joined: Aug 24, 2007
Posts: 4
Well, if I've only posted sooner. After running java2wsdl and then wsdl2java, I've opened deploy.wsdd and added



at the end of the service element, created a new NetBeans project, added a new Web Service Client (JAX-RPC) and it just works, they're talking beans.

What confused me in the first place was that I was looking for a solution for the java2wsdl which was spitting out the error and it didn't occur to me that I can just edit .wsdd after it gets generated. Why, I couldn't tell you. I guess I was looking for an Ant-based solution, that <mapping/> element seems like a good candidate, but no time to explore now.

This site is a great resource, thank you.
[ August 24, 2007: Message edited by: Dalibor Karlovic ]
Marko Debac
Ranch Hand

Joined: Aug 21, 2006
Posts: 121
Yes, this site is the best Java reasource.
Welcome!

Good luck with Kermek!
Dalibor Karlovic
Greenhorn

Joined: Aug 24, 2007
Posts: 4
Originally posted by Marko Debac:
Yes, this site is the best Java reasource.
Welcome!


Thank you.

Good luck with Kermek!


An ex-colleague?

The project is almost finished, it took a while, me not being familiar with Java (used only dynamically typed languages like Python, Perl, PHP) and it was frustrating, but I kind of got the hang of it. Some concepts are great (I adore taglibs), but some parts are overly complicated (for example, getting a md5()-ed string or reflection which I had to use for my web service client).

Also, I had a surprise when running wsdl2java. It rearranged my beans to implement serialize, but I did not know that a bean must not contain any custom methods (except getters and setters) so I just thrown some in there (basically, CRUD methods like create() etc. for an object, so it knows how to store itself in a DB or read, what is the common practice for this?), when running Clean&Build I got CannotFindSymbol all over the place and it wasn't fun.
[ August 25, 2007: Message edited by: Dalibor Karlovic ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AXIS 1, ant, java2wsdl in NetBeans 5.5