zoukankan      html  css  js  c++  java
  • .net wcf调用java的需要认证的接口

    1、wcf直接添加java的webservice地址,这都是常规操作,没必要好说

    2、修改config配置文件,添加headers消息头节点,这个需要注意

    3、OK直接调用里面的方法即可,全部搞定

     1  <system.serviceModel>
     2     <bindings>
     3       <basicHttpBinding>
     4         <binding name="UserServiceImplServiceSoapBinding" />
     5       </basicHttpBinding>
     6     </bindings>
     7     <client>
     8       <endpoint address="http://iamldap.foton.com.cn:9080/IAMService/services/soap/userService"
     9           binding="basicHttpBinding" bindingConfiguration="UserServiceImplServiceSoapBinding"
    10           contract="wcuser.IuserService" name="UserServiceImplPort">
    11         <headers>
    12           <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    13             <wsse:UsernameToken>
    14               <wsse:Username>fotonAppQCTSsys</wsse:Username>
    15               <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">QCTSsys</wsse:Password>
    16             </wsse:UsernameToken>
    17           </wsse:Security>
    18         </headers>
    19       </endpoint>
    20     </client>
    21   </system.serviceModel>
  • 相关阅读:
    团队开发-第一阶段冲刺-10
    团队开发-第一阶段冲刺-09
    Spring(三)
    第五周总结
    Spring(一)
    程序员修炼之道:从小工到专家阅读笔记1
    MyBatis(三)
    MyBatis(二)
    MyBatis
    第四周总结
  • 原文地址:https://www.cnblogs.com/systemnet123/p/5969877.html
Copyright © 2011-2022 走看看