|
I need to add two complex elements to a header to make the call, one is the WSSE Security header, the other is application specific. I created the types and elements, and I'm doing this:
my $appParameters = DrmTypes::AppParameters->new({
serverUrl => 'http://drmd.nwie.net:5242/Oracle/Drm/APIAdapter',
sessionParams => 'ProductVersion=11.1.2;CultureName=en-US',
});
my $usernameToken = WsseTypes::UsernameToken->new({
Username => $drm_username,
Password => $drm_password,
});
my $security = WsseTypes::Security->new({
UsernameToken => $usernameToken,
});
my $result = $service->getUserNames( undef, ($security, $appParameters) );
The resulting call looks like this:
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://sch
+emas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
<UsernameToken>
<Username xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1
+.0.xsd">drmread</Username>
<Password xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1
+.0.xsd">XXXXXX</Password>
</UsernameToken>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<getUserNames xmlns="http://drm.webservices.epm.oracle" />
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
What I need is a call that looks like this (created using SOAP::Lite, works):
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:drm="http://drm.webservices.epm.oracle" xmlns:xsi="http://www.w3.org/2001/XMLS
+chema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3
+.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="ht
+tp://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-s
+ecext-1.0.xsd">
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecu
+rity-utility-1.0.xsd">
<wsse:Username>drmread</wsse:Username>
<wsse:Password>XXXXXX</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
<drm:AppParameters>
<drm:serverUrl>http://drmd.nwie.net:5242/Oracle/Drm/APIAdapter</drm:serverUrl>
<drm:sessionParams>ProductVersion=11.1.2;CultureName=en-US</drm:sessionParams>
</drm:AppParameters>
</soap:Header>
<soap:Body>
<drm:getUserNames xsi:nil="true" />
</soap:Body>
</soap:Envelope>
Two things:
1) How on earth do I turn on tracing or debugging? I'm using wireshark to see what is being sent, and it's kind of a pain.
2) Clearly I haven't figured out the right way to insert the headers correctly. What am I doing wrong?
Thanks!
- D. |