• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Confusion over JBossWS

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone...

I am trying to develop a sample web service using JBOSS. When i searched in Google, i could see that webservices in JBOSS could be developed using AXIS, JBOSSWS and WS4EE. What are all these exactly? How do we determine which one we should use for our purpose? Please throw some light on this...
I have used weblogic before and we are migrating to JBOSS now. I am still unable to develop a helloworld web service using JBOSS.

Awaiting eagerly for some reply on this...
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Whitch version of JBoss do you use?

If you are using version 4.2+ you can use this User Guide for JBossWS - and it works

Just remember that this is "The JBoss way" of using the JavaEE webservice implementation, but it is almost like the real standard SUN (Glassfish) implementation.
 
Krithi Raghu
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When i compile my java class, i get this error...



I am using JBOSS4.2.2
 
Krithi Raghu
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is my webservice interface


This is the annotated WS

 
Rene Larsen
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To be able to compile your WS code, you need to add the right JBoss WS jar files to the compile classpath. Because your hello world code does not contain any JBoss specific WS code, I just used my normal 'javaee.jar' (GlassFish implementation) as the only one in the classpath - beside the JDK.

Your HelloWorld code did not work as it was (could not deploy), but I did not get any compiler errors.

I needed to add then "@Stateless" annotation to the HelloWorldWS - then the webservice could deploy on a JBoss v2.4.1.



And it gave me this WSDL:


[ April 17, 2008: Message edited by: Rene Larsen ]
 
Krithi Raghu
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Larsen...
I still could not resolve the annotation issue. However i could develop a sample web service without using annotation. I tried writing a sample client program to invoke the web service. This was done using HttpURLConnection. But this gives the following error in the server.

I could not guess what exactly is going wrong?
A snippet of my sample client program

Please guide me. In weblogic, i was able to send my xml using this program. But in JBOSS, it is giving me this error.
 
Rene Larsen
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

If I use the webservice 'HelloWorldWS', with the '@Stateless' added to it - and I modified the SOAP to match that WSDL - everything works.

To see how the SOAP should look like, you can use SOAP UI as a client

I have modified these lines, with the right SoapActionUrl, webservice method name and namespace:


Finally I added an InputStream to be able to read from the HttpURLConnection:
 
Krithi Raghu
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Larsen. I could make this working now.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic