• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

JAX-WS + JAXP Tutorial For You

 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

http://techtracer.com/2007/08/15/jax-ws-jaxp-tutorial-building-a-stockquote-web-service-client/

Hope you find it useful in your work.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..

--StockQuoteProvider.java
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;
}

--config.xml
<configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
<service name="StockQuoteService"
targetNamespace="http://stockquote.org/wsdl"
typeNamespace="http://stockquote.org/types"
packageName="com.example">
<interface
name="StockQuoteProvider"
servantName="StockQuoteImpl">
</interface>
</service>
</configuration>

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

Tools are
jdk1.5.0_11
jwsdp_2.0

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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
Naren
SCJP - 92%
Preparing for SCJWSD
[ August 29, 2007: Message edited by: Naren Chivukula ]
 
Why does your bag say "bombs"? The reason I ask is that my bag says "tiny ads" and it has stuff like this:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic