Hi, See my recent reply on Cezar's posting on xs:any. The code I posted is much simpler and doesn't require manipulating the XmlCursor. Let me know if it works for you.
Would be good if XmlBeans came with some useful utils like this:) -Vinh -----Original Message----- From: chrisneal [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 21, 2008 2:45 PM To: user@xmlbeans.apache.org Subject: Re: Having issues with WS-Security document construction :S Well, that's a good question. I hadn't heard of it is the truthful answer :) After having looked at it now, I'm still not sure it's what I want. I did come across the new XmlCursor stuff too, which really seemed exactly what I was after, but I can't seem to get it exactly right. I added this section of code to try and put the UsernameToken into the Security element: // Now add the UsernameToken to the Security element srcCursor = usernameTokenDoc.newCursor(); srcCursor.toFirstChild(); destCursor = securityDoc.newCursor(); destCursor.toEndToken(); srcCursor.copyXml(destCursor); But ended up with an element that looked like this: <xml-fragment xmlns:sec="http://schemas.xmlsoap.org/ws/2002/12/secext"> <sec:Security/> <sec:UsernameToken> <sec:Username>USERNAME</sec:Username> </sec:UsernameToken> </xml-fragment> I'm not sure where <xml-fragment> came from. I'm pretty sure this will get me what I want, I'm struggling through how to get the elements together. Chris >Hi Chris, > >why building ws-security stuff yourself? why not using the axis2 >rampart module? > >hth > >Stefan -- View this message in context: http://www.nabble.com/Having-issues-with-WS-Security-document-constructi on-%3AS-tp17364354p17377207.html Sent from the Xml Beans - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]