You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Charitha Kankanamge (JIRA)" <ji...@apache.org> on 2008/05/26 11:39:55 UTC
[jira] Created: (AXIS2-3817) JAXWS error occurs when invoking
java-first service in RESTful manner
JAXWS error occurs when invoking java-first service in RESTful manner
---------------------------------------------------------------------
Key: AXIS2-3817
URL: https://issues.apache.org/jira/browse/AXIS2-3817
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: jaxws
Affects Versions: 1.4
Environment: Axis2-1.4, jdk15, winxp
Reporter: Charitha Kankanamge
Priority: Critical
Following error is thrown when invoking a java-first jaxws based service in RESTful manner.
[ERROR] 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:187)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:136)
at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:130)
at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:257)
at org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
at java.lang.Thread.run(Thread.java:595)
Steps to reproduce:
================
1. Deploy the attached service on Axis2server
It includes the following jaxws annotated class
package org.test;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService
public class ExamplePOJOService {
@WebMethod
public String reverse(String input) {
StringBuffer buff = new StringBuffer();
for (int i=input.length()-1; i>=0; i--) {
buff.append(input.charAt(i));
}
return buff.toString();
}
}
2. Invoke the service in REStful manner
http://10.100.1.150:8080/axis2/services/ExamplePOJOServiceService.ExamplePOJOServicePort/reverse?input=hello
I copied jaxws-tools.jar and jaxws-rt.jar into Axis2/lib directory. However, I'm still getting the same error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-3817) JAXWS error occurs when invoking
java-first service in RESTful manner
Posted by "charlie zhang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602054#action_12602054 ]
charlie zhang commented on AXIS2-3817:
--------------------------------------
I have experienced the same problem with more details. The call stops at the following section of axis2 code:
org.apache.axis2.jaxws.server.endpoint.Utils.bindingTypesMatch() (line 82):
....
EndpointDescription ed = eds.iterator().next();
Protocol protocol = mc.getMessage().getProtocol();
String bindingType = ed.getBindingType();
....
if (protocol.equals(Protocol.soap11)) {
return (BindingUtils.isSOAP11Binding(bindingType));
} else if (protocol.equals(Protocol.soap12)) {
return (BindingUtils.isSOAP12Binding(bindingType));
} else if (protocol.equals(Protocol.rest)) {
return HTTPBinding.HTTP_BINDING.equalsIgnoreCase(bindingType); // ==== problem line
}
....
where HTTPBinding.HTTP_BINDING has the value of "http://www.w3.org/2004/08/wsdl/http", while the bindingType has the value of "http://schemas.xmlsoap.org/wsdl/soap/http" (defined in javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING).
The bindingType value is set when an annotated JAXWS POJO class is registered. Maybe a configuration change can affect the bindingType value.
> JAXWS error occurs when invoking java-first service in RESTful manner
> ---------------------------------------------------------------------
>
> Key: AXIS2-3817
> URL: https://issues.apache.org/jira/browse/AXIS2-3817
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: jaxws
> Affects Versions: 1.4
> Environment: Axis2-1.4, jdk15, winxp
> Reporter: Charitha Kankanamge
> Priority: Critical
> Attachments: ExamplePOJOService.jar
>
>
> Following error is thrown when invoking a java-first jaxws based service in RESTful manner.
> [ERROR] 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:187)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
> at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:136)
> at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:130)
> at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:257)
> at org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
> at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
> at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
> at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
> at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
> at java.lang.Thread.run(Thread.java:595)
> Steps to reproduce:
> ================
> 1. Deploy the attached service on Axis2server
> It includes the following jaxws annotated class
> package org.test;
> import javax.jws.WebMethod;
> import javax.jws.WebService;
> @WebService
> public class ExamplePOJOService {
> @WebMethod
> public String reverse(String input) {
> StringBuffer buff = new StringBuffer();
> for (int i=input.length()-1; i>=0; i--) {
> buff.append(input.charAt(i));
> }
> return buff.toString();
> }
> }
> 2. Invoke the service in REStful manner
> http://10.100.1.150:8080/axis2/services/ExamplePOJOServiceService.ExamplePOJOServicePort/reverse?input=hello
> I copied jaxws-tools.jar and jaxws-rt.jar into Axis2/lib directory. However, I'm still getting the same error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Updated: (AXIS2-3817) JAXWS error occurs when invoking
java-first service in RESTful manner
Posted by "Charitha Kankanamge (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Charitha Kankanamge updated AXIS2-3817:
---------------------------------------
Attachment: ExamplePOJOService.jar
Attached jaxws service jar
> JAXWS error occurs when invoking java-first service in RESTful manner
> ---------------------------------------------------------------------
>
> Key: AXIS2-3817
> URL: https://issues.apache.org/jira/browse/AXIS2-3817
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: jaxws
> Affects Versions: 1.4
> Environment: Axis2-1.4, jdk15, winxp
> Reporter: Charitha Kankanamge
> Priority: Critical
> Attachments: ExamplePOJOService.jar
>
>
> Following error is thrown when invoking a java-first jaxws based service in RESTful manner.
> [ERROR] 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:187)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
> at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:136)
> at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:130)
> at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:257)
> at org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
> at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
> at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
> at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
> at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
> at java.lang.Thread.run(Thread.java:595)
> Steps to reproduce:
> ================
> 1. Deploy the attached service on Axis2server
> It includes the following jaxws annotated class
> package org.test;
> import javax.jws.WebMethod;
> import javax.jws.WebService;
> @WebService
> public class ExamplePOJOService {
> @WebMethod
> public String reverse(String input) {
> StringBuffer buff = new StringBuffer();
> for (int i=input.length()-1; i>=0; i--) {
> buff.append(input.charAt(i));
> }
> return buff.toString();
> }
> }
> 2. Invoke the service in REStful manner
> http://10.100.1.150:8080/axis2/services/ExamplePOJOServiceService.ExamplePOJOServicePort/reverse?input=hello
> I copied jaxws-tools.jar and jaxws-rt.jar into Axis2/lib directory. However, I'm still getting the same error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-3817) JAXWS error occurs when invoking
java-first service in RESTful manner
Posted by "Charith Dhanushka Wickramarachchi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12682062#action_12682062 ]
Charith Dhanushka Wickramarachchi commented on AXIS2-3817:
----------------------------------------------------------
@Charitha
This is because the @BindingType(value= HTTPBinding.HTTP_BINDING) annotation is missing
I used following class and invoke the webservice as
http://localhost:8080/axis2/services/ExamplePojoServiceService.ExamplePojoServicePort/reverse?input=hello
this worked fine
"<dlwmin:reverseResponse>
<return>olleh</return>
</dlwmin:reverseResponse>
"
The webservice class
package sample.rest;
import javax.xml.ws.BindingType;
import javax.xml.ws.http.HTTPBinding;
import javax.jws.WebService;
import javax.jws.WebMethod;
@WebService
@BindingType(value= HTTPBinding.HTTP_BINDING)
public class ExamplePojoService {
@WebMethod
public String reverse(String input) {
StringBuffer buff = new StringBuffer();
for (int i=input.length()-1; i>=0; i--) {
buff.append(input.charAt(i));
}
return buff.toString();
}
}
thank you,
Charith
> JAXWS error occurs when invoking java-first service in RESTful manner
> ---------------------------------------------------------------------
>
> Key: AXIS2-3817
> URL: https://issues.apache.org/jira/browse/AXIS2-3817
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: jaxws
> Affects Versions: 1.4
> Environment: Axis2-1.4, jdk15, winxp
> Reporter: Charitha Kankanamge
> Priority: Critical
> Attachments: ExamplePOJOService.jar
>
>
> Following error is thrown when invoking a java-first jaxws based service in RESTful manner.
> [ERROR] 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:187)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
> at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:136)
> at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:130)
> at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:257)
> at org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
> at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
> at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
> at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
> at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
> at java.lang.Thread.run(Thread.java:595)
> Steps to reproduce:
> ================
> 1. Deploy the attached service on Axis2server
> It includes the following jaxws annotated class
> package org.test;
> import javax.jws.WebMethod;
> import javax.jws.WebService;
> @WebService
> public class ExamplePOJOService {
> @WebMethod
> public String reverse(String input) {
> StringBuffer buff = new StringBuffer();
> for (int i=input.length()-1; i>=0; i--) {
> buff.append(input.charAt(i));
> }
> return buff.toString();
> }
> }
> 2. Invoke the service in REStful manner
> http://10.100.1.150:8080/axis2/services/ExamplePOJOServiceService.ExamplePOJOServicePort/reverse?input=hello
> I copied jaxws-tools.jar and jaxws-rt.jar into Axis2/lib directory. However, I'm still getting the same error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (AXIS2-3817) JAXWS error occurs when invoking
java-first service in RESTful manner
Posted by "Isuru Eranga Suriarachchi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Isuru Eranga Suriarachchi reassigned AXIS2-3817:
------------------------------------------------
Assignee: Isuru Eranga Suriarachchi
> JAXWS error occurs when invoking java-first service in RESTful manner
> ---------------------------------------------------------------------
>
> Key: AXIS2-3817
> URL: https://issues.apache.org/jira/browse/AXIS2-3817
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: jaxws
> Affects Versions: 1.4
> Environment: Axis2-1.4, jdk15, winxp
> Reporter: Charitha Kankanamge
> Assignee: Isuru Eranga Suriarachchi
> Priority: Critical
> Attachments: ExamplePOJOService.jar
>
>
> Following error is thrown when invoking a java-first jaxws based service in RESTful manner.
> [ERROR] 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:187)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
> at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:136)
> at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:130)
> at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:257)
> at org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
> at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
> at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
> at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
> at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
> at java.lang.Thread.run(Thread.java:595)
> Steps to reproduce:
> ================
> 1. Deploy the attached service on Axis2server
> It includes the following jaxws annotated class
> package org.test;
> import javax.jws.WebMethod;
> import javax.jws.WebService;
> @WebService
> public class ExamplePOJOService {
> @WebMethod
> public String reverse(String input) {
> StringBuffer buff = new StringBuffer();
> for (int i=input.length()-1; i>=0; i--) {
> buff.append(input.charAt(i));
> }
> return buff.toString();
> }
> }
> 2. Invoke the service in REStful manner
> http://10.100.1.150:8080/axis2/services/ExamplePOJOServiceService.ExamplePOJOServicePort/reverse?input=hello
> I copied jaxws-tools.jar and jaxws-rt.jar into Axis2/lib directory. However, I'm still getting the same error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (AXIS2-3817) JAXWS error occurs when invoking
java-first service in RESTful manner
Posted by "Isuru Eranga Suriarachchi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Isuru Eranga Suriarachchi resolved AXIS2-3817.
----------------------------------------------
Resolution: Invalid
Hi Charitha,
As Charith has already pointed out, you have to set the @BindingType annotation to HTTP. Otherwise the default binding type is SOAP 11. It will only generate a SOAP 11 binding.
You can't invoke a service RESTfully, without an HTTP binding.
Thanks,
~Isuru
> JAXWS error occurs when invoking java-first service in RESTful manner
> ---------------------------------------------------------------------
>
> Key: AXIS2-3817
> URL: https://issues.apache.org/jira/browse/AXIS2-3817
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: jaxws
> Affects Versions: 1.4
> Environment: Axis2-1.4, jdk15, winxp
> Reporter: Charitha Kankanamge
> Assignee: Isuru Eranga Suriarachchi
> Priority: Critical
> Attachments: ExamplePOJOService.jar
>
>
> Following error is thrown when invoking a java-first jaxws based service in RESTful manner.
> [ERROR] 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:187)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
> at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:136)
> at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:130)
> at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:257)
> at org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
> at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
> at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
> at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
> at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
> at java.lang.Thread.run(Thread.java:595)
> Steps to reproduce:
> ================
> 1. Deploy the attached service on Axis2server
> It includes the following jaxws annotated class
> package org.test;
> import javax.jws.WebMethod;
> import javax.jws.WebService;
> @WebService
> public class ExamplePOJOService {
> @WebMethod
> public String reverse(String input) {
> StringBuffer buff = new StringBuffer();
> for (int i=input.length()-1; i>=0; i--) {
> buff.append(input.charAt(i));
> }
> return buff.toString();
> }
> }
> 2. Invoke the service in REStful manner
> http://10.100.1.150:8080/axis2/services/ExamplePOJOServiceService.ExamplePOJOServicePort/reverse?input=hello
> I copied jaxws-tools.jar and jaxws-rt.jar into Axis2/lib directory. However, I'm still getting the same error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.