• Post Reply Bookmark Topic Watch Topic
  • New Topic

JAX-WS + JAXP Tutorial For You  RSS feed

nitin pai
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.
Anwar S
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="http://java.sun.com/xml/ns/jax-rpc/ri/config">
<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?
Naren Chivukula
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • 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 ]
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!