You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by john lee <sh...@yahoo.com> on 2010/06/16 23:22:18 UTC

struts 1.x webservice question

how can i implement webservice inside the struts 1.x application?
 
if i need to implement webservice server, which library need to download or use?
 
if i need to implment websrvice client only, which libary need to call ?
 
should i download apache AXIS as requirement ?
 
tks in advance
 
john


      

Re: struts 1.x webservice question

Posted by Paweł Wielgus <po...@gmail.com>.
Hi John,
i'm using axis as a client and server,
Works very well, it is configured as another servlet in web.xml,

  <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>
    <servlet-name>AdminServlet</servlet-name>
    <display-name>Axis Admin Servlet</display-name>
    <servlet-class>
        org.apache.axis.transport.http.AdminServlet
    </servlet-class>
    <load-on-startup>100</load-on-startup>
  </servlet>

  <servlet>
    <servlet-name>SOAPMonitorService</servlet-name>
    <display-name>SOAPMonitorService</display-name>
    <servlet-class>
        org.apache.axis.monitor.SOAPMonitorService
    </servlet-class>
    <init-param>
      <param-name>SOAPMonitorPort</param-name>
      <param-value>5001</param-value>
    </init-param>
    <load-on-startup>100</load-on-startup>
  </servlet>

and

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

  <servlet-mapping>
    <servlet-name>SOAPMonitorService</servlet-name>
    <url-pattern>/SOAPMonitor</url-pattern>
  </servlet-mapping>

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

we start it in our app like this in MainServlet class:

new File(getServletContext().getRealPath("") +
"/WEB-INF/server-config.wsdd").delete();
String deployFile = getServletContext().getRealPath("") +
getInitParameter("irqpaServiceDeployFile");
ServerInfo actualServerInfo =
ServerResolver.getActualServerInfo(IrqpaInterface.serverConfig.getAlias());
new WebServicesDeployThread(deployFile, actualServerInfo.getName(),
actualServerInfo.getPort(), "/services/IrqpaService").start();

server-config.wsdd is deleted each time the server is starting due to
some problem that were present when i was first configuring it, now
it's probably obsolete.

Best greetings,
Paweł Wielgus.



2010/6/16 john lee <sh...@yahoo.com>:
> how can i implement webservice inside the struts 1.x application?
>
> if i need to implement webservice server, which library need to download or use?
>
> if i need to implment websrvice client only, which libary need to call ?
>
> should i download apache AXIS as requirement ?
>
> tks in advance
>
> john
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org