0

I have an application that was running on Tomcat and for some reasons, I have to migrate it on wildfly 9. The problem is that when I access web services it gives me an error of type :

09:29:03,305 DEBUG [org.apache.axis.ConfigurationException] (default task-1) Exception: : org.apache.axis.ConfigurationException: No service named ServiceGroupe is available
org.apache.axis.ConfigurationException: No service named ServiceGroupe is available
        at org.apache.axis.configuration.FileProvider.getService(FileProvider.java:233)
        at org.apache.axis.AxisEngine.getService(AxisEngine.java:311)
        at org.apache.axis.MessageContext.setTargetService(MessageContext.java:755)
        at org.apache.axis.client.Call.invoke(Call.java:2671)
        at org.apache.axis.client.Call.invoke(Call.java:2424)
        at org.apache.axis.client.Call.invoke(Call.java:2347)
        at org.apache.axis.client.Call.invoke(Call.java:1804)
        at com.wol.metier.ws.groupe.stub.ServiceGroupeSoapBindingStub.listeFlagsEnvironnement(Unknown Source)
        at com.wol.admin.bean.ReferencesBean.getLstFlagEnv(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at javax.el.BeanELResolver.getValue(BeanELResolver.java:241)
        at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:110)
        at com.sun.el.parser.AstValue.getValue(AstValue.java:115)
        at com.sun.el.parser.AstValue.getValue(AstValue.java:179)
        at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:202)
        at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:917)
        at org.apache.jsp.html.pages.accueil.choixFlagEnv_jsp._jspx_meth_c_005fforEach_005f0(choixFlagEnv_jsp.java:597)
        at org.apache.jsp.html.pages.accueil.choixFlagEnv_jsp._jspx_meth_html_005fselect_005f0(choixFlagEnv_jsp.java:565)
        at org.apache.jsp.html.pages.accueil.choixFlagEnv_jsp._jspx_meth_html_005fform_005f0(choixFlagEnv_jsp.java:272)
        at org.apache.jsp.html.pages.accueil.choixFlagEnv_jsp._jspService(choixFlagEnv_jsp.java:160)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
        at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
        at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
        at io.undertow.jsp.JspFileHandler.handleRequest(JspFileHandler.java:32)
        at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
        at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:274)
        at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToServlet(ServletInitialHandler.java:219)
        at io.undertow.servlet.spec.RequestDispatcherImpl.includeImpl(RequestDispatcherImpl.java:391)
        at io.undertow.servlet.spec.RequestDispatcherImpl.setupIncludeImpl(RequestDispatcherImpl.java:326)
        at io.undertow.servlet.spec.RequestDispatcherImpl.include(RequestDispatcherImpl.java:290)
        at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:907)
        at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:631)
        at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
        at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
        at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
        at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
        at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
        at org.apache.jsp.html.wolLayoutStandard.layout_jsp._jspx_meth_tiles_005finsert_005f1(layout_jsp.java:476)
        at org.apache.jsp.html.wolLayoutStandard.layout_jsp._jspService(layout_jsp.java:238)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)

So the client is unable to access the server web service, however, I have configured the server-config.wsdd :

<?xml version="1.0" encoding="UTF-8"?>
<deployment name="WOL" xmlns="http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
    xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
    xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance">

<service name="ServiceGroupe" provider="java:RPC">
        <namespace>http://soapinterop.org/</namespace>
        <parameter name="className"
            value="com.wol.metier.ws.services.ServiceGroupe" />
        <parameter name="allowedMethods"
            value="listeFlagsEnvironnement getFlagEnvironnement" />

        <operation name="listeFlagsEnvironnement" returnQName="return"
            returnType="tns:arrayOfString">
        </operation>

        <operation name="getFlagEnvironnement" returnQName="return"
            returnType="tns:string">
            <parameter name="codeGroupe" type="tns:int"
                xmlns:tns="http://www.w3.org/2001/XMLSchema" />
        </operation>

</service>

my web.xml :

<?xml version="1.0" encoding="ISO-8859-1"?>

<web-app xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

    <!-- === DISPLAY NAME ==================================================================================== -->
    <display-name>WsWolMetier</display-name>


    <!-- === LISTENER ======================================================================================== -->
    <listener>
        <listener-class>org.apache.axis.transport.http.AxisHTTPSessionListener</listener-class>
    </listener>


    <!-- === SERVLET ========================================================================================= -->
    <servlet>
        <servlet-name>AxisServlet</servlet-name>
        <servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>


    <!-- === SERVLET MAPPING ================================================================================= -->
    <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>


    <!-- === SESSION CONFUG ================================================================================== -->
    <session-config>
        <session-timeout>5</session-timeout>
    </session-config>


    <!-- === MIME MAPPING ==================================================================================== -->
    <mime-mapping>
        <extension>wsdl</extension>
        <mime-type>text/xml</mime-type>
    </mime-mapping>

    <mime-mapping>
        <extension>xsd</extension>
        <mime-type>text/xml</mime-type>
    </mime-mapping>


    <!-- === WELCOME FILE LIST =============================================================================== -->
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>


</web-app>

and the wsdl associated with the web service on client-side grp.metier.wsdl generated.

So at this moment, I assumed that the services were not started on the server side and actually, after launching the command to get the web service list on jboss-cli I get the following output :

[standalone@10.118.125.109:9990 /] /deployment="*"/subsystem=webservices/endpoint="*":read-resource
{
    "outcome" => "success",
    "result" => []
}

And when I start the wildly with the script standalone.sh, I don't see any init of the web service on the stack trace. However, when I go to "http://10.118.126.110:8080/wsWolMetier/servlet/AxisServlet" on the browser it lists me well the all of the web services present on my app. So my question is what am I missing to get my web services working on wildfly 9.

  • Is there any way to post a small bit of code for the service? You don't need Axis with Wildfly - [JAX-WS](https://docs.oracle.com/javaee/6/tutorial/doc/bnayl.html) is part of the JEE standard and by using Axis your configuration dramatically more complicated. Tomcat does not include JAX-WS so you did need it there. – stdunbar Aug 06 '19 at 21:03
  • What do you mean for "code for the service" ? I can give you a piece of code of the treatment done in the method associated but I'm not sure it will be usefull. So if I don't need Axis with Wildfly what is the solution to convert the code to not use Axis anymore ? – MaximusPrime Aug 08 '19 at 08:02

0 Answers0