使用 XSL 更改 Siebel 服务的肥皂用户名令牌和肥皂消息密码
我正在尝试拦截 Web 服务调用,以使用 xsl 更改 Web 服务的用户凭据(用户名令牌和密码)。
SO 调用就像客户端 -->拦截器(更改用户凭据)+任何其他更改 -->调用原oracle ERP/Siebel Web服务。
这是通过 xsl 完成的...我尝试了各种选项,但没有成功... 非常需要这方面的帮助...搜索了很多网站但找不到正确的答案。
下面给出了 Web 服务请求的示例:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://siebel.com/CustomUI" >
<soapenv:Header>
<UsernameToken xmlns="http://siebel.com/webservices">Bill</UsernameToken>
<PasswordText xmlns="http://siebel.com/webservices">Gates</PasswordText>
<SessionType xmlns="http://siebel.com/webservices">None</SessionType>
</soapenv:Header>
<soapenv:Body>
<cus:SiebelService>
<a>testvalue1</a>
<b>testvalue2</b>
</cus:SiebelService>
</soapenv:Body>
</soapenv:Envelope>
应使用 xsl 对其进行转换以提供以下输出:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://siebel.com/CustomUI" >
<soapenv:Header>
<UsernameToken xmlns="http://siebel.com/webservices">Steve</UsernameToken>
<PasswordText xmlns="http://siebel.com/webservices">Balmer</PasswordText>
<SessionType xmlns="http://siebel.com/webservices">None</SessionType>
</soapenv:Header>
<soapenv:Body>
<cus:SiebelService>
<a>testvalue1</a>
<b>testvalue2</b>
</cus:SiebelService>
</soapenv:Body>
</soapenv:Envelope>
I am trying to intercept a web service call, to change the the user credentials of the webservice (username token and password) using xsl.
SO call is like client --> Interceptor (change the user credentials) + any other changes --> Call original oracle ERP/Siebel web service.
This is to be be done through xsl... I tried various options but it didn't work...
Badly need help on this... searched lots of sites but can't find correct answer.
A sample of web service request is given below:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://siebel.com/CustomUI" >
<soapenv:Header>
<UsernameToken xmlns="http://siebel.com/webservices">Bill</UsernameToken>
<PasswordText xmlns="http://siebel.com/webservices">Gates</PasswordText>
<SessionType xmlns="http://siebel.com/webservices">None</SessionType>
</soapenv:Header>
<soapenv:Body>
<cus:SiebelService>
<a>testvalue1</a>
<b>testvalue2</b>
</cus:SiebelService>
</soapenv:Body>
</soapenv:Envelope>
This should be transformed using xsl to give following output:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://siebel.com/CustomUI" >
<soapenv:Header>
<UsernameToken xmlns="http://siebel.com/webservices">Steve</UsernameToken>
<PasswordText xmlns="http://siebel.com/webservices">Balmer</PasswordText>
<SessionType xmlns="http://siebel.com/webservices">None</SessionType>
</soapenv:Header>
<soapenv:Body>
<cus:SiebelService>
<a>testvalue1</a>
<b>testvalue2</b>
</cus:SiebelService>
</soapenv:Body>
</soapenv:Envelope>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此转换:
应用于提供的 XML 文档时:
产生所需结果:
说明:选择命名 wose 元素位于默认命名空间中是常见问题解答。在 xpath 和 xslt 标签中搜索“默认命名空间”。
This transformation:
when applied on the provided XML document:
produces the wanted result:
Explanation: Selecting Names wose elements are in a default namespace is a FAQ. Search the xpath and xslt tags for "default namespace".