Paul,
I understand why this exception occurs:
Exception in thread "HttpClientWorker-16" java.lang.NullPointerException
at
org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:156)
The tomcat server answers to synapse as if the request was:
http://localhost:8080/CalculatorWSApplication/
So it returns the html page of the webapp (CalculatorWSApplication) and not an
xml document with the soap answer.
Tomcat does not understand synapse request.
1) I tested the web service without using synapse and here is the request sent
by the client to tomcat:
POST /CalculatorWSApplication/CalculatorWS HTTP/1.1^M
SOAPAction: ""^M
Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *;
q=.2, */*; q=.2^M
Content-Type: text/xml;charset="utf-8"^M
User-Agent: JAX-WS RI 2.1.2-b05-RC1^M
Host: localhost:8080^M
Connection: keep-alive^M
Content-Length: 192^M
^M
<?xml version="1.0" ?><S:Envelope
xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:multiply
xmlns:ns2="http://calculator.me.org/"><i>30</i></ns2:multiply></S:Body></S:Envelope>
which is correct
2) I tested the client using synapse and here is the request sent by synapse
to tomcat:
POST http://localhost:8080/CalculatorWSApplication/ HTTP/1.1^M
Host: cannelle:8008^M
Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *;
q=.2, */*; q=.2^M
SOAPAction: http://calculator.me.org/CalculatorWS/multiplyRequest^M
Content-Type: text/xml; charset=utf-8^M
Transfer-Encoding: chunked^M
Connection: Keep-Alive^M
User-Agent: Synapse-HttpComponents-NIO^M
^M
c4^M
<?xml version='1.0' encoding='utf-8'?><S:Envelope
xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><multiply
xmlns="http://calculator.me.org/"><i>20</i></multiply></S:Body></S:Envelope>^M
0^M
^M
which is quite different, especially the POST URL
Sihem
---------------------------------
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail