顶点标注中的自定义SOAP信封命名空间

时间:2017-03-14 14:30:04

标签: web-services soap apex callout

我正在创建一个对Siebel的SOAP调用,并默认情况下获取SOAP信封标题:

<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header>
    <Security
        xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
        <UsernameToken>
            <Username>myUsername</Username>
            <Password>myPassword</Password>
        </UsernameToken>
    </Security>
</env:Header>
<env:Body>
 ----------

虽然siebel期待:

 <env:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"         xmlns:cus="http://siebel.com/customlink" xmlns:abcd="http://www.siebel.com/xml/xyz"
<env:Header>
    <Security
        xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
        <UsernameToken>
            <Username>myUsername</Username>
            <Password>myPassword</Password>
        </UsernameToken>
    </Security>
</env:Header>
<env:Body>
 ----------

当我从apex(由siebel提供的WSDL创建的类)创建Web服务标注时,能否帮助您如何在SOAP标头中添加xmlns:cus和xmlns:abcd

1 个答案:

答案 0 :(得分:0)

请记住,在Siebel中,您始终可以使用自定义筛选业务服务来拦截邮件(入站和/或出站)。有时这对于记录消息同时剥离诸如凭证之类的敏感信息之类的事情是有用的,但是它也可以用于在必要时转换消息(例如,某些系统可能不喜欢mustUnderstand属性,其他系统可能需要命名空间属性)剥离或添加,其他人可能需要添加/删除自定义上下文标题等。 Siebel书架中的集成文档提供了有关如何通过脚本修改消息的示例。

相关问题