Skip to main content

Web Service question

4 replies [Last post]
Anonymous

I have a simple question...

I have a test web service:
@Stateless()
@WebService()
public class TestWS {
@WebMethod() public String hello(@WebParam() String name) {
return "Hello " + name + "!";
}
}

When I deploy, the WSDL URL is
http://localhost:8080/TestWSService/TestWS?wsdl.
How can I change that to have something like:

http://localhost:8080/foo-1.0.0/TestWS?wsdl.

thanks,
Daniel.
[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Vijay Ramachandran

If you are not using any descriptors at all, then try this :

@STateless()
@WebService(serviceName="foo-1.0.0")
public ......

Vijay

Daniel Cavalcanti wrote:
> I have a simple question...
>
> I have a test web service:
> @Stateless()
> @WebService()
> public class TestWS {
> @WebMethod() public String hello(@WebParam() String name) {
> return "Hello " + name + "!";
> }
> }
>
> When I deploy, the WSDL URL is
> http://localhost:8080/TestWSService/TestWS?wsdl.
> How can I change that to have something like:
>
> http://localhost:8080/foo-1.0.0/TestWS?wsdl.
>
> thanks,
> Daniel.
>

[att1.html]

Daniel Cavalcanti

Thanks,
How about if I use a descriptor: sun-ejb-jar.xml

On 6/7/07, Vijay Ramachandran wrote:
>
> If you are not using any descriptors at all, then try this :
>
> @STateless()
> @WebService(serviceName="foo-1.0.0")
> public ......
>
> Vijay
>
> Daniel Cavalcanti wrote:
>
> I have a simple question...
>
> I have a test web service:
> @Stateless()
> @WebService()
> public class TestWS {
> @WebMethod() public String hello(@WebParam() String name) {
> return "Hello " + name + "!";
> }
> }
>
> When I deploy, the WSDL URL is
> http://localhost:8080/TestWSService/TestWS?wsdl.
> How can I change that to have something like:
>
> http://localhost:8080/foo-1.0.0/TestWS?wsdl.
>
> thanks,
> Daniel.
>
>
>
[att1.html]

Vijay Ramachandran

Use the endpoint-address-uri element to specify the exact URI you want.

Vijay

Daniel Cavalcanti wrote:
> Thanks,
> How about if I use a descriptor: sun-ejb-jar.xml
>
> On 6/7/07, *Vijay Ramachandran* > > wrote:
>
> If you are not using any descriptors at all, then try this :
>
> @STateless()
> @WebService(serviceName="foo-1.0.0")
> public ......
>
> Vijay
>
>
> Daniel Cavalcanti wrote:
>> I have a simple question...
>>
>> I have a test web service:
>> @Stateless()
>> @WebService()
>> public class TestWS {
>> @WebMethod() public String hello(@WebParam() String name) {
>> return "Hello " + name + "!";
>> }
>> }
>>
>> When I deploy, the WSDL URL is
>> http://localhost:8080/TestWSService/TestWS?wsdl.
>> How can I change that to have something like:
>>
>> http://localhost:8080/foo-1.0.0/TestWS?wsdl.
>>
>> thanks,
>> Daniel.
>>
>
>

[att1.html]

Daniel Cavalcanti

Got it. thanks.

On 6/8/07, Vijay Ramachandran wrote:
>
> Use the endpoint-address-uri element to specify the exact URI you want.
>
> Vijay
>
> Daniel Cavalcanti wrote:
>
> Thanks,
> How about if I use a descriptor: sun-ejb-jar.xml
>
> On 6/7/07, Vijay Ramachandran wrote:
> >
> > If you are not using any descriptors at all, then try this :
> >
> > @STateless()
> > @WebService(serviceName="foo-1.0.0")
> > public ......
> >
> > Vijay
> >
> > Daniel Cavalcanti wrote:
> >
> > I have a simple question...
> >
> > I have a test web service:
> > @Stateless()
> > @WebService()
> > public class TestWS {
> > @WebMethod() public String hello(@WebParam() String name) {
> > return "Hello " + name + "!";
> > }
> > }
> >
> > When I deploy, the WSDL URL is
> > http://localhost:8080/TestWSService/TestWS?wsdl.
> > How can I change that to have something like:
> >
> > http://localhost:8080/foo-1.0.0/TestWS?wsdl.
> >
> > thanks,
> > Daniel.
> >
> >
> >
>
>
[att1.html]