[ 
https://issues.apache.org/jira/browse/CXF-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550673
 ] 

Dain Sundstrom commented on CXF-1281:
-------------------------------------

The code still support proxies.  The BeanType code was using the following if 
block to choose to set a property on the actual object or the proxy delegate:

if (isProxy) {
    delegate.writeProperty(name.getLocalPart(), writeObj);
} else {
    writeProperty(name, object, writeObj, clazz, inf);
}

I replaced this with equivalent to the following code:

Object target = isProxy ? delegate : object;

writeProperty(name, target, writeObj, clazz, inf);

protected void writeProperty(QName name, Object object, Object property, Class 
impl, BeanTypeInfo inf)
    throws DatabindingException {

    if (object instanceof InterfaceInvocationHandler) {
        InterfaceInvocationHandler delegate = (InterfaceInvocationHandler) 
object;
        delegate.writeProperty(name.getLocalPart(), property);
        return;
    }
    // existing writePropery code here
}

The reason I made this change, I have a single place I can hook property 
setting (so I can deal with SoapRef objects), without introducing a new method 
with 7 arguments (yuck).



> SOAP Encoded Support
> --------------------
>
>                 Key: CXF-1281
>                 URL: https://issues.apache.org/jira/browse/CXF-1281
>             Project: CXF
>          Issue Type: New Feature
>          Components: Aegis Databinding
>            Reporter: Dain Sundstrom
>            Assignee: Benson Margulies
>         Attachments: struct.diff
>
>
> The attached patch adds support for SOAP encoded structs and references to 
> Aegis.  The patch includes javadoc and unit tests.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to