users@jax-rpc.java.net

Re: WSDL2RMI ???

From: Arun Gupta <arun.gupta_at_Sun.COM>
Date: Tue, 02 Apr 2002 09:29:22 -0800

Hi Barry,

These steps were helpful.

Starting from a WSDL side, you dont need to do compile-server. It is
assumed that your service has already been installed at the endpoint
mentioned in your WSDL
(http://localhost:8080/jaxrpc-hello/jaxrpc/HelloIF in your case since
you already ran the 'hello' example).

When you originally ran the 'hello' example, this endpoint should have
been published by your build.xml. Did you verify that this endpoint was
published properly ? You can do this by giving this endpoint in the
browser window. It should you all the relevant ports (HelloIF in your case).

Once the endpoint has been configured correctly, you only need to do the
following steps:

1). Generate client-side artifacts from the WSDL document (_Stub and
Service_Impl file)
2). Write the client code to access the endpoint that has been published
within the WSDL file. Since you've already edited the WSDL with the
correct endpoint address, you'll have pre-configured stubs, i.e. with
the correct endpoint set.

Hope that helps.

Regards,
-Arun



Barry Burd wrote:

>>Can you please list all the steps that you are following for
>>deploying your service?
>>
>
>
>
> ***I start with a fresh copy of the 'hello' directory in the tutorial.
>
> ***I rewrite config.xml as follows:
> <?xml version="1.0" encoding="UTF-8"?>
> <configuration
> xmlns="http://java.sun.com/jax-rpc-ri/xrpcc-config">
> <wsdl name="HelloWorldService"
> location="HelloWorldService.wsdl"
> packageName="hello">
> </wsdl>
> </configuration>
>
>
> ***I take the wsdl file that was created when I originally ran the 'hello' example,
> and I place it into the the 'hello' directory (I make one or two changes -- see below):
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <definitions name="HelloWorldService" targetNamespace="http://hello.org/wsdl" xmlns:tns="http://hello.org/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <types/>
> <message name="sayHello">
> <part name="String_1" type="xsd:string"/></message>
> <message name="sayHelloResponse">
> <part name="result" type="xsd:string"/></message>
> <portType name="HelloIF">
> <operation name="sayHello">
> <input message="tns:sayHello"/>
> <output message="tns:sayHelloResponse"/></operation></portType>
> <binding name="HelloIFBinding" type="tns:HelloIF">
> <operation name="sayHello">
> <input>
> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://hello.org/wsdl"/></input>
> <output>
> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://hello.org/wsdl"/></output>
> <soap:operation soapAction=""/></operation>
> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
> <service name="HelloWorld">
> <!--port name="HelloIFPort" binding="tns:HelloIFBinding"-->
> <!--port name="HelloClient" binding="tns:HelloIFBinding"-->
> <port name="HelloIF" binding="tns:HelloIFBinding">
> <!-- soap:address location="REPLACE_WITH_ACTUAL_URL"/ -->
> <soap:address location="http://localhost:8080/jaxrpc-hello/jaxrpc/HelloIF"/>
> </port></service></definitions>
>
> ***I start Tomcat.
>
> ***Then I have the following command-line session::::
>
> C:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hello>ant compile-server
> Buildfile: build.xml
>
> prepare:
> [echo] Creating the required directories....
> [mkdir] Created dir: C:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hello\build\client\
> hello
> [mkdir] Created dir: C:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hello\build\server\
> hello
> [mkdir] Created dir: C:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hello\build\shared\
> hello
> [mkdir] Created dir: C:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hello\dist
>
> compile-server:
> [echo] Compiling the server-side source code....
> [javac] Compiling 2 source files to C:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hell
> o\build\shared
>
> BUILD SUCCESSFUL
>
> Total time: 2 seconds
> C:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hello>ant xrpcc-server
> Buildfile: build.xml
>
> prepare:
> [echo] Creating the required directories....
>
> compile-server:
> [echo] Compiling the server-side source code....
> [javac] Compiling 2 source files to C:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hell
> o\build\shared
>
> xrpcc-server:
> [echo] Running xrpcc for the server:
>
> BUILD SUCCESSFUL
>
> Total time: 7 seconds
>
> C:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hello>ant install
> Buildfile: build.xml
>
> setup-web-inf:
> [echo] Setting up build/WEB-INF....
> [mkdir] Created dir: C:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hello\build\WEB-INF
> \classes\hello
> [copy] Copying 10 files to C:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hello\build\
> WEB-INF\classes\hello
> [copy] Copying 1 file to C:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hello\build\WE
> B-INF
> [copy] Copying 1 file to C:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hello\build\WE
> B-INF
>
> install:
> [echo] Installing the application....
> [install] OK - Installed application at context path /jaxrpc-hello
> [install]
>
> BUILD SUCCESSFUL
>
> Total time: 2 seconds
> C:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hello>
>
> ************Then, if I look back at my Tomcat console window, I see the following:
>
> javax.servlet.ServletException
> at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.init(JAXRPCServletD
> elegate.java:50)
> at com.sun.xml.rpc.server.http.JAXRPCServlet.init(JAXRPCServlet.java:40)
>
> at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
> java:919)
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:81
> 1)
> at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
> t.java:3288)
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:3
> 468)
> at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
> .java:821)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80
> 7)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:545)
>
> at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
> loyer.java:256)
> at org.apache.catalina.core.StandardHost.install(StandardHost.java:739)
> at org.apache.catalina.servlets.ManagerServlet.install(ManagerServlet.ja
> va:581)
> at org.apache.catalina.servlets.ManagerServlet.doGet(ManagerServlet.java
> :307)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:247)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:193)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> alve.java:243)
> at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
> .java:577)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:483)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
> alve.java:190)
> at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
> .java:577)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
> torBase.java:528)
> at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
> .java:575)
> at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve
> .java:246)
> at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
> .java:575)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:483)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>
> at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
> 2349)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
> ava:180)
> at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
> .java:577)
> at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
> rValve.java:170)
> at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
> .java:575)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
> ava:171)
> at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
> .java:575)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:483)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
> ve.java:174)
> at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
> .java:577)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
> 469)
> at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
> .java:575)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> a:483)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>
> at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcesso
> r.java:1029)
> at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.ja
> va:1140)
> at java.lang.Thread.run(Thread.java:536)
> [ERROR] http - -null <javax.servlet.ServletException>
>


--
=============================================
There is only one me, I must live myself!
There is only one today, I must live itself!
=============================================
http://members.tripod.com/~apgupta/index.html
=============================================