Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JAX-WS + JAXP Tutorial For You

Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

In SCDJWS you must have learnt JAXRPC for creating and invoking web services. But currently in usage JAXRPC has been replaced by JAXWS. So after learning how to use it I have written a small tutorial using JAX-WS and JAXP for building a stock quote web service client from an online web service.

Hope you find it useful in your work.
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nitin,

This is not related to your current message.
I have one small question which i feel you can answer this.
I am facing a small problem in building the server ties from service end point using JAX-RPC;
Its giving me the eror
'error : modeler error : java.lang.NullPointerException'

The sample code snippet i used is..
public interface StockQuoteProvider extends java.rmi.Remote {
public float getLastTradePrice(String tickerSymbol)
throws java.rmi.RemoteException;
public String getStockQuote(String tickerSymbol)
throws java.rmi.RemoteException;

<configuration xmlns="">;
<service name="StockQuoteService"

and the wscompile command string i tried is
/> wscompile -cp . -gen:server config.xml

Tools are

Could you please try and tell me what went wrong here?
Ranch Hand
Posts: 577
Tomcat Server Notepad Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nitin,

Firstly thanks for sharing your knowledge across.

I couldn't resist myself in asking you some of the questions. Kindly clarify.

1. Does this JAX-WS with JAXP work only with JDK5.0? Can we treat this combined technology will soon replace JAX-RPC in the real time projects? Can this technology also be used for RPC-Literal web services or just Document-Literal?

2. How do we know the structure of output XML of the WS endpoint service? Will we get to know this by studying WSDL or Do we need to manually take the sample output XML string from the WS site?

I'll try to run your sample and come back with more questions:-)

As I don't have in depth practical knowledge on WebServices, my apologies for any fundamental or very basic questions.

Thanks and Regards,
SCJP - 92%
Preparing for SCJWSD
[ August 29, 2007: Message edited by: Naren Chivukula ]
Get me the mayor's office! I need to tell him about this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic