ws-muse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bogdan Solomon (JIRA)" <j...@apache.org>
Subject [jira] Created: (MUSE-250) Serialization of EndpointReferences (or of Element represeting an EndpointReference) strips the <wsa:EndpointReference> root
Date Fri, 13 Jul 2007 17:19:05 GMT
Serialization of EndpointReferences (or of Element represeting an EndpointReference) strips
the <wsa:EndpointReference> root
----------------------------------------------------------------------------------------------------------------------------

                 Key: MUSE-250
                 URL: https://issues.apache.org/jira/browse/MUSE-250
             Project: Muse
          Issue Type: Bug
          Components: Core Engine - Routing and Serialization
            Reporter: Bogdan Solomon
            Assignee: Dan Jemiolo
            Priority: Minor
             Fix For: 2.2.0


Having a method that returns an EndpointReference or an Element that comes from doing Endpointreference.toXML()
results in the root of the EndpointReference to be striped. This in turn results in the client
not being able to generate an EPR from the Element it receives.

The bug is caused by the way XmlUtils treats serialization of Elements and of XmlSerializable.
In both those cases the method 

public static Element createElement(Document doc, QName qname, Object value)

will set the value of embed to true and then call 

createElement(Document doc,  QName qname, Node value, boolean embedChildren)

This causes XmlUtils to embed the properties and children of the given Node into the root
of the reply and thus causes the root of the EndpointReference to be lost.

A simple fix for this would be to modify line 454 in XmlUtils from

 if (embedChildren) 

to 

if (embedChildren && !(value.getLocalName().equals("EndpointReference")&&value.getNamespaceURI().equals(WsaConstants.NAMESPACE_URI)))

This will cause the EPR to be treated correctly.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


Mime
View raw message