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

[jira] [Assigned] (CXF-3748) Using Dispatch API with SOAPMessage type fails to set WS-Addressing action header properly if there's whitespace after the soap:body

     [ https://issues.apache.org/jira/browse/CXF-3748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp reassigned CXF-3748:
--------------------------------

    Assignee: Daniel Kulp

> Using Dispatch API with SOAPMessage type fails to set WS-Addressing action header properly if there's whitespace after the soap:body
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-3748
>                 URL: https://issues.apache.org/jira/browse/CXF-3748
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.4.1
>            Reporter: Jesse Pangburn
>            Assignee: Daniel Kulp
>            Priority: Minor
>              Labels: dispatch, soapmessage, ws-addressing
>         Attachments: patch3747and3748.txt, patch3748.txt
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> if you use a SOAPMessage instead of a Source then the following function fails (ignoring the exception) and your ws-addressing action doesn't get set- if you have any whitespace after the soap:body element before your first payload element:
>     private String getPayloadElementName(SOAPMessage soapMessage) {
>         try {            
>             SOAPElement element  = (SOAPElement)soapMessage.getSOAPBody().getChildElements().next();
>             return new QName(element.getNamespaceURI(), element.getLocalName()).toString();
>         } catch (Exception e) {
>             //ignore
>         }
>         return null;
>         
>     }
> This fails because the .next() call at the end gets a text node instead of an element object so the cast fails.  So inexplicably your ws-addressing action header doesn't get set as far as the user sees.

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