码迷,mamicode.com
首页 > 数据库 > 详细

C#调用Oracle ebs生成Webservice,加用户名密码验证

时间:2015-12-10 19:31:51      阅读:678      评论:0      收藏:0      [点我收藏+]

标签:

public void GetDept()
        {
            CUX_BASEINFO_OA_PKG_Service client = new CUX_BASEINFO_OA_PKG_Service();
            var inputParameters = new InputParameters();
            inputParameters.P_ACTION_ID = "1";

            var userToken = new UsernameToken("ERP_API", "qazwsx12345", PasswordOption.SendPlainText); //需要usertoken

            var context = client.RequestSoapContext;
            context.Security.Tokens.Add(userToken);
            context.Security.Elements.Add(new MessageSignature(userToken));



            var SOAHeader = new SOAHeader();//soapheader的参数中没有username和password,需要创建usertoken
            SOAHeader.Responsibility = "APPLICATION_DEVELOPER";
            SOAHeader.RespApplication = "FND";
            SOAHeader.SecurityGroup = "STANDARD";
            SOAHeader.NLSLanguage = "SIMPLIFIED CHINESE";
            SOAHeader.Org_Id = "81";
            client.SOAHeaderValue = SOAHeader;
            
            var OutputParameters=  client.CUX_GET_BASEINFO_TO_OA(inputParameters);
        }

 

C#调用Oracle ebs生成Webservice,加用户名密码验证

标签:

原文地址:http://www.cnblogs.com/wuday/p/5036595.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!