You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Jesse Pangburn (JIRA)" <ji...@apache.org> on 2011/08/18 01:48:27 UTC

[jira] [Created] (CXF-3747) Dispatch client fails to set WS-Addressing Action header when WSDL's soap:operation does not have a style attribute

Dispatch client fails to set WS-Addressing Action header when WSDL's soap:operation does not have a style attribute
-------------------------------------------------------------------------------------------------------------------

                 Key: CXF-3747
                 URL: https://issues.apache.org/jira/browse/CXF-3747
             Project: CXF
          Issue Type: Bug
          Components: JAX-WS Runtime
    Affects Versions: 2.4.1
            Reporter: Jesse Pangburn
            Priority: Minor


I found the cause of the problem to be a bug in this method in CXF (I have version 2.4.1):
    private Map<String, QName> createPayloadEleOpNameMap(BindingInfo bindingInfo) {
        Map<String, QName> payloadElementMap = new java.util.HashMap<String, QName>();
        for (BindingOperationInfo bop : bindingInfo.getOperations()) {
            SoapOperationInfo soi = (SoapOperationInfo)bop.getExtensor(SoapOperationInfo.class);
            if (soi != null) {
                if ("document".equals(soi.getStyle())) {
                    // if doc
                    if (bop.getOperationInfo().getInput() != null
                        && !bop.getOperationInfo().getInput().getMessageParts().isEmpty()) {
                        QName qn = bop.getOperationInfo().getInput().getMessagePartByIndex(0)
                            .getElementQName();
                        payloadElementMap.put(qn.toString(), bop.getOperationInfo().getName());
                    }
                } else if ("rpc".equals(soi.getStyle())) {
                    // if rpc
                    payloadElementMap.put(bop.getOperationInfo().getName().toString(), bop.getOperationInfo()
                        .getName());
                }
            }
        }
        return payloadElementMap;
    }

The problem is that it requires the SoapOperationInfo to have a style attribute, but in the W3C spec for WSDL it says the style attribute on the soap operation is optional, specifically 'If the attribute is not specified, it defaults to the value specified in the soap:binding element. If the soap:binding element does not specify a style, it is assumed to be "document".'  So the code needs to check if the soi has a style and if not read it from the binding and if not then set it as "document". This is not a problem in the WSDLs generated by CXF (as I found out with a HelloWorld test) because it creates these optional style attributes, but since W3C says people can generate WSDLs without these (and I ran into one) I think it's worth fixing.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-3747) Dispatch client fails to set WS-Addressing Action header when WSDL's soap:operation does not have a style attribute

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp updated CXF-3747:
-----------------------------

    Fix Version/s: 2.3.7

> Dispatch client fails to set WS-Addressing Action header when WSDL's soap:operation does not have a style attribute
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-3747
>                 URL: https://issues.apache.org/jira/browse/CXF-3747
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.4.1
>            Reporter: Jesse Pangburn
>            Assignee: Daniel Kulp
>            Priority: Minor
>              Labels: dispatch, ws-addressing
>             Fix For: 2.3.7, 2.4.3
>
>         Attachments: patch3747.txt, patch3747and3748.txt
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I found the cause of the problem to be a bug in this method in CXF (I have version 2.4.1):
>     private Map<String, QName> createPayloadEleOpNameMap(BindingInfo bindingInfo) {
>         Map<String, QName> payloadElementMap = new java.util.HashMap<String, QName>();
>         for (BindingOperationInfo bop : bindingInfo.getOperations()) {
>             SoapOperationInfo soi = (SoapOperationInfo)bop.getExtensor(SoapOperationInfo.class);
>             if (soi != null) {
>                 if ("document".equals(soi.getStyle())) {
>                     // if doc
>                     if (bop.getOperationInfo().getInput() != null
>                         && !bop.getOperationInfo().getInput().getMessageParts().isEmpty()) {
>                         QName qn = bop.getOperationInfo().getInput().getMessagePartByIndex(0)
>                             .getElementQName();
>                         payloadElementMap.put(qn.toString(), bop.getOperationInfo().getName());
>                     }
>                 } else if ("rpc".equals(soi.getStyle())) {
>                     // if rpc
>                     payloadElementMap.put(bop.getOperationInfo().getName().toString(), bop.getOperationInfo()
>                         .getName());
>                 }
>             }
>         }
>         return payloadElementMap;
>     }
> The problem is that it requires the SoapOperationInfo to have a style attribute, but in the W3C spec for WSDL it says the style attribute on the soap operation is optional, specifically 'If the attribute is not specified, it defaults to the value specified in the soap:binding element. If the soap:binding element does not specify a style, it is assumed to be "document".'  So the code needs to check if the soi has a style and if not read it from the binding and if not then set it as "document". This is not a problem in the WSDLs generated by CXF (as I found out with a HelloWorld test) because it creates these optional style attributes, but since W3C says people can generate WSDLs without these (and I ran into one) I think it's worth fixing.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CXF-3747) Dispatch client fails to set WS-Addressing Action header when WSDL's soap:operation does not have a style attribute

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp reassigned CXF-3747:
--------------------------------

    Assignee: Daniel Kulp

> Dispatch client fails to set WS-Addressing Action header when WSDL's soap:operation does not have a style attribute
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-3747
>                 URL: https://issues.apache.org/jira/browse/CXF-3747
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.4.1
>            Reporter: Jesse Pangburn
>            Assignee: Daniel Kulp
>            Priority: Minor
>              Labels: dispatch, ws-addressing
>         Attachments: patch3747.txt, patch3747and3748.txt
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I found the cause of the problem to be a bug in this method in CXF (I have version 2.4.1):
>     private Map<String, QName> createPayloadEleOpNameMap(BindingInfo bindingInfo) {
>         Map<String, QName> payloadElementMap = new java.util.HashMap<String, QName>();
>         for (BindingOperationInfo bop : bindingInfo.getOperations()) {
>             SoapOperationInfo soi = (SoapOperationInfo)bop.getExtensor(SoapOperationInfo.class);
>             if (soi != null) {
>                 if ("document".equals(soi.getStyle())) {
>                     // if doc
>                     if (bop.getOperationInfo().getInput() != null
>                         && !bop.getOperationInfo().getInput().getMessageParts().isEmpty()) {
>                         QName qn = bop.getOperationInfo().getInput().getMessagePartByIndex(0)
>                             .getElementQName();
>                         payloadElementMap.put(qn.toString(), bop.getOperationInfo().getName());
>                     }
>                 } else if ("rpc".equals(soi.getStyle())) {
>                     // if rpc
>                     payloadElementMap.put(bop.getOperationInfo().getName().toString(), bop.getOperationInfo()
>                         .getName());
>                 }
>             }
>         }
>         return payloadElementMap;
>     }
> The problem is that it requires the SoapOperationInfo to have a style attribute, but in the W3C spec for WSDL it says the style attribute on the soap operation is optional, specifically 'If the attribute is not specified, it defaults to the value specified in the soap:binding element. If the soap:binding element does not specify a style, it is assumed to be "document".'  So the code needs to check if the soi has a style and if not read it from the binding and if not then set it as "document". This is not a problem in the WSDLs generated by CXF (as I found out with a HelloWorld test) because it creates these optional style attributes, but since W3C says people can generate WSDLs without these (and I ran into one) I think it's worth fixing.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-3747) Dispatch client fails to set WS-Addressing Action header when WSDL's soap:operation does not have a style attribute

Posted by "Jesse Pangburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesse Pangburn updated CXF-3747:
--------------------------------

    Attachment: patch3747and3748.txt
                patch3747.txt

Two patches are attached.  patch3747.txt fixes just this bug. patch3747and3748.txt fixes this bug and 3748 together since they're both in the same file and I am editing on the same revision.

> Dispatch client fails to set WS-Addressing Action header when WSDL's soap:operation does not have a style attribute
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-3747
>                 URL: https://issues.apache.org/jira/browse/CXF-3747
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.4.1
>            Reporter: Jesse Pangburn
>            Priority: Minor
>              Labels: dispatch, ws-addressing
>         Attachments: patch3747.txt, patch3747and3748.txt
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I found the cause of the problem to be a bug in this method in CXF (I have version 2.4.1):
>     private Map<String, QName> createPayloadEleOpNameMap(BindingInfo bindingInfo) {
>         Map<String, QName> payloadElementMap = new java.util.HashMap<String, QName>();
>         for (BindingOperationInfo bop : bindingInfo.getOperations()) {
>             SoapOperationInfo soi = (SoapOperationInfo)bop.getExtensor(SoapOperationInfo.class);
>             if (soi != null) {
>                 if ("document".equals(soi.getStyle())) {
>                     // if doc
>                     if (bop.getOperationInfo().getInput() != null
>                         && !bop.getOperationInfo().getInput().getMessageParts().isEmpty()) {
>                         QName qn = bop.getOperationInfo().getInput().getMessagePartByIndex(0)
>                             .getElementQName();
>                         payloadElementMap.put(qn.toString(), bop.getOperationInfo().getName());
>                     }
>                 } else if ("rpc".equals(soi.getStyle())) {
>                     // if rpc
>                     payloadElementMap.put(bop.getOperationInfo().getName().toString(), bop.getOperationInfo()
>                         .getName());
>                 }
>             }
>         }
>         return payloadElementMap;
>     }
> The problem is that it requires the SoapOperationInfo to have a style attribute, but in the W3C spec for WSDL it says the style attribute on the soap operation is optional, specifically 'If the attribute is not specified, it defaults to the value specified in the soap:binding element. If the soap:binding element does not specify a style, it is assumed to be "document".'  So the code needs to check if the soi has a style and if not read it from the binding and if not then set it as "document". This is not a problem in the WSDLs generated by CXF (as I found out with a HelloWorld test) because it creates these optional style attributes, but since W3C says people can generate WSDLs without these (and I ran into one) I think it's worth fixing.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CXF-3747) Dispatch client fails to set WS-Addressing Action header when WSDL's soap:operation does not have a style attribute

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-3747.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.4.3

> Dispatch client fails to set WS-Addressing Action header when WSDL's soap:operation does not have a style attribute
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-3747
>                 URL: https://issues.apache.org/jira/browse/CXF-3747
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.4.1
>            Reporter: Jesse Pangburn
>            Assignee: Daniel Kulp
>            Priority: Minor
>              Labels: dispatch, ws-addressing
>             Fix For: 2.4.3
>
>         Attachments: patch3747.txt, patch3747and3748.txt
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I found the cause of the problem to be a bug in this method in CXF (I have version 2.4.1):
>     private Map<String, QName> createPayloadEleOpNameMap(BindingInfo bindingInfo) {
>         Map<String, QName> payloadElementMap = new java.util.HashMap<String, QName>();
>         for (BindingOperationInfo bop : bindingInfo.getOperations()) {
>             SoapOperationInfo soi = (SoapOperationInfo)bop.getExtensor(SoapOperationInfo.class);
>             if (soi != null) {
>                 if ("document".equals(soi.getStyle())) {
>                     // if doc
>                     if (bop.getOperationInfo().getInput() != null
>                         && !bop.getOperationInfo().getInput().getMessageParts().isEmpty()) {
>                         QName qn = bop.getOperationInfo().getInput().getMessagePartByIndex(0)
>                             .getElementQName();
>                         payloadElementMap.put(qn.toString(), bop.getOperationInfo().getName());
>                     }
>                 } else if ("rpc".equals(soi.getStyle())) {
>                     // if rpc
>                     payloadElementMap.put(bop.getOperationInfo().getName().toString(), bop.getOperationInfo()
>                         .getName());
>                 }
>             }
>         }
>         return payloadElementMap;
>     }
> The problem is that it requires the SoapOperationInfo to have a style attribute, but in the W3C spec for WSDL it says the style attribute on the soap operation is optional, specifically 'If the attribute is not specified, it defaults to the value specified in the soap:binding element. If the soap:binding element does not specify a style, it is assumed to be "document".'  So the code needs to check if the soi has a style and if not read it from the binding and if not then set it as "document". This is not a problem in the WSDLs generated by CXF (as I found out with a HelloWorld test) because it creates these optional style attributes, but since W3C says people can generate WSDLs without these (and I ran into one) I think it's worth fixing.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (CXF-3747) Dispatch client fails to set WS-Addressing Action header when WSDL's soap:operation does not have a style attribute

Posted by "Jesse Pangburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesse Pangburn closed CXF-3747.
-------------------------------


Verified by downloading latest version of affected file(s) from SVN on the 2.4.x fixes branch, building CXF 2.4.2 with the fixed file(s) and testing this defect

> Dispatch client fails to set WS-Addressing Action header when WSDL's soap:operation does not have a style attribute
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-3747
>                 URL: https://issues.apache.org/jira/browse/CXF-3747
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.4.1
>            Reporter: Jesse Pangburn
>            Assignee: Daniel Kulp
>            Priority: Minor
>              Labels: dispatch, ws-addressing
>             Fix For: 2.3.7, 2.4.3
>
>         Attachments: patch3747.txt, patch3747and3748.txt
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I found the cause of the problem to be a bug in this method in CXF (I have version 2.4.1):
>     private Map<String, QName> createPayloadEleOpNameMap(BindingInfo bindingInfo) {
>         Map<String, QName> payloadElementMap = new java.util.HashMap<String, QName>();
>         for (BindingOperationInfo bop : bindingInfo.getOperations()) {
>             SoapOperationInfo soi = (SoapOperationInfo)bop.getExtensor(SoapOperationInfo.class);
>             if (soi != null) {
>                 if ("document".equals(soi.getStyle())) {
>                     // if doc
>                     if (bop.getOperationInfo().getInput() != null
>                         && !bop.getOperationInfo().getInput().getMessageParts().isEmpty()) {
>                         QName qn = bop.getOperationInfo().getInput().getMessagePartByIndex(0)
>                             .getElementQName();
>                         payloadElementMap.put(qn.toString(), bop.getOperationInfo().getName());
>                     }
>                 } else if ("rpc".equals(soi.getStyle())) {
>                     // if rpc
>                     payloadElementMap.put(bop.getOperationInfo().getName().toString(), bop.getOperationInfo()
>                         .getName());
>                 }
>             }
>         }
>         return payloadElementMap;
>     }
> The problem is that it requires the SoapOperationInfo to have a style attribute, but in the W3C spec for WSDL it says the style attribute on the soap operation is optional, specifically 'If the attribute is not specified, it defaults to the value specified in the soap:binding element. If the soap:binding element does not specify a style, it is assumed to be "document".'  So the code needs to check if the soi has a style and if not read it from the binding and if not then set it as "document". This is not a problem in the WSDLs generated by CXF (as I found out with a HelloWorld test) because it creates these optional style attributes, but since W3C says people can generate WSDLs without these (and I ran into one) I think it's worth fixing.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira