Kumar, this exception means that the "action" parameters on the server do not match those on the client side (in the *.wsdd files).
To get the BST in you request pls refer to the Javadoc of the WSHandlerConstants, refer also to the javadoc of WSConstants. Most of the parameters, attributes are documented there. Also have a look into the package (after running javadoc) of **.security.axis where the Axis handlers are located. Here you find some more introduction. Regards, Werner > -----Ursprüngliche Nachricht----- > Von: Kumar [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 22. Juni 2005 16:04 > An: Dittmann, Werner > Cc: [email protected]; [email protected] > Betreff: Re: Signature creation failed exception with WSS4J and AXIS > > > Hi Werner & All, > > Thank you for pointing the problem. It works . Now I am able to see > below soap request message in TCPMonitor . > > > Request SOAP Message > -------------------------------------------------------------- > ---------------------------------------------- > POST /axis/services/SparePartInfo HTTP/1.0 > Content-Type: text/xml; charset=utf-8 > Accept: application/soap+xml, application/dime, > multipart/related, text/* > User-Agent: Axis/1.2RC1 > Host: 127.0.0.1:9999 > Cache-Control: no-cache > Pragma: no-cache > SOAPAction: "" > Content-Length: 2443 > > > <?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-20040 > 1-wss-wssecurity-secext-1.0.xsd" > soapenv:mustUnderstand="1"> > <wsse:UsernameToken > xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401 > -wss-wssecurity-utility-1.0.xsd" > wsu:Id="usernameTokenId-5294604"> > <wsse:Username>alice</wsse:Username> > <wsse:Password > Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss- > username-token-profile-1.0#PasswordText">password</wsse:Password> > <wsu:Created>2005-06-22T13:52:43Z</wsu:Created> > <wsse:Nonce>jJk9swcs+hN460RCJNOFxg==</wsse:Nonce> > </wsse:UsernameToken> > <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#hmac-sha1"></ds:S > ignatureMethod> > <ds:Reference URI="#id-16625677"> > <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>IEnmBTVOR4+F8ogoCoeeTJO+KDk=</ds:DigestValue> > </ds:Reference> > </ds:SignedInfo> > > <ds:SignatureValue>62NTqelpmGcSmOUfgcll1woekZM=</ds:SignatureValue> > <ds:KeyInfo Id="KeyId-30408372"> > <wsse:SecurityTokenReference > xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401 > -wss-wssecurity-utility-1.0.xsd" > wsu:Id="STRId-29689095"> > <wsse:Reference URI="#usernameTokenId-5294604" > ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401 > -wss-username-token-profile-1.0#UsernameToken"></wsse:Reference> > </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-16625677"> > <getPartInfo xmlns="http://Chapter4.wroxaxis"> > <in0 xmlns="">SKU-123</in0> > </getPartInfo> > </soapenv:Body> > </soapenv:Envelope> > > > > > > Now I have 2 issues here : > > 1. I get below exception on the client side and hence a axis fault > response from the server. > > > AxisFault > faultCode: > {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException > faultSubcode: > faultString: WSDoAllReceiver: security processing failed (actions > number mismatch) > faultActor: > faultNode: > faultDetail: > {http://xml.apache.org/axis/}hostname:hyddl0337 > > WSDoAllReceiver: security processing failed (actions number mismatch) > at > org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFault > Builder.java:221) > at > org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultB > uilder.java:128) > at > org.apache.axis.encoding.DeserializationContext.endElement(Des > erializationContext.java:1077) > at > org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown > Source) > at > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown > Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragment > ContentDispatcher.dispatch(Unknown > Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocu > ment(Unknown > Source) > at > org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) > at > org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at > org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) > at javax.xml.parsers.SAXParser.parse(Unknown Source) > at > org.apache.axis.encoding.DeserializationContext.parse(Deserial > izationContext.java:225) > at > org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:645) > at org.apache.axis.Message.getSOAPEnvelope(Message.java:424) > at > org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(Mus > tUnderstandChecker.java:62) > at > org.apache.axis.client.AxisClient.invoke(AxisClient.java:173) > at org.apache.axis.client.Call.invokeEngine(Call.java:2737) > at org.apache.axis.client.Call.invoke(Call.java:2720) > at org.apache.axis.client.Call.invoke(Call.java:2396) > at org.apache.axis.client.Call.invoke(Call.java:2319) > at org.apache.axis.client.Call.invoke(Call.java:1776) > at > stock.SparePartInfoSoapBindingStub.getPartInfo(SparePartInfoSo > apBindingStub.java:104) > at stock.Client.main(Client.java:23) > > > > > > but on the server side I see below log message: > > - Using Crypto Engine > [org.apache.ws.security.components.crypto.Merlin] > - Verification successful for URI "#id-16625677" > > Can anyone please tell me why I get axis fault on the client side. > > > > > 2. I want to see the BinarySecurityToken element in the request soap > message. Say something like below : > > <wsse:BinarySecurityToken wsu:Id="A1UdAQQ8MDqAEEVs" > ValueType="wsse:X509v3" EncodingType="wsse:Base64Binary"> > MIIEZzCCA9CgAwIBAgIQEmtJZc0 > </wsse:BinarySecurityToken> > > > and so what is the "action" attibute value in client_config.wsdd on my > client side. > I have tried setting the value to "UsernameTokenSignature" like below > but it did not help me : > > <handler type="java:org.apache.ws.axis.security.WSDoAllSender" > > ..... > <parameter name="action" value="UsernameTokenSignature"/> > ..... > </handler> > > > > Please suggest ... > > > > > Thanks & Regards, > Kumar. >
