Could you play with something like this: XmlOptions opts = new XmlOptions(); opts.setSavePrettyPrint(); final Map<String,String> suggestedNamespaces = new HashMap<String,String>(); suggestedNamespaces.put(" http://schemas.xmlsoap.org/ws/2002/12/secext", ""); opts.setSaveSuggestedPrefixes(suggestedNamespaces); String result = yourXmlBean.xmlText(opts);
Regards, Pascal On Thu, May 22, 2008 at 12:46 AM, chrisneal <[EMAIL PROTECTED]> wrote: > > Vinh, > > Thanks! Yeah, that worked for me. The only thing that looks a bit strange > is the redefinition of the namespace that I'm getting: > > <Security xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext"> > <sec:UsernameToken > xmlns:sec="http://schemas.xmlsoap.org/ws/2002/12/secext"> > <sec:Username>USERNAME</sec:Username> > <sec:Password>PASSWORD</sec:Password> > </sec:UsernameToken> > </Security> > > > Any way to make the UsernameToken, Username, and Password elements just use > the Security xmlns? I guess it's valid either way, just redundant :) > > Thanks so much! > Chris > > > Vinh Nguyen (vinguye2) wrote: > > > > 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 > > > > > > -- > View this message in context: > http://www.nabble.com/Having-issues-with-WS-Security-document-construction-%3AS-tp17364354p17386061.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] > >