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 Jan Kaiser <ja...@is-teledata.com> on 2005/01/24 16:58:10 UTC

Configure webservice path in URL (Axis)

Hi,

I would like to know how to setup a webservice with axis, which presents 
a different path than only /axis/services/ServiceName to the user.
I'm working on a project which will provide some hundreds of services 
and I would like to group these services into namespaces (which are 
mapped with paths in the server).

E.g.:

namespace1.Service1 -> http://host:port/axis/services/namespace1/Service1
namespace2.Servive1 -> http://host:port/axis/services/namespace2/Service1

How can I achive this?


Regards,

Jan Kaiser

Axis 1.2 final

Posted by Patrick Cogan <pa...@gmail.com>.
Hi,

Does anyone know when Axis 1.2 final is possibly due to be released?
The axis java seems to be way behind compared to the number of
releases Axis c++ has had.

Regards,

Patrick

Re: Configure webservice path in URL (Axis)

Posted by Jan Kaiser <ja...@is-teledata.com>.
Hi,

I already had a look at the documentation of these tools and tried a lot 
of options - but without any success.
Can you please be a bit more detailed and tell me which option is "mine"?

Regards,

Jan Kaiser


Patrick Cogan wrote:

>Hi,
>
>Personally, most of my experience is wsdl2java. I would create a wsdl
>with lots of different ports and then get wsdl2java to generate the
>java code in the port and package structure you want, I think it is
>easier and more configurable this way.
>
>Looking at the java2wsdl reference doc it seems to be possible to do
>it the java2wsdl way, have a look at
>http://docs.pushtotest.com/axisdocs/reference.html
>
>Regards,
>
>Patrick
>
>
>On Mon, 24 Jan 2005 17:51:49 +0100, Jan Kaiser
><ja...@is-teledata.com> wrote:
>  
>
>>Hi,
>>
>>I try it a bit more detailed:
>>
>>I generate a lot of Java code which resides in several Java Packages eg.
>>package1.Service1, package2.Service1 etc.
>>
>>After that step I would like to generate wsdl (With Java2WSDL, of
>>course) that contains information about the final
>>path (URL) with which the User can reach Service1. And I would like to
>>get a servive url like
>>
>>http://host:port/axis/services/package1/Service1
>>
>>But may be this kind of information has nothing to do with the wsdl. I
>>just dont know. What I want to achieve is, that once I deploy the
>>compiled classes with the deploy.wsdd and the AdminClient application,
>>the URL of a service is as above.
>>
>>Can you please provide me the required steps how to achieve this.
>>
>>What I currently get is http://host:port/axis/services/Service1 and I
>>would like to "insert" the string package1 into that
>>url : http://host:port/axis/services/package1/Service1
>>
>>How exactly is this possible? Any commandline arguments to Java2WSDL or
>>to WSDL2Java? Is this possible at all?
>>
>>Thanks & Regards
>>
>>Jan Kaiser
>>
>>
>>Patrick Cogan wrote:
>>
>>    
>>
>>>Hi,
>>>
>>>Not quite sure what you mean as namespaces are to do with the wsdl
>>>schema and the wsdl file itself.
>>>
>>>If I read you right the you need to change the ports in the service
>>>part of the wsdl to the number and give them whatever name you want
>>>and ultimately as  many operations (services) as you want under each
>>>port.
>>>
>>>Regards,
>>>
>>>Patrick.
>>>
>>>
>>>
>>>      
>>>
>>>>        
>>>>

Re: Configure webservice path in URL (Axis)

Posted by Patrick Cogan <pa...@gmail.com>.
Hi,

Personally, most of my experience is wsdl2java. I would create a wsdl
with lots of different ports and then get wsdl2java to generate the
java code in the port and package structure you want, I think it is
easier and more configurable this way.

Looking at the java2wsdl reference doc it seems to be possible to do
it the java2wsdl way, have a look at
http://docs.pushtotest.com/axisdocs/reference.html

Regards,

Patrick


On Mon, 24 Jan 2005 17:51:49 +0100, Jan Kaiser
<ja...@is-teledata.com> wrote:
> Hi,
> 
> I try it a bit more detailed:
> 
> I generate a lot of Java code which resides in several Java Packages eg.
> package1.Service1, package2.Service1 etc.
> 
> After that step I would like to generate wsdl (With Java2WSDL, of
> course) that contains information about the final
> path (URL) with which the User can reach Service1. And I would like to
> get a servive url like
> 
> http://host:port/axis/services/package1/Service1
> 
> But may be this kind of information has nothing to do with the wsdl. I
> just dont know. What I want to achieve is, that once I deploy the
> compiled classes with the deploy.wsdd and the AdminClient application,
> the URL of a service is as above.
> 
> Can you please provide me the required steps how to achieve this.
> 
> What I currently get is http://host:port/axis/services/Service1 and I
> would like to "insert" the string package1 into that
> url : http://host:port/axis/services/package1/Service1
> 
> How exactly is this possible? Any commandline arguments to Java2WSDL or
> to WSDL2Java? Is this possible at all?
> 
> Thanks & Regards
> 
> Jan Kaiser
> 
> 
> Patrick Cogan wrote:
> 
> >Hi,
> >
> >Not quite sure what you mean as namespaces are to do with the wsdl
> >schema and the wsdl file itself.
> >
> >If I read you right the you need to change the ports in the service
> >part of the wsdl to the number and give them whatever name you want
> >and ultimately as  many operations (services) as you want under each
> >port.
> >
> >Regards,
> >
> >Patrick.
> >
> >
> >
> >>
> >>
>

Re: Configure webservice path in URL (Axis)

Posted by Jan Kaiser <ja...@is-teledata.com>.
Hi Sunil,

I had a look at that posting, but I think this is not exactly what I 
need. I need the opposite: Not shortening the path but extending it.
But it is not simply extending the path component by an additional 
string, because there must be some mechanism ("Magic") which maps
the original java package to such a string that extends the path.
My configuration in web.xml allows these additional strings because of 
the default pattern "/services/*", but how to tell the webservice itself 
that its
path is different from the default? I mean, finally, the service is 
listed on the axis "Serives" page as a link. I want to achieve that this 
link already contains
the somehow configured package in its path component. And I guess that 
this information must be contained in the deploy.wsdd file, but don't 
know how :-(

Regards,

Jan Kaiser

Sunil Kothari wrote:

>Hi Jan,
>  This comes from my earlier postings. Might be of help. Have a look 
>http://marc.theaimsgroup.com/?l=axis-user&m=110379579215406&w=2
>
>Sunil Kothari
>----- Original Message ----- 
>From: "Jan Kaiser" <ja...@is-teledata.com>
>To: <ax...@ws.apache.org>
>Sent: Monday, January 24, 2005 10:21 PM
>Subject: Re: Configure webservice path in URL (Axis)
>
>
>  
>
>>Hi,
>>
>>I try it a bit more detailed:
>>
>>I generate a lot of Java code which resides in several Java Packages eg. 
>>package1.Service1, package2.Service1 etc.
>>
>>After that step I would like to generate wsdl (With Java2WSDL, of 
>>course) that contains information about the final
>>path (URL) with which the User can reach Service1. And I would like to 
>>get a servive url like
>>
>>http://host:port/axis/services/package1/Service1
>>
>>But may be this kind of information has nothing to do with the wsdl. I 
>>just dont know. What I want to achieve is, that once I deploy the
>>compiled classes with the deploy.wsdd and the AdminClient application, 
>>the URL of a service is as above.
>>
>>Can you please provide me the required steps how to achieve this.
>>
>>What I currently get is http://host:port/axis/services/Service1 and I 
>>would like to "insert" the string package1 into that
>>url : http://host:port/axis/services/package1/Service1
>>
>>How exactly is this possible? Any commandline arguments to Java2WSDL or 
>>to WSDL2Java? Is this possible at all?
>>
>>Thanks & Regards
>>
>>Jan Kaiser
>>
>>
>>
>>
>>Patrick Cogan wrote:
>>
>>    
>>
>>>Hi,
>>>
>>>Not quite sure what you mean as namespaces are to do with the wsdl
>>>schema and the wsdl file itself.
>>>
>>>If I read you right the you need to change the ports in the service
>>>part of the wsdl to the number and give them whatever name you want
>>>and ultimately as  many operations (services) as you want under each
>>>port.
>>>
>>>Regards,
>>>
>>>Patrick.
>>>
>>> 
>>>
>>>      
>>>
>>>>   
>>>>
>>>>        
>>>>
>
>
>  
>

Re: Configure webservice path in URL (Axis)

Posted by Sunil Kothari <su...@majoris.com>.
Hi Jan,
  This comes from my earlier postings. Might be of help. Have a look 
http://marc.theaimsgroup.com/?l=axis-user&m=110379579215406&w=2

Sunil Kothari
----- Original Message ----- 
From: "Jan Kaiser" <ja...@is-teledata.com>
To: <ax...@ws.apache.org>
Sent: Monday, January 24, 2005 10:21 PM
Subject: Re: Configure webservice path in URL (Axis)


> Hi,
> 
> I try it a bit more detailed:
> 
> I generate a lot of Java code which resides in several Java Packages eg. 
> package1.Service1, package2.Service1 etc.
> 
> After that step I would like to generate wsdl (With Java2WSDL, of 
> course) that contains information about the final
> path (URL) with which the User can reach Service1. And I would like to 
> get a servive url like
> 
> http://host:port/axis/services/package1/Service1
> 
> But may be this kind of information has nothing to do with the wsdl. I 
> just dont know. What I want to achieve is, that once I deploy the
> compiled classes with the deploy.wsdd and the AdminClient application, 
> the URL of a service is as above.
> 
> Can you please provide me the required steps how to achieve this.
> 
> What I currently get is http://host:port/axis/services/Service1 and I 
> would like to "insert" the string package1 into that
> url : http://host:port/axis/services/package1/Service1
> 
> How exactly is this possible? Any commandline arguments to Java2WSDL or 
> to WSDL2Java? Is this possible at all?
> 
> Thanks & Regards
> 
> Jan Kaiser
> 
> 
> 
> 
> Patrick Cogan wrote:
> 
> >Hi,
> >
> >Not quite sure what you mean as namespaces are to do with the wsdl
> >schema and the wsdl file itself.
> >
> >If I read you right the you need to change the ports in the service
> >part of the wsdl to the number and give them whatever name you want
> >and ultimately as  many operations (services) as you want under each
> >port.
> >
> >Regards,
> >
> >Patrick.
> >
> >  
> >
> >>    
> >>
> 



Re: Configure webservice path in URL (Axis)

Posted by Jan Kaiser <ja...@is-teledata.com>.
Hi,

I try it a bit more detailed:

I generate a lot of Java code which resides in several Java Packages eg. 
package1.Service1, package2.Service1 etc.

After that step I would like to generate wsdl (With Java2WSDL, of 
course) that contains information about the final
path (URL) with which the User can reach Service1. And I would like to 
get a servive url like

http://host:port/axis/services/package1/Service1

But may be this kind of information has nothing to do with the wsdl. I 
just dont know. What I want to achieve is, that once I deploy the
compiled classes with the deploy.wsdd and the AdminClient application, 
the URL of a service is as above.

Can you please provide me the required steps how to achieve this.

What I currently get is http://host:port/axis/services/Service1 and I 
would like to "insert" the string package1 into that
url : http://host:port/axis/services/package1/Service1

How exactly is this possible? Any commandline arguments to Java2WSDL or 
to WSDL2Java? Is this possible at all?

Thanks & Regards

Jan Kaiser




Patrick Cogan wrote:

>Hi,
>
>Not quite sure what you mean as namespaces are to do with the wsdl
>schema and the wsdl file itself.
>
>If I read you right the you need to change the ports in the service
>part of the wsdl to the number and give them whatever name you want
>and ultimately as  many operations (services) as you want under each
>port.
>
>Regards,
>
>Patrick.
>
>  
>
>>    
>>

Re: Configure webservice path in URL (Axis)

Posted by Patrick Cogan <pa...@gmail.com>.
Hi,

Not quite sure what you mean as namespaces are to do with the wsdl
schema and the wsdl file itself.

If I read you right the you need to change the ports in the service
part of the wsdl to the number and give them whatever name you want
and ultimately as  many operations (services) as you want under each
port.

Regards,

Patrick.


On Mon, 24 Jan 2005 16:58:10 +0100, Jan Kaiser
<ja...@is-teledata.com> wrote:
> Hi,
> 
> I would like to know how to setup a webservice with axis, which presents
> a different path than only /axis/services/ServiceName to the user.
> I'm working on a project which will provide some hundreds of services
> and I would like to group these services into namespaces (which are
> mapped with paths in the server).
> 
> E.g.:
> 
> namespace1.Service1 -> http://host:port/axis/services/namespace1/Service1
> namespace2.Servive1 -> http://host:port/axis/services/namespace2/Service1
> 
> How can I achive this?
> 
> Regards,
> 
> Jan Kaiser
>

Re: Configure webservice path in URL (Axis)

Posted by Abdullah Jibaly <am...@yahoo.com>.
Not sure if I understand your question, but why can't
you do something like this in web.xml:


<servlet-mapping>
  <servlet-name>AxisServlet</servlet-name>
  <url-pattern>/services/namespace1/*</url-pattern>
</servlet-mapping>

You already have this mapping, just add more according
to your requirements:

<servlet-mapping>
  <servlet-name>AxisServlet</servlet-name>
  <url-pattern>/services/*</url-pattern>
</servlet-mapping>

-Abdullah

--- Jan Kaiser <ja...@is-teledata.com> wrote:

> Hi,
> 
> I would like to know how to setup a webservice with
> axis, which presents 
> a different path than only
> /axis/services/ServiceName to the user.
> I'm working on a project which will provide some
> hundreds of services 
> and I would like to group these services into
> namespaces (which are 
> mapped with paths in the server).
> 
> E.g.:
> 
> namespace1.Service1 ->
> http://host:port/axis/services/namespace1/Service1
> namespace2.Servive1 ->
> http://host:port/axis/services/namespace2/Service1
> 
> How can I achive this?
> 
> 
> Regards,
> 
> Jan Kaiser
>