|
Hi, i have
a problem with wss axis web services invotation (response is “Signature
verification failed”) with client ksoap, instead the call is fine with
axis client. The body
content must be signed. This is
soap stack request and response with axis client: ---------------------------------------------------------------------------------REQUEST
AXIS CLIENT----------------------- POST
/WebModule1/services/Testinterface HTTP/1.0 Content-Type: text/xml;
charset=utf-8 Accept:
application/soap+xml, application/dime, multipart/related, text/* User-Agent: Axis/1.2RC3 Host: 192.168.0.10:8080 Cache-Control: no-cache Pragma: no-cache SOAPAction: "" Content-Length: 2146 <?xml
version="1.0" encoding="UTF-8"?> <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header> <wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
soapenv:mustUnderstand="1"><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo> <ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces
xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"
PrefixList="soapenv xsd xsi"></ec:InclusiveNamespaces></ds:CanonicalizationMethod> <ds:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod> <ds:Reference
URI="#id-8442367"> <ds:Transforms> <ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces
xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"
PrefixList="xsd
xsi"></ec:InclusiveNamespaces></ds:Transform> </ds:Transforms> <ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod> <ds:DigestValue>XUHoWwab+NYy6tkjxN90tMybFds=</ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue> H1LEgrv1M8ToFckRRLEiHESq62MI8rLXjov49MCwI1QiNHDo7aFq54kO6Z42Am60rnjTLE/LdkNn /frRKru/0A== </ds:SignatureValue> <ds:KeyInfo
Id="KeyId-16842840"> <wsse:SecurityTokenReference
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="STRId-29715552"><ds:X509IssuerSerial> <ds:X509IssuerName>CN=dims</ds:X509IssuerName> <ds:X509SerialNumber>44369778256217224370984914847992022613</ds:X509SerialNumber> </ds:X509IssuerSerial></wsse:SecurityTokenReference> </ds:KeyInfo> </ds:Signature></wsse:Security></soapenv:Header><soapenv:Body
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="id-8442367"><ns1:getString xmlns:ns1="http://wss.eguide.it"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><st
xsi:type="xsd:string">____________</st></ns1:getString></soapenv:Body></soapenv:Envelope> -----------------------------------------------RESPONSE
WSS AXIS SERVER FOR AXIS CLIENT------------------------------------------ HTTP/1.1 200 OK Content-Type:
text/xml;charset=utf-8 Date: Thu, 24 Mar 2005
08:22:43 GMT Server: Apache-Coyote/1.1 Connection: close <?xml
version="1.0" encoding="utf-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:getStringResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://wss.eguide.it"><getStringReturn
xsi:type="soapenc:string"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">HI WSS
____________</getStringReturn></ns1:getStringResponse></soapenv:Body></soapenv:Envelope> This is
soap stack request and response with ksoap client for j2me profile: ---------------------------------------------------------------------------------REQUET
WITH KSOAP----------------------- POST
/WebModule1/services/Testinterface HTTP/1.1 connection: close SOAPAction: "" Content-Type: text/xml;
charset=utf-8 Content-Length: 2056 User-Agent: kSOAP/2.0 Cache-Control: no-cache Pragma: no-cache Host: 192.168.0.10:8080 Accept: text/html,
image/gif, image/jpeg, *; q=.2, */*; q=.2 <?xml version='1.0'
encoding='UTF-8' standalone='yes' ?> <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <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"> <ds:Signature
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo> <ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"> <ec:InclusiveNamespace
PrefixList="soapenv xsd xsi" xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"
/> </ds:CanonicalizationMethod> <ds:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /> <ds:Reference
URI="#id-8442367"> <ds:Trasforms> <ds:Trasform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"> <ec:InclusiveNamespace PrefixList="xsd xsi"
xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" /> </ds:Trasform> </ds:Trasforms> <ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> <ds:DigestValue>XUHoWwab+NYy6tkjxN90tMybFds=</ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue> H1LEgrv1M8ToFckRRLEiHESq62MI8rLXjov49MCwI1QiNHDo7aFq54kO6Z42Am60rnjTLE/LdkNn /frRKru/0A== </ds:SignatureValue> <ds:KeyInfo
Id="KeyId-16842840"> <wsse:SecurityTokenReference
wsu:Id="STRId-29715552"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <ds:X509IssuerSerial> <ds:X509IssuerName>CN=dims</ds:X509IssuerName> <ds:X509SerialNumber>44369778256217224370984914847992022613</ds:X509SerialNumber> </ds:X509IssuerSerial> </wsse:SecurityTokenReference> </ds:KeyInfo> </ds:Signature> </wsse:Security> </soapenv:Header> <soapenv:Body wsu:Id="id-8442367"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <ns1:getString
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://wss.eguide.it"> <st
xsi:type="xsd:string">____________</st> </ns1:getString> </soapenv:Body> </soapenv:Envelope> -----------------------------------------------RESPONSE
WSS AXIS SERVER FOR KSOAP CLIENT------------------------------------------ HTTP/1.1 500 Internal
Server Error Content-Type:
text/xml;charset=utf-8 Date: Thu, 24 Mar 2005
08:06:49 GMT Server: Apache-Coyote/1.1 Connection: close <?xml
version="1.0" encoding="utf-8"?> <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server.generalException</faultcode><faultstring>WSDoAllReceiver:
security processing failed; nested exception is: .org.apache.ws.security.WSSecurityException:
The signature verification
failed</faultstring><detail><ns1:hostname
xmlns:ns1="http://xml.apache.org/axis/">Terra</ns1:hostname></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope> THANKS. Ing. Filippo
Aiello --------------------------------------------- E-Guide S.R.L. Via Pietro
Bucci, Capannone C Arcavacata di
Rende (Cs) Tel.:
0984/493180 Mob:
+39.348.5240323 Fax:
0984/493057 E-mail: [EMAIL PROTECTED] --------------------------- |
