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 "Vilnis Termanis (Created) (JIRA)" <ji...@apache.org> on 2011/12/14 16:59:31 UTC

[jira] [Created] (AXIS2-5215) wsdl:fault tag missing for soap bindings in wsdl for In-Only POJO

wsdl:fault tag missing for soap bindings in wsdl for In-Only POJO
-----------------------------------------------------------------

                 Key: AXIS2-5215
                 URL: https://issues.apache.org/jira/browse/AXIS2-5215
             Project: Axis2
          Issue Type: Bug
          Components: adb
    Affects Versions: 1.6.1, 1.7.0
         Environment: Tomcat 6, JDK 1.6.0_26
            Reporter: Vilnis Termanis


Procedure:
1) Create POJO service with non-returning function which throws an exception, e.g.:
public class ExampleService { public void testFunction(String something) throws Exception { throw new Exception("testing123"); }}

Include RPCInOnlyMessageReceiver & RPCMessageReceiver in <messageReceivers> tag (services.xml)

2) Check runtime-generated wsdl (e.g. ../axis2/services/ExampleService?wsdl)

3) Call testFunction() from client (e.g. PHP's SoapClient) via soap binding

4) Explicitly define update() as "InOnly" in services.xml:
 <operation name="update"><messageReceiver class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" /></operation>

5) Repeat steps 2 & 3

Result:
2) <wsdl:fault> tag missing for both Soap (1.1 & 1.2) bindings (only appears for http)
3) Since wsdl doesn't contain fault tag for soap bindings, soap clients ignore the exception
5) <wsdl:fault> now appears for all bindings, as expected


--
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


[jira] [Updated] (AXIS2-5215) wsdl:fault tag missing for soap bindings in wsdl for In-Only POJO

Posted by "Vilnis Termanis (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vilnis Termanis updated AXIS2-5215:
-----------------------------------

    Description: 
Procedure:
1) Create POJO service with non-returning function which throws an exception, e.g.:
public class ExampleService { public void testFunction(String something) throws Exception { throw new Exception("testing123"); }}

Include RPCInOnlyMessageReceiver & RPCMessageReceiver in <messageReceivers> tag (services.xml)

2) Check runtime-generated wsdl (e.g. ../axis2/services/ExampleService?wsdl)

3) Call testFunction() from client (e.g. PHP's SoapClient) via soap binding

4) Explicitly define testFunction() as "InOnly" in services.xml:
 <operation name="testFunction"><messageReceiver class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" /></operation>

5) Repeat steps 2 & 3

Result:
2) <wsdl:fault> tag missing for both Soap (1.1 & 1.2) bindings (only appears for http)
3) Since wsdl doesn't contain fault tag for soap bindings, soap clients ignore the exception
5) <wsdl:fault> now appears for all bindings, as expected


  was:
Procedure:
1) Create POJO service with non-returning function which throws an exception, e.g.:
public class ExampleService { public void testFunction(String something) throws Exception { throw new Exception("testing123"); }}

Include RPCInOnlyMessageReceiver & RPCMessageReceiver in <messageReceivers> tag (services.xml)

2) Check runtime-generated wsdl (e.g. ../axis2/services/ExampleService?wsdl)

3) Call testFunction() from client (e.g. PHP's SoapClient) via soap binding

4) Explicitly define update() as "InOnly" in services.xml:
 <operation name="update"><messageReceiver class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" /></operation>

5) Repeat steps 2 & 3

Result:
2) <wsdl:fault> tag missing for both Soap (1.1 & 1.2) bindings (only appears for http)
3) Since wsdl doesn't contain fault tag for soap bindings, soap clients ignore the exception
5) <wsdl:fault> now appears for all bindings, as expected


    
> wsdl:fault tag missing for soap bindings in wsdl for In-Only POJO
> -----------------------------------------------------------------
>
>                 Key: AXIS2-5215
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5215
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.6.1, 1.7.0
>         Environment: Tomcat 6, JDK 1.6.0_26
>            Reporter: Vilnis Termanis
>              Labels: exception-handling, in-only, pojo
>
> Procedure:
> 1) Create POJO service with non-returning function which throws an exception, e.g.:
> public class ExampleService { public void testFunction(String something) throws Exception { throw new Exception("testing123"); }}
> Include RPCInOnlyMessageReceiver & RPCMessageReceiver in <messageReceivers> tag (services.xml)
> 2) Check runtime-generated wsdl (e.g. ../axis2/services/ExampleService?wsdl)
> 3) Call testFunction() from client (e.g. PHP's SoapClient) via soap binding
> 4) Explicitly define testFunction() as "InOnly" in services.xml:
>  <operation name="testFunction"><messageReceiver class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" /></operation>
> 5) Repeat steps 2 & 3
> Result:
> 2) <wsdl:fault> tag missing for both Soap (1.1 & 1.2) bindings (only appears for http)
> 3) Since wsdl doesn't contain fault tag for soap bindings, soap clients ignore the exception
> 5) <wsdl:fault> now appears for all bindings, as expected

--
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


[jira] [Commented] (AXIS2-5215) wsdl:fault tag missing for soap bindings in wsdl for In-Only POJO

Posted by "Sagara Gunathunga (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174192#comment-13174192 ] 

Sagara Gunathunga  commented on AXIS2-5215:
-------------------------------------------

This seems an issue with Axis2 default behavior of Java to WSDL transmission primitive mapping not with message Receivers.

First use of RPCInOnlyMessageReceiver (4) here is incorrect, AFAIK RPCInOnlyMessageReceiver not designed to handle responses properly hence RPCMessageReceiver is the correct option.  By default Axis2 found correct MessageReceiver for the given (1) (2) scenario.   

Expected behavior of given method is no response message if the processing is successful and fault message if an exception occur, WSDL 2. 0 robust-in-only MEP [1] clearly define this behaver. If you check WSDL 2.0  for same service you can see correct WSDL generated and possible to generate correct client side codes using a WSDL 2.0 processing tool ( e.g - Axis2 WSDL2JAVA with -wv 2.0 option).

Unfortunately it is not possible to describe above behavior using WSDL 1.1 , it defines 4 transport primitives [2] but non of them can describe above behavior well. Among these either one-way or request-response have to use with above Java method, currently Axis2 use one-way operation but run time behavior  is not complaint with  one-way pattern ( i.e - According to WS BP[3] it is incorrect to send any SOAP response neither empty SOAP envelope nor SOAP fault). Then only valid option is map above Java method as a request-response operation so that it will send empty message when success and fault message when exception occurs.

Until this get resolved it is possible to define explicitly RPCMessageReceiver in your services.xml file.  


[1] - http://www.w3.org/TR/wsdl20-adjuncts/#robust-in-only
[2] - http://www.w3.org/TR/wsdl#A4.1
[3] - http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html#One-Way_Operations
                
> wsdl:fault tag missing for soap bindings in wsdl for In-Only POJO
> -----------------------------------------------------------------
>
>                 Key: AXIS2-5215
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5215
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.6.1, 1.7.0
>         Environment: Tomcat 6, JDK 1.6.0_26
>            Reporter: Vilnis Termanis
>              Labels: exception-handling, in-only, pojo
>
> Procedure:
> 1) Create POJO service with non-returning function which throws an exception, e.g.:
> public class ExampleService { public void testFunction(String something) throws Exception { throw new Exception("testing123"); }}
> Include RPCInOnlyMessageReceiver & RPCMessageReceiver in <messageReceivers> tag (services.xml)
> 2) Check runtime-generated wsdl (e.g. ../axis2/services/ExampleService?wsdl)
> 3) Call testFunction() from client (e.g. PHP's SoapClient) via soap binding
> 4) Explicitly define testFunction() as "InOnly" in services.xml:
>  <operation name="testFunction"><messageReceiver class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" /></operation>
> 5) Repeat steps 2 & 3
> Result:
> 2) <wsdl:fault> tag missing for both Soap (1.1 & 1.2) bindings (only appears for http)
> 3) Since wsdl doesn't contain fault tag for soap bindings, soap clients ignore the exception
> 5) <wsdl:fault> now appears for all bindings, as expected

--
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


[jira] [Commented] (AXIS2-5215) wsdl:fault tag missing for soap bindings in wsdl for In-Only POJO

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221770#comment-13221770 ] 

Hudson commented on AXIS2-5215:
-------------------------------

Integrated in Axis2 #1281 (See [https://builds.apache.org/job/Axis2/1281/])
    Fixed AXIS2-5215. (Revision 1296159)

     Result = ABORTED
sagara : 
Files : 
* /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java

                
> wsdl:fault tag missing for soap bindings in wsdl for In-Only POJO
> -----------------------------------------------------------------
>
>                 Key: AXIS2-5215
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5215
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.6.1, 1.7.0
>         Environment: Tomcat 6, JDK 1.6.0_26
>            Reporter: Vilnis Termanis
>            Assignee: Sagara Gunathunga 
>              Labels: exception-handling, in-only, pojo
>             Fix For: 1.6.2, 1.7.0
>
>
> Procedure:
> 1) Create POJO service with non-returning function which throws an exception, e.g.:
> public class ExampleService { public void testFunction(String something) throws Exception { throw new Exception("testing123"); }}
> Include RPCInOnlyMessageReceiver & RPCMessageReceiver in <messageReceivers> tag (services.xml)
> 2) Check runtime-generated wsdl (e.g. ../axis2/services/ExampleService?wsdl)
> 3) Call testFunction() from client (e.g. PHP's SoapClient) via soap binding
> 4) Explicitly define testFunction() as "InOnly" in services.xml:
>  <operation name="testFunction"><messageReceiver class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" /></operation>
> 5) Repeat steps 2 & 3
> Result:
> 2) <wsdl:fault> tag missing for both Soap (1.1 & 1.2) bindings (only appears for http)
> 3) Since wsdl doesn't contain fault tag for soap bindings, soap clients ignore the exception
> 5) <wsdl:fault> now appears for all bindings, as expected

--
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


[jira] [Resolved] (AXIS2-5215) wsdl:fault tag missing for soap bindings in wsdl for In-Only POJO

Posted by "Sagara Gunathunga (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sagara Gunathunga  resolved AXIS2-5215.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.7.0
                   1.6.2

Fixed in r1296159.
                
> wsdl:fault tag missing for soap bindings in wsdl for In-Only POJO
> -----------------------------------------------------------------
>
>                 Key: AXIS2-5215
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5215
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.6.1, 1.7.0
>         Environment: Tomcat 6, JDK 1.6.0_26
>            Reporter: Vilnis Termanis
>            Assignee: Sagara Gunathunga 
>              Labels: exception-handling, in-only, pojo
>             Fix For: 1.6.2, 1.7.0
>
>
> Procedure:
> 1) Create POJO service with non-returning function which throws an exception, e.g.:
> public class ExampleService { public void testFunction(String something) throws Exception { throw new Exception("testing123"); }}
> Include RPCInOnlyMessageReceiver & RPCMessageReceiver in <messageReceivers> tag (services.xml)
> 2) Check runtime-generated wsdl (e.g. ../axis2/services/ExampleService?wsdl)
> 3) Call testFunction() from client (e.g. PHP's SoapClient) via soap binding
> 4) Explicitly define testFunction() as "InOnly" in services.xml:
>  <operation name="testFunction"><messageReceiver class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" /></operation>
> 5) Repeat steps 2 & 3
> Result:
> 2) <wsdl:fault> tag missing for both Soap (1.1 & 1.2) bindings (only appears for http)
> 3) Since wsdl doesn't contain fault tag for soap bindings, soap clients ignore the exception
> 5) <wsdl:fault> now appears for all bindings, as expected

--
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


[jira] [Commented] (AXIS2-5215) wsdl:fault tag missing for soap bindings in wsdl for In-Only POJO

Posted by "Sagara Gunathunga (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174626#comment-13174626 ] 

Sagara Gunathunga  commented on AXIS2-5215:
-------------------------------------------


yes having a non-void return type is a workaround for this.

Please don't close this issue as I mentioned there is a actual issue in WSDL generation that need to be fixed for next release. If a method with a void return type and throws clause by default it should map to request-response operation instead of in-only operation.   
                
> wsdl:fault tag missing for soap bindings in wsdl for In-Only POJO
> -----------------------------------------------------------------
>
>                 Key: AXIS2-5215
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5215
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.6.1, 1.7.0
>         Environment: Tomcat 6, JDK 1.6.0_26
>            Reporter: Vilnis Termanis
>              Labels: exception-handling, in-only, pojo
>
> Procedure:
> 1) Create POJO service with non-returning function which throws an exception, e.g.:
> public class ExampleService { public void testFunction(String something) throws Exception { throw new Exception("testing123"); }}
> Include RPCInOnlyMessageReceiver & RPCMessageReceiver in <messageReceivers> tag (services.xml)
> 2) Check runtime-generated wsdl (e.g. ../axis2/services/ExampleService?wsdl)
> 3) Call testFunction() from client (e.g. PHP's SoapClient) via soap binding
> 4) Explicitly define testFunction() as "InOnly" in services.xml:
>  <operation name="testFunction"><messageReceiver class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" /></operation>
> 5) Repeat steps 2 & 3
> Result:
> 2) <wsdl:fault> tag missing for both Soap (1.1 & 1.2) bindings (only appears for http)
> 3) Since wsdl doesn't contain fault tag for soap bindings, soap clients ignore the exception
> 5) <wsdl:fault> now appears for all bindings, as expected

--
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


[jira] [Assigned] (AXIS2-5215) wsdl:fault tag missing for soap bindings in wsdl for In-Only POJO

Posted by "Sagara Gunathunga (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sagara Gunathunga  reassigned AXIS2-5215:
-----------------------------------------

    Assignee: Sagara Gunathunga 
    
> wsdl:fault tag missing for soap bindings in wsdl for In-Only POJO
> -----------------------------------------------------------------
>
>                 Key: AXIS2-5215
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5215
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.6.1, 1.7.0
>         Environment: Tomcat 6, JDK 1.6.0_26
>            Reporter: Vilnis Termanis
>            Assignee: Sagara Gunathunga 
>              Labels: exception-handling, in-only, pojo
>
> Procedure:
> 1) Create POJO service with non-returning function which throws an exception, e.g.:
> public class ExampleService { public void testFunction(String something) throws Exception { throw new Exception("testing123"); }}
> Include RPCInOnlyMessageReceiver & RPCMessageReceiver in <messageReceivers> tag (services.xml)
> 2) Check runtime-generated wsdl (e.g. ../axis2/services/ExampleService?wsdl)
> 3) Call testFunction() from client (e.g. PHP's SoapClient) via soap binding
> 4) Explicitly define testFunction() as "InOnly" in services.xml:
>  <operation name="testFunction"><messageReceiver class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" /></operation>
> 5) Repeat steps 2 & 3
> Result:
> 2) <wsdl:fault> tag missing for both Soap (1.1 & 1.2) bindings (only appears for http)
> 3) Since wsdl doesn't contain fault tag for soap bindings, soap clients ignore the exception
> 5) <wsdl:fault> now appears for all bindings, as expected

--
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


[jira] [Commented] (AXIS2-5215) wsdl:fault tag missing for soap bindings in wsdl for In-Only POJO

Posted by "Vilnis Termanis (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174206#comment-13174206 ] 

Vilnis Termanis commented on AXIS2-5215:
----------------------------------------

Thank you for detailed explanation.

So if I understand correctly, if I have a client which only supports WSDL 1.1 my only (correct) option is to change the function from void to e.g. boolean and just have a simple "return true;"?

I don't quite understand the last sentence however. I thought it correctly picks up the functions as "InOut" rather than "InOnly" so I don't have to explicitly add RPCMessageReciver for individual functions?

Finally, given your analysis, should I close this issue?
                
> wsdl:fault tag missing for soap bindings in wsdl for In-Only POJO
> -----------------------------------------------------------------
>
>                 Key: AXIS2-5215
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5215
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.6.1, 1.7.0
>         Environment: Tomcat 6, JDK 1.6.0_26
>            Reporter: Vilnis Termanis
>              Labels: exception-handling, in-only, pojo
>
> Procedure:
> 1) Create POJO service with non-returning function which throws an exception, e.g.:
> public class ExampleService { public void testFunction(String something) throws Exception { throw new Exception("testing123"); }}
> Include RPCInOnlyMessageReceiver & RPCMessageReceiver in <messageReceivers> tag (services.xml)
> 2) Check runtime-generated wsdl (e.g. ../axis2/services/ExampleService?wsdl)
> 3) Call testFunction() from client (e.g. PHP's SoapClient) via soap binding
> 4) Explicitly define testFunction() as "InOnly" in services.xml:
>  <operation name="testFunction"><messageReceiver class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" /></operation>
> 5) Repeat steps 2 & 3
> Result:
> 2) <wsdl:fault> tag missing for both Soap (1.1 & 1.2) bindings (only appears for http)
> 3) Since wsdl doesn't contain fault tag for soap bindings, soap clients ignore the exception
> 5) <wsdl:fault> now appears for all bindings, as expected

--
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