0

I have a couple of web services running on JBoss 5.1.0 GA with JBossWs native stack (shipped with JBoss 5.1.0 GA binary)

These web services are simple POJO services. Many of the WebMethods exposed by the services are of Complex Object type (I call these Complex types as DTO's) and a lot of custom defined exceptions. These DTO's are also bundled in a jar file, so that they can be used at the Client end as well.

I started creating a client using Eclipse (which I understand is using wsconsume to generate the client stub) and I saw that the utility would generate the DTO's from the WSDL and I could not find any way of enforcing the utility to use the DTO & exception classes provided in the jar file.

I had earlier asked a question on this on SO and could not find any answers.

From reading of various resources on wsconsume and generating client stub using eclipse (which would use JBossWS) i have now started to believe that what I am trying to achieve might not actually be possible using wsconsume.

My question is: Is there a better way to create a client stub which would use the DTO classes from the jar files. I am open on changing the Client generation mechanism and move to axis or any other library for Client generation if that is possible. It would also be ideal if an ant task can be created for Client stub generation.

PS: My knowledge on web services is very limited and if I am being stupid with my question here, please pardon me for that.

Community
  • 1
  • 1
Salman A. Kagzi
  • 3,833
  • 13
  • 45
  • 64

1 Answers1

0

Why do you want to use Data Transfer Objects in Your Web Service ? Is that necessary? Because If you use such objects, those web services can be use only in Java I think. That is a interoperability issue. So If you can avoid those kind of objects that will be a good practice.

andunslg
  • 781
  • 14
  • 38
  • Its not necessary, as those DTO's are already shared with the Client code, I just wanted to reuse them instead of having a complete new set from the Stub. I dont think I am breaking any interoperability here. Am i? – Salman A. Kagzi Aug 03 '12 at 12:39
  • Can a person use your web service, using a language other than those DTO are defined? – andunslg Aug 03 '12 at 13:16
  • This is more of a Private web service which only clients that we have written can consume. We are currently developing a Java client for it. In future we might have a client in another language (Where these DTO's wont be available but they can still use this web service). – Salman A. Kagzi Aug 03 '12 at 18:23