users@jax-rpc.java.net

Re: how to write a simple service

From: Arun Gupta <Arun.Gupta_at_Sun.COM>
Date: Thu, 16 Sep 2004 18:53:29 -0700

Hi Amit,

See inline replies ...

amit anand wrote:

> hello sir,,
> As u told there is a problem in my claspath,now my classpath is
>
> C:\jwsdp-1.4\jwsdp-shared\lib\activation.jar;C:\jwsdp-1.4\jwsdp-shared\lib\mail.jar;C:\jwsdp-1.4\jwsdp-shared\lib\jax-qname.jar;C:\jwsdp-1.4\jwsdp-shared\lib\namespace.jar;C:\jwsdp-1.4\jwsdp-shared\lib\xsdlib.jar;C:\jwsdp-1.4\jwsdp-shared\lib\relaxngDatatype.jar;C:\jwsdp-1.4\jaxrpc\lib\jaxrpc-api.jar;C:\jwsdp-1.4\jaxrpc\lib\jaxrpc-impl.jar;C:\jwsdp-1.4\jaxrpc\lib\jaxrpc-spi.jar;C:\jwsdp-1.4\jaxp\lib\jaxp-api.jar;C:\jwsdp-1.4\jaxp\lib\endorsed\dom.jar;C:\jwsdp-1.4\jaxp\lib\endorsed\sax.jar;C:\jwsdp-1.4\jaxp\lib\endorsed\xalan.jar;C:\jwsdp-1.4\jaxp\lib\endorsed\xercesImpl.jar;C:\jwsdp-1.4\saaj\lib\saaj-api.jar;C:\jwsdp-1.4\saaj\lib\saaj-impl.jar;C:\jwsdp-1.4\apache-ant\lib;C:\jwsdp-1.4\jaxrpc\samples;C:\jwsdp-1.4\jaxrpc\samples\add\build\classes
>
> Now the progress is that my client got successfuly compiled
> But the problem is now when i am running it
> My Addlient.class is in
> C:\jwsdp-1.4\jaxrpc\samples\add\AddClient.class
> and in my AddClient.java i am using add as package
> i have compiled it sitting in add dierctory
> Now when i am running it sitting in add or C:\jwsdp-1.4\jaxrpc\samples\
> and using java add.AddClient
> the following error occurs
>
> java,rmi.RemoteException:HTTP transport error:java.net.MalformedURLException:no protocol:REPLACE_WITH_ACTUAL_URL;nested exception is
> HTTP transport error:java.net.MalformedURLException:no protocol:REPLACE_WITH_ACTUAL_URL

You need to set the address of the endpoint on the generated stub as
given in the step 3 of scenario 2 [1]

Here is the excerpt from the article ...

  StockQuoteProvider port = (new
StockQuoteService_Impl()).getStockQuoteProviderPort();
((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
YOUR_ENDPOINT_ADDRESS);

[1] https://jax-rpc.dev.java.net/whitepaper/1.1/index-part2.html#Scenario2

Hopefully you'll be able to invoke your web service after this change.

Good luck!
-Arun


> at add.AddIF_Stub.doadd(AddIF_Stub.java:13)
> at add.AddClient.main(AddClient.java:13)
> Caused by HTTP Transport Error:java.net.MalformedURLException:no protocol:REPLACE_WITH_ACTUAL_URL
> at com.sun.xml.rpc.client.HttpClientTransport.invoke (HttpClientTransport.java:140)
> at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:92)
> at add.AddIF_Stub.doadd(ADDIF_Stub.java:70)
> ...1 more
>
> Do i have to change some stubs also???
> i think i am close to the solution but still could'nt get it,,,
> Waiting for ur response sir
> Thanking You
> Regards
> -Amit
>
>
>
>
>
>

-- 
got Web Services ?
Download Java Web Services Developer Pack from
http://java.sun.com/webservices
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net