websphere - Different SOAP namespaces in different environments -
I wrote a client (Java) for a web service that needed WS Security headers. I used cxf to generate my sources from WSDL when I run my customer on the Tomcat, it works fine, however, when I take it to the webserver, I get a mistake in service This signature is invalid. I compared the generated soap envelope and all the tags and key values matched between the two tags are the same. The only difference is that WAS has added namespace to SoPenk, XSI and XSD. These prefixes are added to the included namespace of the canonized method. And what I have read can be found in the mix of signature. I can not tell if the webserver is adding these or if it is possibly the second version of a class picked up. Either way, the webservice will not accept it with these namespaces. Can they be removed?
Including WebSphere Namespaces
& lt; Soap: Envelope xmlns: Soap = "http://schemas.xmlsoap.org/soap/envelope/" Xmlns: Soapenk = "http://schemas.xmlsoap.org/soap/encoding/" xmlns: xsd = "http: //www.w3.org/2001/XMLSchema "xmlns: xsi =" http: // www. W3.org/2001/XMLSchema-instance"> & Lt; Soapenv: header xmlns: soap = "http://schemas.xmlsoap.org/soap/envelope/" & gt; WebSpace canonized tag
& lt; Ds: Transformation algorithm = "http://www.w3.org/2001/10/xml-exc-c14n #" & gt; & Lt; Ec: inclusive namespace xmlns: ec = "http://www.w3.org/2001/10/xml-exc-c14n#" prefix list = "simplicx xsd xsi" /> & Lt; / DS: Convert & gt; & Lt; / DS: Transforms & gt; Comet namespace should be included
& lt; Soap: Envelope xmlns: Soap = "http://schemas.xmlsoap.org/soap/envelope/" & gt; & Lt; SOAP-ENV: header xmlns: SOAP-ENV = "http://schemas.xmlsoap.org/soaf/envelope/" & gt; Tommack canonized tag
& lt; DS: Transforms & gt; & Lt; Ds: Transformation algorithm = "http://www.w3.org/2001/10/xml-exc-c14n#" & gt; & Lt; Ec: Inclusive namespace xmlns: ec = "http://www.w3.org/2001/10/xml-exc-c14n#" prefix = "wsse soap" /> & Lt; / DS: Convert & gt; & Lt; / DS: Transforms & gt; Here's my WSS4jOutInterceptor Spring Config (some data has been removed)
gt; creator-argu & gt; & lt; map & gt; & lt; entry key = "Action" value = "Timestamp signature" /> gt; entry key = "signatureproffe file" value = - deleted - /> ; & Lt; Entry key = "EncryptionPropfile" value = - Deleted - /> Entry key = "Encryption User" value = - Deleted - / & gt; Entry key = "useSingl ECertificate "Value =" Right "/> Entry Key =" SignatureKIdentifier "Value =" Direct Reference "/> Entry Key =" PasswordCallbackBack "value = - DELETED - / & gt; & lt; Lt; Entry key = "Signature Purses" value = "{Element} {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd} Timestamp; {Element} {http://schemas.xmlsoap.org/soap/envelope/} Body "/>
Entry Key =" Signature Algorithm "value =" http://www.w3.org/2001/ 04 / xmldsig-more # rsa-sha256 "/>
Entry Key =" sigCanonicalization "value =" http://www.w3.org/2001/10/xml-exc-c14n# "/> ; & Lt; entry key = "signaturedigest algorithm" value = "http://www.w3.org/2001/04/xmlenc#sha256" /> & gt; & gt; Map & gt; & lt; / creator- Arg Edit: Due to some collection in the runtime, does anyone know that the package is a soft envelope in Peru And WebSpace makes 8 runtime? It can be that where the difference exists, any help is greatly appreciated!
These rows fixed the problem .
Map & lt; string, object & gt; CTX = (Binding Provider) Port .getRequestContext (); Ctx.put (WSHandlerConstants.IS_BSP_COMPLIANT, "wrong");
Comments
Post a Comment