Hi All,
I'm having some trouble with converting WEF ManagementEvents to strings
and back and I wonder if anybody can point out where I'm going wrong.
Here's a section of a string representation of an event (created with
event.toString() )
<muws1:SourceComponent>
<muws1:ComponentAddress>
<wsa:EndpointReference
xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://localhost/my-resources/services/event-publisher</wsa:Address>
</wsa:EndpointReference>
</muws1:ComponentAddress>
<muws1:ResourceId>MyresourceID</muws1:ResourceId>
</muws1:SourceComponent>
If i then create a DOM element from this string and use
ManagementEvent event = new SimpleWefFactory().createEvent(domElement);
and print out that ManagementEvent I see:
<muws1:SourceComponent>
<muws1:ComponentAddress>
<muws1:ComponentAddress>
<wsa:EndpointReference
xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://localhost/my-resources/services/event-publisher</wsa:Address>
</wsa:EndpointReference>
</muws1:ComponentAddress>
</muws1:ComponentAddress>
</muws1:SourceComponent>
It has duplicated and nested the ComponentAddress (along with duplicate
namespace) and removed the ResourceID.
This is causing problems further down the line with multiple namespace
declarations etc. When i display the domElement everything looks fine too
so I'm wondering if there's something wrong with the SimpleWefFactory?
I must be doing something wrong? Is there a recommended way to serialize
and de-serialize ManagementEvents to strings?
Thanks very much!
Keith
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]