I don't think it should break any functionality. According to the
WS-Addressing-2005_08.xsd spec, the endpoint reference is defined as
{http://www.w3.org/2005/08/addressing}EndpointReference, which is what the
code is checking for. Since it is defined as:

<xs:element name="EndpointReference" type="tns:EndpointReferenceType" />

I assume the local part should be EndpointReference.


Vinh Nguyen (vinguye2) wrote:
> 
> Hi Bogdan,
> Are you sure that won't break current functionality?  It is possible to
> create an EPR with a localpart different than "EndpointReference", and
> it should still be valid as long as the namespace is correct.  Or am I
> wrong?
> 
> I have an operation which does return an EPR.  But I do have to register
> a custom serializer for it, which has the code below.  It works for me:)
> 
>     /** */
>     public Object fromXML(Element xml)
>     throws SoapFault
>     {
>         // Return null for empty/invalid elements, since we can't
> distinguish between the two.
>         try
>         {
>             return new EndpointReference(xml);
>         }
>         catch (Exception exc)
>         {
>             exc.printStackTrace();
>         }
>         return null;
>     }
> 
>     /** */
>     public Element toXML(Object obj, QName qname)
>     throws SoapFault
>     {
>         if (obj == null)
>             return XmlUtils.createElement(qname);
> 
>         Element xml = ((XmlSerializable)obj).toXML();
>         return XmlUtils.createElement(XmlUtils.EMPTY_DOC, qname, xml);
>     }
>  
> 

-- 
View this message in context: 
http://www.nabble.com/-jira--Created%3A-%28MUSE-250%29-Serialization-of-EndpointReferences-%28or-of-Element-represeting-an-EndpointReference%29-strips-the-%3Cwsa%3AEndpointReference%3E-root-tf4075785.html#a11584783
Sent from the Muse - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to