首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >WCF Siebel服务认证

WCF Siebel服务认证
EN

Stack Overflow用户
提问于 2015-06-26 18:11:05
回答 1查看 1.2K关注 0票数 0

我正在开发与Siebel EAI webservice的集成,我不知道认证是如何工作的。

下面的请求通常适用于SoapUi:

代码语言:javascript
复制
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:cus="http://siebel.com/CustomUI">
   <soapenv:Header>
  <UsernameToken xmlns="http://siebel.com/webservices">BRBD</UsernameToken>
  <PasswordText xmlns="http://siebel.com/webservices">2015</PasswordText>
  </soapenv:Header>
   <soapenv:Body>
      <cus:GetTransactionForDays_Input>
         <cus:Program_spcName>Loyalty Program – Agroservice</cus:Program_spcName>
         <cus:Days>10</cus:Days>
      </cus:GetTransactionForDays_Input>
   </soapenv:Body>
</soapenv:Envelope>

我需要的是将此请求复制为WCF客户端。我的代码如下所示:

代码语言:javascript
复制
            PartnersWs.BCS_spcLOY_spcPeriod_spcTransactionClient tran = 
                new BCS_spcLOY_spcPeriod_spcTransactionClient("myCustomBinding", 
                    "http://[server]/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute&WSSOAP=1");

            GetTransactionForDays_Input inp = new GetTransactionForDays_Input();
            inp.Days = "1";
            inp.Program_spcName = "Loyalty Program - Puntos Poderosos";

            GetTransactionForDaysRequest req = new GetTransactionForDaysRequest(inp);
            tran.ClientCredentials.UserName.UserName = "BRBD";
            tran.ClientCredentials.UserName.Password = "2015";

            tran.GetTransactionForDays(inp);

我的自定义绑定配置(因为我不想使用https,所以我需要指定allowInsecure):

代码语言:javascript
复制
  <customBinding>
    <binding name="myCustomBinding">
      <transactionFlow />
      <security
          authenticationMode="SecureConversation"
          messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"
          allowInsecureTransport="true" allowSerializedSigningTokenOnReply="true" >
        <secureConversationBootstrap
          authenticationMode="UserNameForSslNegotiated"
          messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10" />
      </security>
      <textMessageEncoding />
      <httpTransport decompressionEnabled="true" useDefaultWebProxy="true"/>
    </binding>
  </customBinding>

服务器的响应是:

代码语言:javascript
复制
The content type text/xml;charset=utf-8 of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 756 bytes of the response were: '<?xml version="1.0" encoding="utf-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode>**<faultstring>
  Error Code: 10944642 Error Message: Error: Inbound SOAP Message - Session Token is missing or invalid or has expired</faultstring>**<detail><siebelf:errorstack xmlns:siebelf="http://www.siebel.com/ws/fault"><siebelf:error><siebelf:errorsymbol /><siebelf:errormsg>Error: Inbound SOAP Message - Session Token is missing or invalid or has expired</siebelf:errormsg></siebelf:error></siebelf:errorstack></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>'.

有什么想法吗?tks

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-07-09 11:18:55

根据Siebel书架,WS-Security (您正在绑定中实现)和Siebel SOAP WS服务中使用的安全头是两个完全不同的东西。

请更正您的绑定不包括WS-安全模型-相反,处理标题字段与任何其他字段(但包含正确的名称空间)。

对Siebel的身份验证也有不同的方法(您可能也想了解这一点):

  • 匿名池(根本不需要身份验证)
  • web服务端点URL中提供的用户名和密码
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31079574

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档