Webservices Axis

Le
bengalister
Salut,
je dois migrer des Webservices de Weblogic server 8.1 (utilisant le
framework des Web Services de Weblogic) vers Tomcat 5.5 avec Apache
Axis 1.3.
Les Web services ont t dvelopps en respectant les
spcifications JAX-RPC.
Ils sont de + faiblement typs car il ne prennent en gnral qu'un
seul paramtre sous la forme d'un String. Cependant, j'obtiens des
ClassCastException l'invocation et je sche. J'ai fait appel la
ml
d'Axis mais sans succs. Sinon, si vous connaissez d'autres outils
permettant de dployer des Webservices JAX-RPC sous Tomcat a
m'intresse.

Merci pour votre aide.


==
=
Le WSDL
==
=
<?xml version="1.0" encoding="UTF-8"?>
<definitions targetNamespace="urn:soap.snakeoil.com"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="urn:soap.snakeoil.com" xmlns:intf="urn:soap.snakeoil.com"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<message name="loginRequest">

<part name="loginData" type="xsd:string"/>

</message>

<message name="loginResponse">

<part name="loginReturn" type="xsd:string"/>

</message>

<portType name="LoginFacade">

<operation name="login" parameterOrder="loginData">

<input message="impl:loginRequest" name="loginRequest"/>

<output message="impl:loginResponse"
name="loginResponse"/>

</operation>

</portType>

<binding name="LoginFacadeSoapBinding" type="impl:LoginFacade">

<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>

<operation name="login">

<soap:operation soapAction=""/>

<input name="loginRequest">

<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:soap.snakeoil.com" use="encoded"/>

</input>

<output name="loginResponse">

<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:soap.snakeoil.com" use="encoded"/>

</output>

</operation>

</binding>

<service name="LoginFacadeService">

<port binding="impl:LoginFacadeSoapBinding"
name="LoginFacade">

<soap:address
location="http://localhost:8080/ws/PresentationWeb/LoginFacade"/>

</port>

</service>

</definitions>
==
=
La requte SOAP:
==
=
POST http://localhost:8080/ws/PresentationWeb/LoginFacade HTTP/1.0
Accept: */*
Accept-Language: fr
Referer:
http://localhost:8080/ws/Infrastructure/RTInfra/LTR/Framework/Buttons.htm
soapaction: ""
Content-Type: text/xml; charset=UTF-8
Pragma: no-cache
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.1.4322)
Host: localhost:8080
Content-Length: 1673
Proxy-Connection: Keep-Alive
Cookie: JSESSIONID=C0FEBB86788FA150BBF483C08E71F2FA

<?xml version='1.0' encoding='utf-8'?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="urn:soap.snakeoil.com" xmlns:intf="urn:soap.snakeoil.com"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header><SOAP-ENV:Header><StartHeader
xmlns='http://www.openuri.org/2002/04/soap/conversation/'><conversationID=
>40220086789952336812</conversationID></StartHeader></SOAP-ENV:Header></SOA=
P-ENV:Header>
<SOAP-ENV:Body>
<mswsb:login xmlns:mswsb="urn:soap.snakeoil.com" xmlns="">
<loginData
xsi:type="xsd:string">&lt;LoginData&gt;&lt;&lt;/LoginData&gt;</loginData>=
</mswsb:login></SOAP-ENV:Body>
</SOAP-ENV:Envelope>


==
=
La StackTrace:
==
=

faultDetail:

{http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException:
java.lang.String
at
org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java:7=
7)
at
org.apache.axis.encoding.DeserializationContext.startElement(Deserializatio=
nContext.java:1048)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(A=
bstractSAXParser.java:533)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartE=
lement(XMLNSDocumentScannerImpl.java:330)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentD=
ispatcher.scanRootElementHook(XMLNSDocumentScannerImpl.java:779)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$Frag=
mentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1794)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scan=
Document(XMLDocumentFragmentScannerImpl.java:368)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Co=
nfiguration.java:834)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Co=
nfiguration.java:764)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:1=
48)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Abstract=
SAXParser.java:1242)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContex=
t.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at
org.apache.axis.server.AxisServer.initSOAPConstants(AxisServer.java:345)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:279)
at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java=
:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio=
nFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC=
hain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j=
ava:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j=
ava:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12=
6)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10=
5)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav=
a:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConn=
ection(Http11Protocol.java:744)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.ja=
va:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerW=
orkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja=
va:684)
at java.lang.Thread.run(Thread.java:595)

{http://xml.apache.org/axis/}hostname:ldewavrin

java.lang.ClassCastException: java.lang.String
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:324)
at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java=
:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio=
nFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC=
hain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j=
ava:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j=
ava:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12=
6)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10=
5)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav=
a:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConn=
ection(Http11Protocol.java:744)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.ja=
va:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerW=
orkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja=
va:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassCastException: java.lang.String
at
org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java:7=
7)
at
org.apache.axis.encoding.DeserializationContext.startElement(Deserializatio=
nContext.java:1048)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(A=
bstractSAXParser.java:533)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartE=
lement(XMLNSDocumentScannerImpl.java:330)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentD=
ispatcher.scanRootElementHook(XMLNSDocumentScannerImpl.java:779)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$Frag=
mentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1794)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scan=
Document(XMLDocumentFragmentScannerImpl.java:368)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Co=
nfiguration.java:834)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Co=
nfiguration.java:764)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:1=
48)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Abstract=
SAXParser.java:1242)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContex=
t.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at
org.apache.axis.server.AxisServer.initSOAPConstants(AxisServer.java:345)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:279)
18 more
Vos réponses
Trier par : date / pertinence
Bruno Grieder
Le #203384
Bonjour,

Sur le fond, le problème principal vient de l'utilisation de webservices
de type RPC/encoded. Si tu as la possibilité de changer, transforme les
en document/literal. Le typage est plus fort - ce qui élimine bien des
problèmes - en particulier ceux de l'interopérabilité entre palte-formes.

Axis est un outil cum librairies pratiques mais qui a quelques étranges
caractéristiques. JBoss a d'ailleurs décidé de développer son propre
stack à la suite de nombreux problèmes.

Je te suggère d'utiliser:
1- si possible un serveur d'application plutôt que Tomcat pur et dur
pour la partie serveur. JBoss est un bon choix si le budget est une
contrainte. JBoss s'appuie sur Tomcat.
2- pour la génération des stubs clients (et éventuellement serveurs +
descripteurs xml), le JWSDP de Sun est moins facile à manier que Axis et
sa doc n'est pas fameuse mais il permet de respecter scrupuleusement les
standards dès que l'on force le respect de WS Basic Profile (WSI).

Bruno

wrote:
Salut,
je dois migrer des Webservices de Weblogic server 8.1 (utilisant le
framework des Web Services de Weblogic) vers Tomcat 5.5 avec Apache
Axis 1.3.
Les Web services ont été développés en respectant les
spécifications JAX-RPC.
Ils sont de + faiblement typés car il ne prennent en général qu'un
seul paramètre sous la forme d'un String. Cependant, j'obtiens des
ClassCastException à l'invocation et je sèche. J'ai fait appel à la
ml
d'Axis mais sans succès. Sinon, si vous connaissez d'autres outils
permettant de déployer des Webservices JAX-RPC sous Tomcat ça
m'intéresse.

Merci pour votre aide.


========================= > Le WSDL
========================= > <definitions targetNamespace="urn:soap.snakeoil.com"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="urn:soap.snakeoil.com" xmlns:intf="urn:soap.snakeoil.com"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<message name="loginRequest">

<part name="loginData" type="xsd:string"/>

</message>

<message name="loginResponse">

<part name="loginReturn" type="xsd:string"/>

</message>

<portType name="LoginFacade">

<operation name="login" parameterOrder="loginData">

<input message="impl:loginRequest" name="loginRequest"/>

<output message="impl:loginResponse"
name="loginResponse"/>

</operation>

</portType>

<binding name="LoginFacadeSoapBinding" type="impl:LoginFacade">

<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>

<operation name="login">

<soap:operation soapAction=""/>

<input name="loginRequest">

<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:soap.snakeoil.com" use="encoded"/>

</input>

<output name="loginResponse">

<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:soap.snakeoil.com" use="encoded"/>

</output>

</operation>

</binding>

<service name="LoginFacadeService">

<port binding="impl:LoginFacadeSoapBinding"
name="LoginFacade">

<soap:address
location="http://localhost:8080/ws/PresentationWeb/LoginFacade"/>

</port>

</service>

</definitions>
========================= > La requête SOAP:
========================= > POST http://localhost:8080/ws/PresentationWeb/LoginFacade HTTP/1.0
Accept: */*
Accept-Language: fr
Referer:
http://localhost:8080/ws/Infrastructure/RTInfra/LTR/Framework/Buttons.htm
soapaction: ""
Content-Type: text/xml; charset=UTF-8
Pragma: no-cache
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.1.4322)
Host: localhost:8080
Content-Length: 1673
Proxy-Connection: Keep-Alive
Cookie: JSESSIONIDÀFEBB86788FA150BBF483C08E71F2FA

<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="urn:soap.snakeoil.com" xmlns:intf="urn:soap.snakeoil.com"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header><SOAP-ENV:Header><StartHeader
xmlns='http://www.openuri.org/2002/04/soap/conversation/'><conversationID>40220086789952336812</conversationID></StartHeader></SOAP-ENV:Header></SOAP-ENV:Header>
<SOAP-ENV:Body>
<loginData
xsi:type="xsd:string">&lt;LoginData&gt;&lt;&lt;/LoginData&gt;</loginData></mswsb:login></SOAP-ENV:Body>
</SOAP-ENV:Envelope>


========================= > La StackTrace:
========================= >
faultDetail:

{http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException:
java.lang.String
at
org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java:77)
at
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:330)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(XMLNSDocumentScannerImpl.java:779)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1794)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at
org.apache.axis.server.AxisServer.initSOAPConstants(AxisServer.java:345)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:279)
at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)

{http://xml.apache.org/axis/}hostname:ldewavrin

java.lang.ClassCastException: java.lang.String
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:324)
at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassCastException: java.lang.String
at
org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java:77)
at
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:330)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(XMLNSDocumentScannerImpl.java:779)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1794)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at
org.apache.axis.server.AxisServer.initSOAPConstants(AxisServer.java:345)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:279)
... 18 more



Bengali
Le #203382
Bon en fait, mon WSDL n'était pas correct, donc cela ne pouvait
pas fonctionner avec Axis.

Je te suggère d'utiliser:
1- si possible un serveur d'application plutôt que Tomcat pur et dur
pour la partie serveur. JBoss est un bon choix si le budget est une
contrainte. JBoss s'appuie sur Tomcat.
J'envisageais également de déployer sous JBoss.


2- pour la génération des stubs clients (et éventuellement serveurs +
descripteurs xml), le JWSDP de Sun est moins facile à manier que Axis et
sa doc n'est pas fameuse mais il permet de respecter scrupuleusement les
standards dès que l'on force le respect de WS Basic Profile (WSI).
Suite à ta recommandation, j'ai effectivement investi un peu de temps

sur le JWSDP de Sun et cela a bien fonctionné. En fait j'ai même
pu déployer mon WS sous Tomcat brut (pas celui de Sun).
Je n'ai pas encore regardé comment rajouter des handlers, et changer
le format de message avec le fichier de configuration du service,
ce sera la 2ème étape.

Pour le client, je ne me suis pas cassé la tête, je n'ai rien généré
je suis passé par Spring qui génère des proxys dynamiques pour les WS
JAXRPC.

Merci.
Luc

Publicité
Poster une réponse
Anonyme