You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Stadelmann Josef <jo...@axa-winterthur.ch> on 2012/03/28 12:41:14 UTC

[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
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(JAXWSMessageR
eceiver.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.process
URLRequest(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(Applica
tionFilterChain.java:290)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:233)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.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:2
98)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:85
2)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:588)
	at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.j
ava:396)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
r.java:886)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va:908)
	at java.lang.Thread.run(Thread.java:662)

What is wrong with my axis2-1.6.1 system?
Josef

AW: [axis2-1.6.1] error doing http: / / c036357:8080/axis2/services/JAXWSVersion/getVersion from browser

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
Truning on one more logger to show what happens before the crash comes !!!

The same is true for the java_first_jaxws example when called from the browser

But reading README does not tell you that !!!

Josef

 

29282 [catalina-exec-1] DEBUG org.apache.axis2.jaxws.server.JAXWSMessageReceiver  - new request received

29282 [catalina-exec-1] DEBUG org.apache.axis2.jaxws.server.JAXWSMessageReceiver  - MEP: http://www.w3.org/ns/wsdl/in-out

29874 [catalina-exec-1] DEBUG org.apache.axis2.jaxws.server.JAXWSMessageReceiver  - Detected a sync invocation.

29921 [catalina-exec-1] DEBUG org.apache.axis2.jaxws.server.endpoint.Utils  - Checking for matching binding types.

29921 [catalina-exec-1] DEBUG org.apache.axis2.jaxws.server.endpoint.Utils  -     message protocol: rest

29921 [catalina-exec-1] DEBUG org.apache.axis2.jaxws.server.endpoint.Utils  -         binding type: http://schemas.xmlsoap.org/wsdl/soap/http

30015 [catalina-exec-1] DEBUG org.apache.axis2.jaxws.server.JAXWSMessageReceiver  - No causedByException detected

30015 [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)

 

Von: Stadelmann Josef [mailto:josef.stadelmann@axa-winterthur.ch] 
Gesendet: Mittwoch, 28. März 2012 14:53
An: java-user@axis.apache.org
Betreff: AW: [axis2-1.6.1] error doing http: / / c036357:8080/axis2/services/JAXWSVersion/getVersion from browser

 

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.stadelmann@axa-winterthur.ch] 
Gesendet: Mittwoch, 28. März 2012 12:41
An: axis-user@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


AW: [axis2-1.6.1] error doing http: / / c036357:8080/axis2/services/JAXWSVersion/getVersion from browser

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
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.stadelmann@axa-winterthur.ch] 
Gesendet: Mittwoch, 28. März 2012 12:41
An: axis-user@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