axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sagara Gunathunga (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-4408) the problem of In-only method with throw exception
Date Wed, 14 Dec 2011 10:02:33 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-4408?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13169244#comment-13169244
] 

Sagara Gunathunga  commented on AXIS2-4408:
-------------------------------------------

It's not possible to reproduce the issue mentioned in the last comment.  
                
> 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:
> <service name="PrintService" scope ="application" >
> 	<Description>
> 		Please Type your service description here
> 	</Description>
> 	<messageReceivers>
> 		<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"
/>
> 		<messageReceiver  mep="http://www.w3.org/2004/08/wsdl/in-out"  class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
> 	</messageReceivers>
> 	
> 	<parameter name="ServiceClass" locked="false">soap.test.PrintService</parameter>
> 	
> 	 <!-- 
> 	<operation name="print">
>         <messageReceiver 
> 		class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
>     </operation>
>    
>     -->
> </service>
> 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, 
> <wsdl:input message="ns:printRequest" wsaw:Action="urn:print"/>
> <wsdl:fault message="ns:Exception" name="Exception" wsaw:Action="urn:printException"/>
> --->
> <wsdl:input message="ns:printRequest" wsaw:Action="urn:print"/>
> <wsdl:output message="ns:printResponse" wsaw:Action="urn:printResponse"/>
> <wsdl:fault message="ns:Exception" name="Exception" wsaw:Action="urn:printException"/>
> 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


Mime
View raw message