[Xml-compile] WS-Security to Axis2 server
Mark Overmeer
mark at overmeer.net
Thu Aug 30 06:58:01 GMT 2012
* gstewart (gstewart at gmail.com) [120828 23:45]:
> use constant WSS_200401 =>
> 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss';
> use constant WSS_SECEXT_200401 => WSS_200401 .
> '-wssecurity-secext-1.0.xsd';
> use constant WSS_USERNAME_200401 => WSS_200401 .
> '-username-token-profile-1.0';
Useful constants are provided in XML::Compile::WSS::Util
> my $password_value = $password_writer->($password_document,
> $wsdl->schemas->compile(WRITER => $UsernameToken_element);
> my $UsernameToken_document = XML::LibXML::Document->new('1.0', 'UTF-8');
It is quite complex to get this all right. The problem with the
WSS spec, is that it is not descriptive: it provides only fragments
of schema components, not a formalization of the whole.
> Any thoughts?
You have to instantiate a global XML::Compile::WSS object.
my $wss = XML::Compile::WSS->new;
That will load the schema's.
Use $wss->wsseBasicAuth()
with an example in examples/usertoken/with_help.pl
XML::Compile stuff works best when schema's are very descriptive.
Creating separate nodes is a bit of a hassle.
--
Regards,
MarkOv
------------------------------------------------------------------------
Mark Overmeer MSc MARKOV Solutions
Mark at Overmeer.net solutions at overmeer.net
http://Mark.Overmeer.net http://solutions.overmeer.net
More information about the Xml-compile
mailing list