Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

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 ]
Something must be done about this. Let's start by reading this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic