axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grossberger, Guenter" <Guenter.Grossber...@softwareag.com>
Subject RE: how to change location of web service classes
Date Tue, 10 Jan 2006 15:47:25 GMT
Hi, again!

The url-pattern is relative to the web app. I presume your application is called "the-struts-application"
and resides in tomcat/webapps/the-struts-application. The url-pattern you wrote earlier  is
ok:
    <servlet>
        <servlet-name>AxisServlet</servlet-name>
        <display-name>Apache-Axis Servlet</display-name>
        <servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
    </servlet>

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

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


In your WSDL you have to specify the different location:
<WSDL:service name="MyService">
 <WSDL:port name="MyPort" binding="MyBinding">
  <SOAP:address location="http://myserver:8080/the-struts-application/services"/>
 </WSDL:port>
</WSDL:service>

>From this WSDL2Java should generate the correct ServiceLocator with: 
    // Use to get a proxy class for MyPort
    private java.lang.String MyPort_address = "http://myserver:8080/the-struts-application/services";

You can test the Axis installation by entering http://localhost:8080/WebRecherche/servlet/AxisServlet
in your Web browser. Tomcat routes the request to the Axis servlet based on the servlet mapping
you defined.

Bye,
Günter 


> -----Original Message-----
> From: Oliver Heinze [mailto:amc-clinixx@gmx.de] 
> Sent: Tuesday, January 10, 2006 3:41 PM
> To: axis-user@ws.apache.org
> Subject: Re: how to change location of web service classes
> 
> Ah ok, that's the point. Sorry for this silly question, but 
> I'm very new to 
> stuts and web services. So the configuration issue is a litle 
> bit confusing 
> me ;)
> How can I point the new location to the servlet in the web.xml ? Like:
> 
> <servlet-mapping>
>       <servlet-name>AxisServlet</servlet-name>
>       
> <url-pattern>/the-struts-application/WEB-INF/lib/axis.jar</url
> -pattern>
>     </servlet-mapping>
> 
> ??
> 
> Thank you.
> Oli
> 
> 
> ----- Original Message ----- 
> From: "Grossberger, Guenter" <Guenter.Grossberger@softwareag.com>
> To: <axis-user@ws.apache.org>
> Sent: Tuesday, January 10, 2006 3:14 PM
> Subject: RE: how to change location of web service classes
> 
> 
> Of course the location in the WSDL and in the code must be 
> changed from 
> http://server/axis/services/... to 
> http://server/the-struts-application/services/... or whatever 
> you wrote in 
> web.xml, too.
> 
> Bye,
> Günter
> 
> 
> > -----Original Message-----
> > From: Oliver Heinze [mailto:amc-clinixx@gmx.de]
> > Sent: Tuesday, January 10, 2006 2:53 PM
> > To: axis-user@ws.apache.org
> > Subject: Re: how to change location of web service classes
> >
> > Hi.
> > Me too, but it does not work. I think axis is missing the
> > 'axis' folder
> > which is given by default in the path.
> > Do you also changed something in servicelocator.class i.e.
> > the  endpoint, or
> > is it still the same?
> >
> > Cheers,
> > Oli
> > ----- Original Message ----- 
> > From: "Grossberger, Guenter" <Guenter.Grossberger@softwareag.com>
> > To: <axis-user@ws.apache.org>
> > Sent: Tuesday, January 10, 2006 2:22 PM
> > Subject: RE: how to change location of web service classes
> >
> >
> > Hi!
> >
> > I've got server-config.wsdd in the directory
> > webapps/the-struts-application/WEB-INF and it works. This is
> > also where Axis
> > puts it if you run the admin client.
> >
> > Best regards,
> > Günter
> >
> > > -----Original Message-----
> > > From: Oliver Heinze [mailto:amc-clinixx@gmx.de]
> > > Sent: Tuesday, January 10, 2006 1:38 PM
> > > To: axis-user@ws.apache.org
> > > Subject: Re: how to change location of web service classes
> > >
> > > OK. I copyed all files to the new location including all axis
> > > files and
> > > updated the web.xml. But when I call my service I get the
> > > following error:
> > >
> > > AxisFault
> > >  faultCode: {http://xml.apache.org/axis/}HTTP
> > >  faultSubcode:
> > >  faultString: (404)/axis/services/WSIntern
> > >
> > > In my opinion I also have to configure the axis servlet. How
> > > can I tell the
> > > axis servlet where to find the server-config.wsdd ? Because
> > > the default path
> > > webapps/axis/WEB-INF/ does no longer exist.
> > >
> > > The axis concerning part of my web.xml is the following:
> > >
> > > <servlet>
> > >       <servlet-name>AxisServlet</servlet-name>
> > >       <display-name>Apache-Axis Servlet</display-name>
> > >       <servlet-class>
> > >           org.apache.axis.transport.http.AxisServlet
> > >       </servlet-class>
> > >     </servlet>
> > >
> > > servlet-mapping>
> > >         <servlet-name>AxisServlet</servlet-name>
> > >         <url-pattern>/servlet/AxisServlet</url-pattern>
> > >       </servlet-mapping>
> > >
> > >       <servlet-mapping>
> > >         <servlet-name>AxisServlet</servlet-name>
> > >         <url-pattern>/services/*</url-pattern>
> > >       </servlet-mapping>
> > >
> > > Thanks for your help.
> > >
> > > Cheers,
> > > Oli
> > >
> > > ----- Original Message ----- 
> > > From: "Grossberger, Guenter" <Guenter.Grossberger@softwareag.com>
> > > To: <axis-user@ws.apache.org>
> > > Sent: Tuesday, January 10, 2006 11:28 AM
> > > Subject: RE: how to change location of web service classes
> > >
> > >
> > > Hi!
> > >
> > > I'd move all the Axis files (including all jars) to the 
> new location
> > > /the-struts-application/WEB_INF/. Then you would have to
> > > change your web.xml
> > > to direct the Web Service calls to the Axis servlet instead
> > > of your struts
> > > servlet(s) based on the URL. I.e. copy the <servlet> and
> > > <servlet-mappings>
> > > from the Axis web.xml to your application.
> > >
> > >
> > > Best regards,
> > >
> > > --
> > > Günter Grossberger
> > > Consultant             Tel: +43 1 329 50 161
> > > Software AG Austria    Fax: +43 1 329 50 171
> > > Guglgasse 7-9          GSM: +43 676 833 29 261
> > > 1030 Wien              http://www.softwareag.com/austria
> > >
> > >
> > > > -----Original Message-----
> > > > From: AMC Clinixx Test Account [mailto:amc-clinixx@gmx.de]
> > > > Sent: Tuesday, January 10, 2006 11:15 AM
> > > > To: axis-user@ws.apache.org
> > > > Subject: how to change location of web service classes
> > > >
> > > > Hi all.
> > > >
> > > > I installed axis into tomcats webapps folder and created my
> > > > web services in
> > > > tomcat/webapps/axis/WEB_INF/classes. Everything works fine.
> > > > But now I want
> > > > to integrate my web service classes into an existing struts
> > > > application for
> > > > using same property files and so on.
> > > > In different words: I want to have my classes in
> > > > /the-struts-application/WEB_INF/classes/ instead of
> > > > tomcat/webapps/axis/WEB_INF/classes.
> > > >
> > > > How can I tell the axis servlet to look for the classes in
> > > > the new location?
> > > > Which files I have to change? Do I have to generate a new
> > > > context inside the
> > > > server.xml of tomact?
> > > >
> > > > Please help me. Some hints would be nice. Thanks.
> > > >
> > > > Cheers,
> > > > Oli
> > > >
> > > >
> > >
> > >
> >
> >
> 
> 

Mime
View raw message