on 01-19-2017 8:11 AM
Hi All,
I working on a requirement where I am generating SOAP Envelope for WSSE security and hard coding the username and pwd for security setting check via xslt code.This code is taking the input xml in SOAP body and adding SOAP envelope.
Now the requirement is to make the user id and pwd dynamic with using parameterized mapping.
Can anyone help me in achieving the requirement via XSLT parameterised code.
Thanks,
Nida
Hi Manideep,
Checkraghuraman.sritharan blog:
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks to all for helping me. We have achieved it by Dynamic configuration UDF and XSLT mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mandeep,
Please comment the final solution of your last problem and the key XSL instructions that you have written. In this way you can help more scn members in the future 🙂
Regards.
Hi Manideep!
You can get access to Dynamic Configuration directly from XSL transformation:
https://help.sap.com/saphelp_nwpi71/helpdata/en/43/03fe1bdc7821ade10000000a1553f6/content.htm
You just need to use simple java mapping before your XSLT mapping which moves input parameters to Dynamic Configuration.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Inaki,
I have tried this blog and written my java code but failure is coming in XSLT code.
The first argument to the non-static Java function getValue is not a valid object reference., javax.xml.transform.TransformerConfigurationException: The first argument to the non-static Java function getValue is not a valid object reference.
My xslt code:
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:javamap="java:DynamicUserNameandPassword.CreateDynamicWSSE" > <xsl:param name="inputparam"/> <xsl:template match="/"> <soapenv:Envelope xmlns:ns="http://www.sabrix.com/services/customermanagementservice/2011-05-27" xmlns:ns1="http://www.sabrix.com/services/domainmodel/2011-05-27" 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"> <wsse:UsernameToken wsu:Id="UsernameToken-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:Username> <xsl:value-of select="javamap:getValue($inputparam,USERNAME)" /> </wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">Pass@123</wsse:Password> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> <xsl:copy-of select="*"/> </soapenv:Body> </soapenv:Envelope> </xsl:template> </xsl:stylesheet>
Please guide.
Regards,
Mani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.