Tianlong Wu wrote:
Hi everyone,
Just as the subject suggests, does the tuscany runtime automatically download the WSDL and generate the interface? When develop with Visual Studio this is the case. But in my experiments with tuscany, this doesn't happen. When I launch the application without the interface definition I got an error. Do do I have to write an java interface myself according to the external web service's WSDL,
or as I have read from some article that I can use wsimport.exe in jdk_1.6?

Thanks.

--
*****************************************************
Tianlong Wu

Computer Science and Technology Dept.
Harbin Institute of Technology
NO.92 Xidazhi Street,150001
Harbin, Heilongjiang Province, P.R.China
>
Yes, you need to create the Java interface yourself from the WSDL.

You can use wsimport to generate the Java interface.  This will
create a Java interface containing JAX-WS annotations, together with
JAX-WS wrapper classes for all the operations of the external
web service.

Alternatively, you can create an SCA remotable Java interface from
the WSDL.  With this approach you wouldn't need any JAX-WS annotations
or JAX-WS wrapper classes.  Unfortunately there isn't a tool to do this
automatically.  If I need to do this, I use wsimport to generate the
JAX-WS bindings, then I edit the generated Java interface to remove all
the JAX-WS annotations and add an SCA @Remotable annotation to produce
an SCA Java remotable interface.

For an example of the second approach, see samples/helloworld-ws-reference.
This isn't very realistic because it only uses String types.  Most WSDLs
will have operations that use complex schema types for arguments or return
values, and these would be represented in the Java interface by generated
JAXB types (also produced by wsimport).

  Simon

Reply via email to