Return-Path: X-Original-To: apmail-axis-java-dev-archive@www.apache.org Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E41199138 for ; Wed, 14 Dec 2011 12:36:01 +0000 (UTC) Received: (qmail 91636 invoked by uid 500); 14 Dec 2011 12:36:01 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 91432 invoked by uid 500); 14 Dec 2011 12:36:01 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 91424 invoked by uid 99); 14 Dec 2011 12:36:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Dec 2011 12:36:00 +0000 X-ASF-Spam-Status: No, hits=-2001.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Dec 2011 12:35:52 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id C67F0112CA4 for ; Wed, 14 Dec 2011 12:35:30 +0000 (UTC) Date: Wed, 14 Dec 2011 12:35:30 +0000 (UTC) From: "Vilnis Termanis (Commented) (JIRA)" To: java-dev@axis.apache.org Message-ID: <1206839759.10631.1323866130814.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (AXIS2-4408) the problem of In-only method with throw exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AXIS2-4408?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13169287#comment-13169287 ] Vilnis Termanis commented on AXIS2-4408: ---------------------------------------- Reproduced with Axis 1.6.1 1) Create POJO service with non-returning function which throws a custom exception, e.g.: public class ExampleService { public void update(String something) throws Fault {} } (Fault is very simply, just extends Exception.) 2) Include RPCInOnlyMessageReceiver & RPCMessageReceiver in tag. 3) Try to call function from client. RESULT: org.apache.axiom.om.OMException: localname can not be null or empty at org.apache.axiom.om.impl.llom.OMElementImpl.(OMElementImpl.java:133) at org.apache.axiom.om.impl.llom.OMElementImpl.(OMElementImpl.java:116) at org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory.createOMElement(OMLinkedListImplFactory.java:75) at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:142) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) 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.Http11AprProcessor.process(Http11AprProcessor.java:861) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584) at java.lang.Thread.run(Thread.java:662) Currently the only two ways to make it work are: 1) Make the function return something, e.g.: public boolean update(String something) throws Fault { } 2) Explicitly define update() as "InOnly" in services.xml: > the problem of In-only method with throw exception > -------------------------------------------------- > > Key: AXIS2-4408 > URL: https://issues.apache.org/jira/browse/AXIS2-4408 > Project: Axis2 > Issue Type: Bug > Components: wsdl > Affects Versions: 1.4.1 > Environment: jdk1.4 > Reporter: qilin > Priority: Blocker > Fix For: 1.6.0 > > Attachments: PiskvornikServerSOAP.wsdl, PiskvornikServerSOAPStub.java, PrintService.java, PrintService.xml, patch.txt, services.xml > > > 1.The Service Code: > public class PrintService { > public void print(String aMessage) throws Exception{ > System.out.println(aMessage); > } > } > 2.The Service.xml: > > > Please Type your service description here > > > > > > > soap.test.PrintService > > > > 3. generate clent code by wsdl2java and run test > I get the exception > java.lang.UnsupportedOperationException: An access occurred that is not valid. > at org.apache.axis2.description.InOnlyAxisOperation.getMessage(InOnlyAxisOperation.java:109) > at org.apache.axis2.util.MessageContextBuilder.createOutMessageContext(MessageContextBuilder.java:190) > at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:37) > at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100) > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176) > at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275) > at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:145) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) > at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:139) > at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) > at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2460) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133) > at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) > at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:119) > at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) > at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127) > at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) > at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:157) > at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) > at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) > at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) > at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) > at java.lang.Thread.run(Thread.java:534) > 4. remove the service.xml comment,the 'An access occurred that is not valid.' not Occurred > 5. get the new wdsl from web site,then generate clent code by wsdl2java and run same test > I get Exception > The input stream for an incoming message is null. > org.apache.axis2.AxisFault: The input stream for an incoming message is null. > at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:72) > at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:353) > at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416) > at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228) > at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) > if I do not re generate clent code ,the exception will not Occurred. > Finally , I fount that wsdl is different when I remove the comment, > > > ---> > > > > Then generate client code is changed : > __operation = new org.apache.axis2.description.RobustOutOnlyAxisOperation(); //right! > ---> > __operation = new org.apache.axis2.description.OutInAxisOperation(); //error! > By the way, if > public void print(String aMessage) throws Exception ---> public void print(String aMessage) > will have no problem! -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org