as a newcomer to JAX-WS
I've built axis2-1.6.1/samples/jaxws-version using maven; you can't go wrong if the build does not failJ it creates me a target directory in which I can find jaxws-version-1.6.1.jar this file is then given to tomcat/webapps/axis2/servicejars directory where the JAXWSDeployer finds it and deploys it without any complains. JOK? While ?wsdl, ?wsdl2, ?policy and ?xsd operations all return proper data to the browser; when asked as http://C036357:8080/axis2/services/JAXWSVersion?wsdl http://C036357:8080/axis2/services/JAXWSVersion?wsdl2 http://C036357:8080/axis2/services/JAXWSVersion?xsd http://C036357:8080/axis2/services/JAXWSVersion?policy http://C036357:8080/axis2/services/JAXWSVersion/getVersion fails (as example) and results in <faultstring>Incoming message protocol does not match endpoint protocol.</faultstring> The fault message is created at org.apache.axis2.jaxws.server.endpoint.Utils.java in a routine called public static MessageContext createVersionMismatchMessage(MessageContext mc, Protocol protocol) as I invoke JAXWSVersion/getVersion from the browser, as I do with Version/getVersion as well, I am now very surprised that the "rest" protocol, which is what it is, when we call from the browser, is seen as a mismatch, resulting in the faultstring above. If the programmer of this nice routine would have added "rest" into the fault string, I would not have to seek as newby for a day by debugging unless I have to realize that axis2-1.6.1 does not support "rest" when deployed as jar file into servicejars directory. <faultstring>Incoming 'rest' message protocol does not match endpoint protocol.</faultstring> OR <faultstring>Incoming 'unknown' message protocol does not match endpoint protocol.</faultstring> As it stands, calling this Utility routine is the dead end for any "rest" protocol coming in to a soap1.1 or soap1.2 endpoint. (isn't it?) My question is, what do I have to do that this routine is not called when I run this example from a browser client? * The returned message will always be a SOAP 1.1 message per the specification. * * @param mc * @param msg * @return */ public static MessageContext createVersionMismatchMessage(MessageContext mc, Protocol protocol) { // Only if protocol is soap12 and MISmatches the endpoint do we halt processing if (protocol.equals(Protocol.soap12)) { String msg = "Incoming SOAP message protocol is version 1.2, but endpoint is configured for SOAP 1.1"; return Utils.createFaultMessage(mc, msg); } else if (protocol.equals(Protocol.soap11)) { // SOAP 1.1 message and SOAP 1.2 binding // The canSupport flag indicates that we can support this scenario. // Possible Examples of canSupport: JAXB impl binding, JAXB Provider // Possible Example of !canSupport: Application handler usage, non-JAXB Provider // Initially I vote to hard code this as false. boolean canSupport = false; if (canSupport) { // TODO: Okay, but we need to scrub the Message create code to make sure that the response message // is always built from the receiver protocol...not the binding protocol return null; } else { String msg = "Incoming SOAP message protocol is version 1.1, but endpoint is configured for SOAP 1.2. This is not supported."; return Utils.createFaultMessage(mc, msg); } } else { String msg = "Incoming message protocol does not match endpoint protocol."; return Utils.createFaultMessage(mc, msg); } } Josef Von: Stadelmann Josef [mailto:josef.stadelm...@axa-winterthur.ch] Gesendet: Mittwoch, 28. März 2012 12:41 An: axis-u...@ws.apache.org Betreff: [axis2-1.6.1] error doing http: / / c036357:8080/axis2/services/JAXWSVersion/getVersion from browser Running on Tomcat in Debuuger Mode on a Vista Platform using NB 7.1.1 with a debugger attached to Tomcats JVM Opend the axis2-1.6.1/samples/jaxws-version project pon and clean-build it. deployed the resulting jar into servicejars directory of axis2 running on tomcat, no deployment errors seen; Then using http://c036357:8080/axis2/services/JAXWSVersion/getVersion <http://c036357:8080/axis2/services/JAXWSVersion/getVersion> results in <faultstring>Incoming message protocol does not match endpoint protocol.</faultstring> in the browser and apache tomcat 6.0.26 shows 27236 [catalina-exec-1] DEBUG org.apache.axis2.jaxws.server.JAXWSMessageReceiver - new request received 27236 [catalina-exec-1] DEBUG org.apache.axis2.jaxws.server.JAXWSMessageReceiver - MEP: http://www.w3.org/ns/wsdl/in-out 28219 [catalina-exec-1] DEBUG org.apache.axis2.jaxws.server.JAXWSMessageReceiver - Detected a sync invocation. 28375 [catalina-exec-1] DEBUG org.apache.axis2.jaxws.server.JAXWSMessageReceiver - No causedByException detected 28391 [catalina-exec-1] ERROR org.apache.axis2.engine.AxisEngine - An error was detected during JAXWS processing org.apache.axis2.AxisFault: An error was detected during JAXWS processing at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:216) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:144) at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:139) at org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processURLRequest(AxisServlet.java:837) at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:273) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:396) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) What is wrong with my axis2-1.6.1 system? Josef