Hello,
I am trying to create a Axis2/C + Rampart/C WS client together with a
Axis2/Java +Rampart/Java service.
I've managed to get most of the stuff to work, Signing and even
Encryption works fine.
But an odd problem is that Rampart Body signature validation seems to
fail on certain operations. Calling operations which don't have any
parameters on the client side seem to work fine (see attachment
"rampartc.working.soapmessage"), whereas calls to operations which have
at least one parameter fail when the service tries to validate the
digest (see "rampartc.not.working.soapmessage"):
This ist the output from the Axis2 webservice:
<SNIP>
WARNUNG: Verification failed for URI "#SigID-0484f390-41fb-1dc1"
03.08.2007 21:52:08 org.apache.xml.security.signature.Reference verify
INFO: Verification successful for URI "#SigID-0484f818-41fb-1dc1"
org.apache.ws.security.WSSecurityException: The signature verification
failed
at
org.apache.ws.security.processor.SignatureProcessor.verifyXMLSignature(SignatureProcessor.java:341)
at
org.apache.ws.security.processor.SignatureProcessor.handleToken(SignatureProcessor.java:80)
at
org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:279)
at
org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:201)
at
[...]
</SNIP>
Looking at the axis2 client log (see "wsauth.log.bad"), I found it
suspicious that the soap body captured via wireshark doesn't match with
the one logged:
This is the output of the canonicalizer, according to the log:
<soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="SigID-0484f390-41fb-1dc1"><ns1:getPosixUserByName
xmlns:ns1="urn:WSAuth"></ns1:getPosixUserByName>
</soapenv:Body>
Wheras this is the actual body send over the wire:
<soapenv:Body wsu:Id="SigID-0484f390-41fb-1dc1"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><ns1:getPosixUserByName
xmlns:ns1="urn:WSAuth"><ns1:username>schumi</ns1:username></ns1:getPosixUserByName></soapenv:Body></soapenv:Envelope>
(Notice the missing <ns1:username>...</...> element)
I'm using Axis2c und RampartC from SVN. The snapshot was taken on
2007-07-29. The code has not been modified by me exept a one line change
suggested in the "Generating incorrect digests?" thread on axis2c-dev
("u" -> "wsu").
I generated the client code via WSDL2C tool from the Axis2 Package (some
SVN snapshot from July). I changed some lines here and there to
workaround some problems, but I didn't touch the serializer code.
ciao
Dariush
POST /axis2/services/WSAuthService HTTP/1.0
User-Agent: Axis2/C
SOAPAction: "urn:WSAuth"
Content-Length: 2473
Content-Type: text/xml;charset=UTF-8
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><wsse:Security
soapenv:mustUnderstand="1"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsu:Timestamp
wsu:Id="SigID-0484f818-41fb-1dc1"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsu:Created>2007-08-03T19:52:08.269Z</wsu:Created><wsu:Expires>2007-08-03T19:58:08.269Z</wsu:Expires></wsu:Timestamp><ds:Signature
Id="SigID-0485117c-41fb-1dc1"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod><ds:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod><ds:Reference
URI="#SigID-0484f390-41fb-1dc1"><ds:Transforms><ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"
></ds:DigestMethod><ds:DigestValue>Y/RfvBEMACnPbPDl8RCbOiVdPKo=</ds:DigestValue></ds:Reference><ds:Reference
> URI="#SigID-0484f818-41fb-1dc1"><ds:Transforms><ds:Transform
>Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod
>
>Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>bRiadT/dswEBTVb72JDhpjzBgiI=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>pf8YpZOMnF4NX9G2ihhiAqCJcomxzTcnI8wTSeixbRLuTQB54ivbjoydqoEqsRskRvfqM5cGLgilybRRwuv3+IJIiUOtaVH31gvIwfVZIlrLzsMvy98i35gufEokLCfxovlrXAFWZadkQYey5NlgNebz/jJoMa9ozrl9w85IkCw=</ds:SignatureValue><ds:KeyInfo><wsse:SecurityTokenReference
>
>xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:KeyIdentifier
>
>EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
>
>ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier">
Z7e8jCIpHhdYxkORpvuC5xF3YtY=
</wsse:KeyIdentifier></wsse:SecurityTokenReference></ds:KeyInfo></ds:Signature></wsse:Security></soapenv:Header><soapenv:Body
wsu:Id="SigID-0484f390-41fb-1dc1"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><ns1:getPosixUserByName
xmlns:ns1="urn:WSAuth"><ns1:username>schumi</ns1:username></ns1:getPosixUserByName></soapenv:Body></soapenv:Envelope>
POST /axis2/services/WSAuthService HTTP/1.0
User-Agent: Axis2/C
Content-Length: 2432
Content-Type: application/soap+xml;charset=UTF-8
<soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header><wsse:Security
soapenv:mustUnderstand="1"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsu:Timestamp
wsu:Id="SigID-023e28b8-41fb-1dc1"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsu:Created>2007-08-03T19:52:04.449Z</wsu:Created><wsu:Expires>2007-08-03T19:58:04.449Z</wsu:Expires></wsu:Timestamp><ds:Signature
Id="SigID-023e42b2-41fb-1dc1"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod><ds:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod><ds:Reference
URI="#SigID-023e23fe-41fb-1dc1"><ds:Transforms><ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"><
/ds:DigestMethod><ds:DigestValue>rupyg8n0hq/C50ujLDpCH70QFaA=</ds:DigestValue></ds:Reference><ds:Reference
URI="#SigID-023e28b8-41fb-1dc1"><ds:Transforms><ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>d74CkE89Njh86RT4ScFh7ZF1e/k=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>T5L1PvLgyz5o9l40wmpg03WNSF3HHE6Nq/s+qJbMNdv+BdcP3mxmxIi3A7gnZdoOesBa0TuZ5NiU16UY49imPoWj4pmCwhNW2yQm097H1Y9li19HTcu26DKjpaWE9oZBb8fq9xgbtiz+qEBDVeRXpX28uyQoXjEZS9xF6YFx/+Y=</ds:SignatureValue><ds:KeyInfo><wsse:SecurityTokenReference
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:KeyIdentifier
EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier">Z7
e8jCIpHhdYxkORpvuC5xF3YtY=
</wsse:KeyIdentifier></wsse:SecurityTokenReference></ds:KeyInfo></ds:Signature></wsse:Security></soapenv:Header><soapenv:Body
wsu:Id="SigID-023e23fe-41fb-1dc1"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><ns1:getPosixUserlist
xmlns:ns1="urn:WSAuth"></ns1:getPosixUserlist></soapenv:Body></soapenv:Envelope>
[Fri Aug 3 21:52:08 2007] [debug] phase.c(113) axis2_handler_t
*request_uri_based_dispatcher added to the index 0 of the phase Transport
[Fri Aug 3 21:52:08 2007] [debug] phase.c(113) axis2_handler_t
*addressing_based_dispatcher added to the index 1 of the phase Transport
[Fri Aug 3 21:52:08 2007] [debug] phase.c(113) axis2_handler_t
*soap_message_body_based_dispatcher added to the index 0 of the phase Dispatch
[Fri Aug 3 21:52:08 2007] [debug] phase.c(113) axis2_handler_t
*soap_action_based_dispatcher added to the index 2 of the phase Dispatch
[Fri Aug 3 21:52:08 2007] [debug] phase.c(113) axis2_handler_t
*dispatch_post_conditions_evaluator added to the index 0 of the phase
PostDispatch
[Fri Aug 3 21:52:08 2007] [debug] phase.c(113) axis2_handler_t
*context_handler added to the index 1 of the phase PostDispatch
[Fri Aug 3 21:52:08 2007] [debug] conf_builder.c(220) no custom dispatching
order found continue with default dispatching order
[Fri Aug 3 21:52:08 2007] [debug] conf_builder.c(326) module rampart found in
axis2.xml
[Fri Aug 3 21:52:08 2007] [debug] class_loader.c(135) Object loaded
successfully
[Fri Aug 3 21:52:08 2007] [debug] class_loader.c(135) Object loaded
successfully
[Fri Aug 3 21:52:08 2007] [debug] dir_handler.c(195) No files in the path
/home/dariush/workspace/AxisCtest2/home/services.
[Fri Aug 3 21:52:08 2007] [debug] dep_engine.c(1042)
axis2_dep_engine_load_module_dll: DLL path is :
/home/dariush/workspace/AxisCtest2/home/modules/addressing/libaxis2_mod_addr.so
[Fri Aug 3 21:52:08 2007] [debug] class_loader.c(135) Object loaded
successfully
[Fri Aug 3 21:52:08 2007] [debug] dep_engine.c(1042)
axis2_dep_engine_load_module_dll: DLL path is :
/home/dariush/workspace/AxisCtest2/home/modules/logging/libaxis2_mod_log.so
[Fri Aug 3 21:52:08 2007] [debug] class_loader.c(135) Object loaded
successfully
[Fri Aug 3 21:52:08 2007] [debug] dep_engine.c(1042)
axis2_dep_engine_load_module_dll: DLL path is :
/home/dariush/workspace/AxisCtest2/home/modules/rampart/libmod_rampart.so
[Fri Aug 3 21:52:08 2007] [debug] class_loader.c(135) Object loaded
successfully
[Fri Aug 3 21:52:08 2007] [debug] phase_holder.c(129) Add handler
RampartInHandler to phase PreDispatch
[Fri Aug 3 21:52:08 2007] [info] [rampart][mod_rampart] mod_rampart
initialized
[Fri Aug 3 21:52:08 2007] [debug] phase_resolver.c(117) Service name is :
__ANONYMOUS_SERVICE__
[Fri Aug 3 21:52:08 2007] [debug] phase_resolver.c(231) module name is:rampart
[Fri Aug 3 21:52:08 2007] [debug] phase_resolver.c(324) This handler is trying
to added to system pre defined phases , but those handlers are already added to
global chain which run irrespective of the service
[Fri Aug 3 21:52:08 2007] [debug] phase_resolver.c(231) module name is:rampart
[Fri Aug 3 21:52:08 2007] [debug] phase_holder.c(129) Add handler
RampartOutHandler to phase MessageOut
[Fri Aug 3 21:52:08 2007] [debug] phase_resolver.c(231) module name is:rampart
[Fri Aug 3 21:52:08 2007] [debug] phase_resolver.c(231) module name is:rampart
[Fri Aug 3 21:52:08 2007] [debug] phase_holder.c(129) Add handler
RampartOutHandler to phase MessageOut
[Fri Aug 3 21:52:08 2007] [debug] phase_resolver.c(231) module name is:rampart
[Fri Aug 3 21:52:08 2007] [debug] phase_resolver.c(324) This handler is trying
to added to system pre defined phases , but those handlers are already added to
global chain which run irrespective of the service
[Fri Aug 3 21:52:08 2007] [debug] phase_resolver.c(231) module name is:rampart
[Fri Aug 3 21:52:08 2007] [debug] phase_holder.c(129) Add handler
RampartOutHandler to phase MessageOut
[Fri Aug 3 21:52:08 2007] [debug] phase_resolver.c(231) module name is:rampart
[Fri Aug 3 21:52:08 2007] [debug] phase_resolver.c(231) module name is:rampart
[Fri Aug 3 21:52:08 2007] [debug] phase_holder.c(129) Add handler
RampartOutHandler to phase MessageOut
[Fri Aug 3 21:52:08 2007] [debug] phase_resolver.c(231) module name is:rampart
[Fri Aug 3 21:52:08 2007] [debug] phase_resolver.c(324) This handler is trying
to added to system pre defined phases , but those handlers are already added to
global chain which run irrespective of the service
[Fri Aug 3 21:52:08 2007] [debug] phase_resolver.c(231) module name is:rampart
[Fri Aug 3 21:52:08 2007] [debug] phase_holder.c(129) Add handler
RampartOutHandler to phase MessageOut
[Fri Aug 3 21:52:08 2007] [debug] phase_resolver.c(231) module name is:rampart
[Fri Aug 3 21:52:08 2007] [debug] phase_resolver.c(231) module name is:rampart
[Fri Aug 3 21:52:08 2007] [debug] phase_holder.c(129) Add handler
RampartOutHandler to phase MessageOut
[Fri Aug 3 21:52:08 2007] [debug] engine.c(575) Invoking phase MessageOut
[Fri Aug 3 21:52:08 2007] [debug] phase.c(195) Invoke the handler
RampartOutHandler within the phase MessageOut
[Fri Aug 3 21:52:08 2007] [info] [rampart][rampart_handler_utils] (null)
parameter is not set.
[Fri Aug 3 21:52:08 2007] [debug] rampart_util.c(53) [rampart][rampart_util]
Trying to load module =
/usr/local/axis2c/bin/samples/rampart/callback/libpwcb.so
[Fri Aug 3 21:52:08 2007] [debug] class_loader.c(135) Object loaded
successfully
[Fri Aug 3 21:52:08 2007] [info] [rampart][shb] building Timestamp Token
[Fri Aug 3 21:52:08 2007] [info] [rampart][shb] Using default timeToLive
value 300
[Fri Aug 3 21:52:08 2007] [info] [rampart][rampart_context] No Signed parts
specified. Using the body.
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node Security for
Timestamp
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node Timestamp for
Timestamp
[Fri Aug 3 21:52:08 2007] [info] [rampart][rampart_util] Password taken from
the callback module . SUCCESS
[Fri Aug 3 21:52:08 2007] [info] [rampart][c14n-OutPut] is
<soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="SigID-0484f390-41fb-1dc1"><ns1:getPosixUserByName
xmlns:ns1="urn:WSAuth"></ns1:getPosixUserByName></soapenv:Body>
[Fri Aug 3 21:52:08 2007] [info] [rampart][c14n-OutPut] is
<wsu:Timestamp
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="SigID-0484f818-41fb-1dc1"><wsu:Created>2007-08-03T19:52:08.269Z</wsu:Created><wsu:Expires>2007-08-03T19:58:08.269Z</wsu:Expires></wsu:Timestamp>
[Fri Aug 3 21:52:08 2007] [info] [oxs][xml_sig] C14N (sig)= <ds:SignedInfo
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod><ds:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod><ds:Reference
URI="#SigID-0484f390-41fb-1dc1"><ds:Transforms><ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>Y/RfvBEMACnPbPDl8RCbOiVdPKo=</ds:DigestValue></ds:Reference><ds:Reference
URI="#SigID-0484f818-41fb-1dc1"><ds:Transforms><ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>bRiadT/dswEBTVb72JDhpjzBgiI=</ds:DigestValue></ds:Reference></ds:SignedInfo>
[Fri Aug 3 21:52:08 2007] [info] [openssl][sig] Signing content
<ds:SignedInfo
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod><ds:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod><ds:Reference
URI="#SigID-0484f390-41fb-1dc1"><ds:Transforms><ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>Y/RfvBEMACnPbPDl8RCbOiVdPKo=</ds:DigestValue></ds:Reference><ds:Reference
URI="#SigID-0484f818-41fb-1dc1"><ds:Transforms><ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>bRiadT/dswEBTVb72JDhpjzBgiI=</ds:DigestValue></ds:Reference></ds:SignedInfo>
[Fri Aug 3 21:52:08 2007] [info] [rampart][rampart_encryption] No parts
specified or specified parts can't be found for encryprion.
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node Security for
Signature
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node Timestamp for
Signature
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node Created for
Signature
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node Expires for
Signature
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node Signature for
Signature
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node Security for
EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node Timestamp for
EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node Created for
EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node Expires for
EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node Signature for
EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node SignedInfo
for EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node
CanonicalizationMethod for EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node
SignatureMethod for EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node Reference for
EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node Transforms
for EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node Transform for
EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node DigestMethod
for EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node DigestValue
for EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node Reference for
EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node Transforms
for EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node Transform for
EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node DigestMethod
for EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node DigestValue
for EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node
SignatureValue for EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node KeyInfo for
EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node
SecurityTokenReference for EncryptedKey
[Fri Aug 3 21:52:08 2007] [info] [rampart][axiom] Checking node KeyIdentifier
for EncryptedKey
[Fri Aug 3 21:52:08 2007] [debug] http_transport_sender.c(566) OP name
axutil_qname_get_localpart = http://www.w3.org/2004/08/wsdl/out-in
[Fri Aug 3 21:52:08 2007] [debug] soap_builder.c(737) Identified soap version
is soap11
[Fri Aug 3 21:52:08 2007] [debug] engine.c(179) Axis2 engine send successful
[Fri Aug 3 21:52:08 2007] [debug] engine.c(575) Invoking phase Transport
[Fri Aug 3 21:52:08 2007] [debug] phase.c(195) Invoke the handler
request_uri_based_dispatcher within the phase Transport
[Fri Aug 3 21:52:08 2007] [debug] phase.c(195) Invoke the handler
addressing_based_dispatcher within the phase Transport
[Fri Aug 3 21:52:08 2007] [debug] engine.c(575) Invoking phase PreDispatch
[Fri Aug 3 21:52:08 2007] [debug] phase.c(195) Invoke the handler
RampartInHandler within the phase PreDispatch
[Fri Aug 3 21:52:08 2007] [info] [rampart][rampart_in_handler] No security
header element.
[Fri Aug 3 21:52:08 2007] [debug] engine.c(292) Axis2 engine receive completed!
/**
* adb_getPosixUserByName.h
*
* This file was auto-generated from WSDL
* by the Apache Axis2/C version: SNAPSHOT Built on : Jul 23, 2007 (02:24:43 GMT+00:00)
*
*/
#include "adb_getPosixUserByName.h"
/**
* implmentation of the getPosixUserByName|urn:WSAuth element
*/
struct adb_getPosixUserByName
{
axutil_qname_t* qname;
adb_getPosixUserByName_t_t* attrib_getPosixUserByName;
};
/************************* Function Implmentations ********************************/
AXIS2_EXTERN adb_getPosixUserByName_t* AXIS2_CALL
adb_getPosixUserByName_create(
const axutil_env_t *env )
{
adb_getPosixUserByName_t *_getPosixUserByName = NULL;
axutil_qname_t* qname = NULL;
AXIS2_ENV_CHECK(env, NULL);
_getPosixUserByName = (adb_getPosixUserByName_t *) AXIS2_MALLOC(env->
allocator, sizeof(adb_getPosixUserByName_t));
if(NULL == _getPosixUserByName)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
_getPosixUserByName->attrib_getPosixUserByName = NULL;
qname = axutil_qname_create (env,
"getPosixUserByName",
"urn:WSAuth",
"ns1");
_getPosixUserByName->qname = qname;
return _getPosixUserByName;
}
axis2_status_t AXIS2_CALL
adb_getPosixUserByName_free (
adb_getPosixUserByName_t* _getPosixUserByName,
const axutil_env_t *env)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
if( _getPosixUserByName->attrib_getPosixUserByName != NULL)
{
adb_getPosixUserByName_t_free( _getPosixUserByName->attrib_getPosixUserByName, env);
_getPosixUserByName->attrib_getPosixUserByName = NULL;
}
if(_getPosixUserByName->qname )
{
axutil_qname_free (_getPosixUserByName->qname, env);
_getPosixUserByName->qname = NULL;
}
if(_getPosixUserByName)
{
AXIS2_FREE( env->allocator, _getPosixUserByName);
_getPosixUserByName = NULL;
}
return AXIS2_SUCCESS;
}
axutil_qname_t* AXIS2_CALL
adb_getPosixUserByName_get_qname (
adb_getPosixUserByName_t* _getPosixUserByName,
const axutil_env_t *env)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
return _getPosixUserByName-> qname;
}
axis2_status_t AXIS2_CALL
adb_getPosixUserByName_deserialize(
adb_getPosixUserByName_t* _getPosixUserByName,
const axutil_env_t *env,
axiom_node_t* parent)
{
axis2_status_t status = AXIS2_SUCCESS;
axiom_namespace_t *ns1 = NULL;
void *element = NULL;
axis2_char_t* text_value = NULL;
axutil_qname_t *qname = NULL;
axutil_qname_t *element_qname = NULL;
axiom_node_t *first_node = NULL;
axiom_node_t *current_node = NULL;
axiom_element_t *current_element = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
ns1 = axiom_namespace_create (env,
"urn:WSAuth",
"ns1");
if ( NULL == parent )
{
/** This should be checked above */
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL elemenet for getPosixUserByName"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
return AXIS2_FAILURE;
}
current_element = axiom_node_get_data_element( parent, env);
qname = axiom_element_get_qname( current_element, env, parent);
if ( axutil_qname_equals( qname, env, _getPosixUserByName-> qname ) )
{
first_node = axiom_node_get_first_child( parent, env);
}
else
{
first_node = parent;
}
/**
* building getPosixUserByName element
*/
/**
* because elements are not ordered we should surf all the sibling to pick the right one
*/
for ( current_node = first_node; current_node != NULL;
current_node = axiom_node_get_next_sibling( current_node, env))
{
current_element = axiom_node_get_data_element( current_node, env);
qname = axiom_element_get_qname( current_element, env, current_node);
element_qname = axutil_qname_create( env, "getPosixUserByName", "urn:WSAuth", "ns1");
if ( axutil_qname_equals( element_qname, env, qname))
{
/** found the requried element */
break;
}
}
if ( current_node != NULL)
{
element = (void*)adb_getPosixUserByName_t_create( env);
status = adb_getPosixUserByName_t_deserialize( (
adb_getPosixUserByName_t_t*)element, env,
axiom_node_get_first_child(current_node, env)==NULL?current_node:axiom_node_get_first_child(current_node, env));
if( AXIS2_FAILURE == status)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building element getPosixUserByName "
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
return AXIS2_FAILURE;
}
status = adb_getPosixUserByName_set_getPosixUserByName( _getPosixUserByName, env,
(
adb_getPosixUserByName_t_t*)element);
if( AXIS2_FAILURE == status)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for getPosixUserByName "
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
return AXIS2_FAILURE;
}
}
else
{
/** this is not a nillable element*/
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "non nillable or minOuccrs != 0 element getPosixUserByName missing"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
return AXIS2_FAILURE;
}
return status;
}
axiom_node_t* AXIS2_CALL
adb_getPosixUserByName_serialize(
adb_getPosixUserByName_t* _getPosixUserByName,
const axutil_env_t *env, axiom_node_t* parent, int has_parent)
{
axiom_namespace_t *ns1 = NULL;
axis2_char_t text_value_1[64];
axiom_node_t *current_node = NULL;
axiom_element_t *current_element = NULL;
axiom_data_source_t *data_source = NULL;
axutil_stream_t *stream = NULL;
axis2_char_t *start_input_str = NULL;
axis2_char_t *end_input_str = NULL;
unsigned int start_input_str_len = 0;
unsigned int end_input_str_len = 0;
AXIS2_ENV_CHECK(env, NULL);
ns1 = axiom_namespace_create (env,
"urn:WSAuth",
"ns1");
if( parent == NULL)
{
current_element = axiom_element_create (env, parent, "getPosixUserByName", ns1 , ¤t_node);
axiom_element_set_namespace( current_element, env, ns1, current_node);
parent = current_node;
}
if(has_parent)
{
data_source = axiom_node_get_data_element(parent, env);
if (!data_source)
return NULL;
stream = axiom_data_source_get_stream(data_source, env); /* assume parent is of type data source */
if (!stream)
return NULL;
current_node = parent;
}
else
{
data_source = axiom_data_source_create(env, parent, ¤t_node);
stream = axiom_data_source_get_stream(data_source, env);
}
/**
* parsing getPosixUserByName element
*/
start_input_str = "<ns1:getPosixUserByName>";
start_input_str_len = axutil_strlen(start_input_str);
end_input_str = "</ns1:getPosixUserByName>";
end_input_str_len = axutil_strlen(end_input_str);
if(has_parent)
axutil_stream_write(stream, env, start_input_str, start_input_str_len);
adb_getPosixUserByName_t_serialize( _getPosixUserByName->attrib_getPosixUserByName, env, current_node, AXIS2_TRUE);
if(has_parent)
axutil_stream_write(stream, env, end_input_str, end_input_str_len);
return parent;
}
/**
* getter for getPosixUserByName.
*/
adb_getPosixUserByName_t_t* AXIS2_CALL
adb_getPosixUserByName_get_getPosixUserByName(
adb_getPosixUserByName_t* _getPosixUserByName,
const axutil_env_t *env)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
return _getPosixUserByName-> attrib_getPosixUserByName;
}
/**
* setter for getPosixUserByName
*/
axis2_status_t AXIS2_CALL
adb_getPosixUserByName_set_getPosixUserByName(
adb_getPosixUserByName_t* _getPosixUserByName,
const axutil_env_t *env,
adb_getPosixUserByName_t_t* param_getPosixUserByName)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
if(!_getPosixUserByName)
{
return AXIS2_FAILURE;
}
if( NULL == param_getPosixUserByName )
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "getPosixUserByName is NULL, but not a nullable element"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
return AXIS2_FAILURE;
}
_getPosixUserByName-> attrib_getPosixUserByName = param_getPosixUserByName;
return AXIS2_SUCCESS;
}
/**
* adb_getPosixUserByName_t.h
*
* This file was auto-generated from WSDL
* by the Apache Axis2/C version: SNAPSHOT Built on : Jul 23, 2007 (02:24:43 GMT+00:00)
*
*/
#include "adb_getPosixUserByName_t.h"
/**
* This type was generated from the piece of schema that had
* name = getPosixUserByName_t
* Namespace URI = urn:WSAuth
* Namespace Prefix = ns1
*/
struct adb_getPosixUserByName_t
{
axis2_char_t* attrib_username;
};
/************************* Function Implmentations ********************************/
AXIS2_EXTERN adb_getPosixUserByName_t_t* AXIS2_CALL
adb_getPosixUserByName_t_create(
const axutil_env_t *env )
{
adb_getPosixUserByName_t_t *_getPosixUserByName_t = NULL;
AXIS2_ENV_CHECK(env, NULL);
_getPosixUserByName_t = (adb_getPosixUserByName_t_t *) AXIS2_MALLOC(env->
allocator, sizeof(adb_getPosixUserByName_t_t));
if(NULL == _getPosixUserByName_t)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
return _getPosixUserByName_t;
}
axis2_status_t AXIS2_CALL
adb_getPosixUserByName_t_free (
adb_getPosixUserByName_t_t* _getPosixUserByName_t,
const axutil_env_t *env)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
if(_getPosixUserByName_t)
{
AXIS2_FREE( env->allocator, _getPosixUserByName_t);
_getPosixUserByName_t = NULL;
}
return AXIS2_SUCCESS;
}
axis2_status_t AXIS2_CALL
adb_getPosixUserByName_t_deserialize(
adb_getPosixUserByName_t_t* _getPosixUserByName_t,
const axutil_env_t *env,
axiom_node_t* parent)
{
axis2_status_t status = AXIS2_SUCCESS;
axiom_namespace_t *ns1 = NULL;
axis2_char_t* text_value = NULL;
axutil_qname_t *qname = NULL;
axiom_node_t *first_node = NULL;
axiom_node_t *current_node = NULL;
axiom_element_t *current_element = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
ns1 = axiom_namespace_create (env,
"urn:WSAuth",
"ns1");
if ( NULL == parent )
{
/** This should be checked above */
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL elemenet for getPosixUserByName_t"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
return AXIS2_FAILURE;
}
first_node = parent;
/**
* building username element
*/
current_node = first_node;
if ( current_node != NULL)
{
current_element = axiom_node_get_data_element( current_node, env);
text_value = axiom_element_get_text(current_element, env, current_node );
status = adb_getPosixUserByName_t_set_username( _getPosixUserByName_t, env,
text_value);
if( AXIS2_FAILURE == status)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for username "
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
return AXIS2_FAILURE;
}
}
else
{
/** this is not a nillable element*/
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "non nillable or minOuccrs != 0 element username missing"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
return AXIS2_FAILURE;
}
return status;
}
axiom_node_t* AXIS2_CALL
adb_getPosixUserByName_t_serialize(
adb_getPosixUserByName_t_t* _getPosixUserByName_t,
const axutil_env_t *env, axiom_node_t* parent, int has_parent)
{
axiom_namespace_t *ns1 = NULL;
axis2_char_t *text_value_1;
axiom_node_t *current_node = NULL;
axiom_element_t *current_element = NULL;
axiom_data_source_t *data_source = NULL;
axutil_stream_t *stream = NULL;
axis2_char_t *start_input_str = NULL;
axis2_char_t *end_input_str = NULL;
unsigned int start_input_str_len = 0;
unsigned int end_input_str_len = 0;
AXIS2_ENV_CHECK(env, NULL);
ns1 = axiom_namespace_create (env,
"urn:WSAuth",
"ns1");
if(has_parent)
{
data_source = axiom_node_get_data_element(parent, env);
if (!data_source)
return NULL;
stream = axiom_data_source_get_stream(data_source, env); /* assume parent is of type data source */
if (!stream)
return NULL;
current_node = parent;
}
else
{
data_source = axiom_data_source_create(env, parent, ¤t_node);
stream = axiom_data_source_get_stream(data_source, env);
}
/**
* parsing username element
*/
start_input_str = "<ns1:username>";
start_input_str_len = axutil_strlen(start_input_str);
end_input_str = "</ns1:username>";
end_input_str_len = axutil_strlen(end_input_str);
text_value_1 = _getPosixUserByName_t->attrib_username;
axutil_stream_write(stream, env, start_input_str, start_input_str_len);
axutil_stream_write(stream, env, text_value_1, axutil_strlen(text_value_1));
axutil_stream_write(stream, env, end_input_str, end_input_str_len);
return parent;
}
/**
* getter for username.
*/
axis2_char_t* AXIS2_CALL
adb_getPosixUserByName_t_get_username(
adb_getPosixUserByName_t_t* _getPosixUserByName_t,
const axutil_env_t *env)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
return _getPosixUserByName_t-> attrib_username;
}
/**
* setter for username
*/
axis2_status_t AXIS2_CALL
adb_getPosixUserByName_t_set_username(
adb_getPosixUserByName_t_t* _getPosixUserByName_t,
const axutil_env_t *env,
axis2_char_t* param_username)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
if(!_getPosixUserByName_t)
{
return AXIS2_FAILURE;
}
if( NULL == param_username )
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "username is NULL, but not a nullable element"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
return AXIS2_FAILURE;
}
_getPosixUserByName_t-> attrib_username = param_username;
return AXIS2_SUCCESS;
}
/**
* axis2_stub_WSAuthService.c
*
* This file was auto-generated from WSDL for "WSAuthService|urn:WSAuth" service
* by the Apache Axis2/C version: SNAPSHOT Built on : Jul 23, 2007 (02:24:29 GMT+00:00)
*/
#include "axis2_stub_WSAuthService.h"
/**
* axis2_stub_WSAuthService C implementation
*/
axis2_stub_t*axis2_stub_WSAuthService_create(const axutil_env_t *env,
axis2_char_t *client_home, axis2_char_t *endpoint_uri) {
axis2_stub_t *stub= NULL;
axis2_endpoint_ref_t *endpoint_ref= NULL;
AXIS2_FUNC_PARAM_CHECK ( client_home, env, NULL)
if (NULL == endpoint_uri) {
endpoint_uri
= axis2_stub_WSAuthService_get_endpoint_uri_from_wsdl(env );
}
endpoint_ref = axis2_endpoint_ref_create(env, endpoint_uri);
stub = axis2_stub_create_with_endpoint_ref_and_client_home (env,
endpoint_ref, client_home );
axis2_stub_WSAuthService_populate_services(stub, env );
return stub;
}
void axis2_stub_WSAuthService_populate_services(axis2_stub_t *stub,
const axutil_env_t *env) {
axis2_svc_client_t *svc_client= NULL;
axutil_qname_t *svc_qname= NULL;
axutil_qname_t *op_qname= NULL;
axis2_svc_t *svc= NULL;
axis2_op_t *op= NULL;
axis2_phases_info_t *info = NULL;
axis2_svc_ctx_t *svc_ctx = NULL;
axis2_conf_ctx_t *conf_ctx = NULL;
axis2_conf_t *conf = NULL;
/* Modifying the Service */
svc_client = axis2_stub_get_svc_client (stub, env );
svc = (axis2_svc_t*)axis2_svc_client_get_svc(svc_client, env );
/* Hotfix, from the mailing list */
svc_ctx = axis2_svc_client_get_svc_ctx(svc_client, env);
conf_ctx = axis2_svc_ctx_get_conf_ctx(svc_ctx, env);
conf = axis2_conf_ctx_get_conf(conf_ctx, env);
info = axis2_conf_get_phases_info(conf, env);
axutil_qname_create(env, "WSAuthService", NULL, NULL);
axis2_svc_set_qname (svc, env, svc_qname);
/* creating the operations*/
/* [...] (other ops) */
op_qname = axutil_qname_create(env, "getPosixUserByName", "urn:WSAuth",
NULL);
op = axis2_op_create_with_qname(env, op_qname);
axis2_op_set_msg_exchange_pattern(op, env, AXIS2_MEP_URI_OUT_IN);
axis2_phases_info_set_op_phases(info, env, op);
axis2_svc_add_op(svc, env, op);
/* [...] (other ops) */
}
/**
*return end point picked from wsdl
*/
axis2_char_t*axis2_stub_WSAuthService_get_endpoint_uri_from_wsdl(
const axutil_env_t *env) {
axis2_char_t *endpoint_uri= NULL;
/* set the address from here */
endpoint_uri = "http://localhost:8080/axis2/services/WSAuth";
return endpoint_uri;
}
/**
* auto generated method signature
* for "getPosixUserByName|urn:WSAuth" operation.
* @param getPosixUserByName
* @return
*/
adb_PosixUser_t* axis2_stub_WSAuthService_getPosixUserByName(
axis2_stub_t *stub, const axutil_env_t *env,
axis2_char_t *param_username) {
axis2_svc_client_t *svc_client= NULL;
axis2_options_t *options= NULL;
axiom_node_t *ret_node= NULL;
const axis2_char_t *soap_action= NULL;
axutil_qname_t *op_qname= NULL;
axiom_node_t *payload= NULL;
const axutil_string_t *soap_act= NULL;
adb_getPosixUserByNameResponse_t* ret_val= NULL;
/* Wrapping */
adb_getPosixUserByName_t_t *getPosixUserByName_t = adb_getPosixUserByName_t_create(env);
adb_getPosixUserByName_t_set_username(getPosixUserByName_t, env, param_username);
adb_getPosixUserByName_t *getPosixUserByName = adb_getPosixUserByName_create(env);
adb_getPosixUserByName_set_getPosixUserByName(getPosixUserByName, env, getPosixUserByName_t);
payload = adb_getPosixUserByName_serialize(getPosixUserByName, env, NULL,
AXIS2_FALSE);
options = axis2_stub_get_options(stub, env);
if ( NULL == options) {
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in stub: Error code:"
" %d :: %s", env->error->error_number,
AXIS2_ERROR_GET_MESSAGE(env->error));
return NULL;
}
svc_client = axis2_stub_get_svc_client(stub, env );
soap_action = axis2_options_get_action(options, env );
if ( NULL == soap_action) {
soap_action = "urn:WSAuth";
soap_act = axutil_string_create(env, "urn:WSAuth");
axis2_options_set_soap_action(options, env, soap_act);
axis2_options_set_action(options, env, soap_action );
}
axis2_options_set_soap_version(options, env, AXIOM_SOAP11 );
op_qname = axutil_qname_create(env, "getPosixUserByName", "urn:WSAuth",
NULL);
ret_node = axis2_svc_client_send_receive_with_op_qname(svc_client, env,
op_qname, payload);
if ( NULL == ret_node) {
return NULL;
}
ret_val = adb_getPosixUserByNameResponse_create(env);
adb_getPosixUserByNameResponse_deserialize(ret_val, env, ret_node );
/* Unwrapping */
if (ret_val)
{
adb_getPosixUserByNameResponse_t_t *ret_val_unwrap = adb_getPosixUserByNameResponse_get_getPosixUserByNameResponse(ret_val, env);
if (ret_val_unwrap)
{
adb_PosixUser_t *user = adb_getPosixUserByNameResponse_t_get_user(ret_val_unwrap, env);
return user;
}
}
return NULL;
}
/* [...] */
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]