The basic process seems to be.
1. Do a request against a service that uses the WSS extension.
2. Do a request against one that doesn't use WSS. Which produces the following error.
error: cannot find element or attribute `{
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security'
This is my current work around
--- /home/ja1964/XML-Compile-WSS-1.12/lib/XML/Compile/SOAP/WSS.pm 2014-02-06 11:12:08.000000000 -0500
+++ lib/XML/Compile/SOAP/WSS.pm 2014-10-22 14:45:01.932060581 -0400
@@ -51,6 +51,7 @@
my $schema = $self->schema
or error __x"WSS not connected to the WSDL: WSS needs to be instantiated
before the WSDL because it influences its interpretation";
+ return unless($op->{schemas} eq $schema);
trace "adding wss header logic"; # get full type from any schema
my $sec = $schema->findName('wsse:Security');
@@ -61,6 +62,9 @@
sub soap11ClientWrapper($$$)
{ my ($self, $op, $call, $args) = @_;
+ my $schema = $self->schema;
+ return $call unless($op->{schemas} eq $schema);
+
sub {
my $data = @_==1 ? shift : {@_};
my $sec = $data->{wsse_Security};
Jason Adams
Senior-Applications Developer, Service Assurance M5 Task Automation CoE
AT&T Business Solutions
862-812-3532 (cell)
Show quoted text-----Original Message-----
From: Mark Overmeer via RT [mailto:bug-XML-Compile-SOAP@rt.cpan.org]
Sent: Wednesday, October 22, 2014 3:26 PM
To: ADAMS, JASON
Subject: Re: [rt.cpan.org #99735] XML::Compile::SOAP::Extension - defect
<URL:
https://rt.cpan.org/Ticket/Display.html?id=99735 >
* ADAMS, JASON via RT (bug-XML-Compile-SOAP@rt.cpan.org) [141022 18:34]:
> Wed Oct 22 14:34:09 2014: Request 99735 was acted upon.
> Transaction: Ticket created by ja1964@att.com
> Queue: XML-Compile-SOAP
> Subject: XML::Compile::SOAP::Extension - defect
>
> In "lib/XML/Compile/SOAP/Extension.pm", the global variable "@exts"
> cause extensions to be applied to all the schema objects not just the ones
> they were instantiated against.
The extensions load extra power to the wsdl parser/soap. That's
global knowledge.
> This causes breakage when modules like
> "XML::Compile::SOAP::WSS" are applied against interfaces which don't
> use that mechanism.
Which kind of breakage? Example please?
--
greetz,
MarkOv
------------------------------------------------------------------------
Mark Overmeer MSc MARKOV Solutions
Mark@Overmeer.net solutions@overmeer.net
http://Mark.Overmeer.net http://solutions.overmeer.net