2012-12-17 71 views
2

我试图消耗基于Java的web服务,每次我尝试连接我得到的只是这样一个errror:C#消耗的Java SOAP服务的WSSecurity

org.apache.ws.security.WSSecurityException:安全令牌 未经过认证或授权;

服务管理员说我应该发送用AES密钥加密的密码,他发给我。

多数民众赞成我有我的web.config到目前为止

<client> 
     <endpoint address="http://webservicer2:8088/billing/" 
     binding="basicHttpBinding" bindingConfiguration="ServiceBill3" 
     contract="ServiceBilling.ServiceBillingContract" name="ServiceBill3"> 
     <headers> 
      <wsse:Security soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" 
      soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" 
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> 
      <wsse:UsernameToken wsu:Id="UsernameToken-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> 
       <wsse:Username>ohmygod</wsse:Username> 
       <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">bbqsauce</wsse:Password> 
      </wsse:UsernameToken> 
      </wsse:Security> 
     </headers> 
     </endpoint> 
    </client> 

当我尝试对服务执行任何方法的错误发生。我应该修改什么来添加我的密钥? 有人吗?

回答

0

在WSSE试试这个密码类型:密码

http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest