http://localhost:8080/axis2/services/MonService?wsdl : erreur
Bonjour
Lorsque j'essaie d'afficher la WSDL de mon webservice avec l'URL
http://localhost:8080/axis2/services/MonService?wsdl
J'ai des erreurs AbstractMethodError de xerces.dom.DocumentImpl.getXmlStandalone()Z
La classe est un Bean instancié avec Spring.
L'URL du bean qui permet l'instanciation donne bien une WSDL :
http://localhost:8080/axis2/services...pringInit?wsdl
Environnement :
Windows 7 x64
Eclipse EE Juno (4.2)
Axis2 1.6.2
Maven 3.0.5 : même problème avec ou sans xerces 2.4.0 dans le pom.xml
erreurs lors de l'invocation de l'URL http://localhost:8080/axis2/services/MonService?wsdl
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
org.apache.axis2.dataretrieval.DataRetrievalException: org.apache.xerces.dom.DocumentImpl.getXmlStandalone()Z
org.apache.axis2.dataretrieval.AxisDataLocatorImpl.getData(AxisDataLocatorImpl.java:85)
org.apache.axis2.description.AxisService.getData(AxisService.java:2964)
org.apache.axis2.description.AxisService.getWSDL(AxisService.java:1645)
org.apache.axis2.description.AxisService.printWSDL(AxisService.java:1413)
org.apache.axis2.transport.http.ListingAgent.handleWSDLRequest(ListingAgent.java:327)
org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:183)
org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
cause mère
java.lang.AbstractMethodError: org.apache.xerces.dom.DocumentImpl.getXmlStandalone()Z
com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.setDocumentInfo(DOM2TO.java:373)
com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:127)
com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:94)
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:661)
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:707)
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
org.apache.ws.commons.schema.XmlSchema.serialize_internal(XmlSchema.java:533)
org.apache.ws.commons.schema.XmlSchema.write(XmlSchema.java:473)
org.apache.axis2.description.AxisService2WSDL11.generateOM(AxisService2WSDL11.java:215)
org.apache.axis2.dataretrieval.WSDLDataLocator.outputInlineForm(WSDLDataLocator.java:131)
org.apache.axis2.dataretrieval.WSDLDataLocator.getData(WSDLDataLocator.java:73)
org.apache.axis2.dataretrieval.AxisDataLocatorImpl.getData(AxisDataLocatorImpl.java:81)
org.apache.axis2.description.AxisService.getData(AxisService.java:2964)
org.apache.axis2.description.AxisService.getWSDL(AxisService.java:1645)
org.apache.axis2.description.AxisService.printWSDL(AxisService.java:1413)
org.apache.axis2.transport.http.ListingAgent.handleWSDLRequest(ListingAgent.java:327)
org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:183)
org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717) |
La classe que j'aimerais appeler par webservice
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| public class MonService
{
@Inject
private IMonActionService monActionService;
public IMonActionService getMonActionService() {
return monActionService;
}
public void setMonActionService(IMonActionService monActionService) {
this.monActionService = monActionService;
}
public MaClasseMetier[] dossiers(Date date_min, Date date_max)
{
MonAction[] resp = {};
try {
List<MaClasseMetier> response = monActionService.findByDate(date_min, date_max);
return response.toArray(resp);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
} |
Le fichier services.xml
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| <serviceGroup>
<service name="MonServiceSpringInit" class="com.toto.MonServiceSpringInit">
<description>
This web service initializes Spring.
</description>
<parameter name="ServiceClass" >com.toto.MonServiceSpringInit</parameter>
<parameter name="ServiceTCCL" >composite</parameter>
<parameter name="load-on-startup" >true</parameter>
</service>
<service name="MonService" class="com.toto.MonService">
<description>
Weather Spring POJO Axis2 AAR deployment
</description>
<parameter name="ServiceClass" >com.toto.MonService</parameter>
<parameter name="ServiceObjectSupplier">org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier</parameter>
<excludeOperations>
<operation>setMonActionService</operation>
<operation>getMonActionService</operation>
</excludeOperations>
<parameter name="SpringBeanName" >monService</parameter>
<parameter name="SpringContextLocation">WEB-INF/spring-app-context.xml</parameter>
<messageReceivers>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</messageReceivers>
</service>
</serviceGroup> |
Le fichier web.xml est celui généré par le wizard Eclipse ("New Webservice")
Quelqu'un peut-il me dire d'où viennent mes exceptions, et comment y remédier ?
Toute aide sera la bienvenue !