You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by VĂ­ctor Downs <vi...@soapros.com> on 2009/01/06 20:00:40 UTC

[Axis2] How to manually configure JAX-WS Services

Hello everybody.

Its just recently that I found out that Axis2 supports JAX-WS, so I was
eager to try it. I followed a top down approach, using wsimport and an
existing WSDL file (SampleWS.wsdl) to generate java artifacts, then
copied the generated files to an existing project.

Although I'm kind of new to the use of Axis2 (and Web Services for that
matter), i've managed to configure JMS for a "standard" (i.e. ADB,
eclipse-wizard-generated) service by modifying axis2.xml and its
corresponding services.xml.

Maybe I'm a little confused about the way JAX-WS works, but I would
appreciate it if somebody could give me some pointers on a couple of
issues:

          - 1 -
First, I would llike to modify the "name" with which my bean is
deployed. Take the following code for example:

    @WebService(endpointInterface = "com.test.SayHiPortType",
    targetNamespace= "http://localhost:8080/Test/SayHiWS/", serviceName
=
    "SayHiWS", portName = "SayHi", wsdlLocation =
    "WEB-INF/wsdl/SampleWS.wsdl")
    public class SayHiWS {
        ...
    }

When I deploy the project, axis2 reports the service deployment like
this:

    [INFO] Deploying JAXWS annotated class com.test.SayHiWS as a service
- SayHiWS.SayHi

Then, if i want to test the service, i have to use the following URL on
my web browser...

    http://localhost:8080/Test/services/SayHiWS.SayHi?wsdl

...which is quite different from the soap:address specified in the WSDL
file:

    <wsdl:port binding="tns:SayHi" name="SayHi">
        <soap:address location="http://localhost:8080/Test/SayHiWS/"/>
    </wsdl:port>

Is there a way i could configure the Service in order to be invoked with
that address? (SayHiWS)


            - 2 -
The second issue is related to the first: how to configure the JMS
transport. By default, Axis2 tries to look for a queue named after the
service (SayHiWS.SayHi in this case), which of course doesn't exist as I
expected the service to be named simply SayHiWS. I tried creating a
custom services.xml file, but this deploys the service twice! on for the
annotated class and another for the services.xml entry

Is there something Im doing wrong?

Thanks in advance!