Thanks for the hint Daniel! And Happy Xmas! ________________________________________ Fra: Daniel Kulp [[email protected]] Sendt: 24. desember 2010 04:31 Til: [email protected] Kopi: West Mark (IS Nordic) Emne: Re: Copy SAML String into Request Header
On Monday 20 December 2010 8:15:13 am [email protected] wrote: > Hello! > > I have generated a Web Service proxy (using JAXB) from the WSDL2Java Tool. > The WSDL defines no Headers, only a body. > > What I want to do is to add the following header to my Request: > > <soapenv:Header> > <wsse:Security soapenv:mustUnderstand="0" > xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecu > rity-secext-1.0.xsd"> <saml:Assertion>....SAML Assertion > Contents......</saml:Assertion> </wsse:Security> > <soapenv:Header> > > From checking the documentation I believe that I need to create a new > org.apache.cxf.headers.Header containing the SAML Token, but I'm not sure > how to do this. Basically I have the whole header in a txt document and > would like to copy it into my client code (I'm only running a proof of > concept at this stage). > > I'm currently following the steps documented at > http://cxf.apache.org/faq.html (section: "How can I add soap headers to > the request/response?", option 4), but I'm not sure how to deal with my > SAML String. > > Can anyone out there help me? You would need to parse the SAML string into a DOM and add that to the Header object as the value. -- Daniel Kulp [email protected] http://dankulp.com/blog
