users@jax-rpc.java.net

Re: Client creation from WSDL file

From: Simon Horrell <simonh_at_develop.com>
Date: Thu, 06 Jun 2002 21:03:28 +0100

It's not a bug. The xrpcc tool simply generated the port name in the WSDL by
appending 'Port' to the name of the Java service description interface. When
xrpcc generates an interface from WSDL it chooses to take the port name
literally.
JAX-RPC (or the RI) doesn't make any promises about round-tripping.
Si.

----- Original Message -----
From: "Luc Plaetinck" <luc_plaetinck_at_COMPUWARE.COM>
To: <JAXRPC-INTEREST_at_JAVA.SUN.COM>
Sent: Monday, June 03, 2002 11:19 PM
Subject: Client creation from WSDL file


> Hi,
>
> I implemented the sample service "hello" and matching client with the
jwsdp-1_0-ea2 toolkit . Everything is running fine.
> Now I want to start from the generated WSDL file to build a client for
this service.
> I adjusted the config.xml file:
> <?xml version="1.0" encoding="UTF-8"?>
> <configuration
> xmlns="http://java.sun.com/jax-rpc-ri/xrpcc-config">
> <wsdl name="HelloWorldService"
>
location="http://localhost:8080/jaxrpc-hello/server/HelloWorldService.wsdl"
> packageName="hello">
> </wsdl>
> </configuration>
>
> The corresponding wsdl file has following entry:
> ...
> <service name="HelloWorld">
> <port name="HelloIFPort" binding="tns:HelloIFBinding">
> <soap:address
location="http://localhost:8080/jaxrpc-hello/jaxrpc/HelloIF"/></port></servi
ce></definitions>
>
> Running the xprcc tool to generate the stubs and then running ant
compile-client gives following error:
> [javac] Compiling 1 source file to
E:\jwsdp-1_0-ea2\docs\tutorial\examples\j
> axrpc\hello\build\client
> [javac]
E:\jwsdp-1_0-ea2\docs\tutorial\examples\jaxrpc\hello\HelloClient.jav
> a:10: cannot resolve symbol
> [javac] symbol : method getHelloIF ()
> [javac] location: class hello.HelloWorld_Impl
> [javac] (HelloIF_Stub)(new
HelloWorld_Impl().getHelloIF());
> [javac] ^
> [javac] 1 error
>
> XRPCC seems to generate the classes HelloIFPort_Stub and HelloIFPort_Impl
instead of HelloIF_Stub and HelloIF_Impl as expected.
>
> When I change the <port name> entry to <port name="HelloIF", so that the
wsdl file is as follows:
> ...
> <service name="HelloWorld">
> <port name="HelloIF" binding="tns:HelloIFBinding">
> <soap:address
location="http://localhost:8080/jaxrpc-hello/jaxrpc/HelloIF"/></port></servi
ce></definitions>
>
> everything works fine. Is this a bug in the xrpcc tool for generating the
stubs from WSDL?
>
> Thanks,
> Luc