Consuming a Web Service in AX 2012

在AX2012版本中如果想调用外部的Web Service变得非常容易。

第一步,在VS中创建一个Web Service并发布

第二步,创建一个Class Library,并将创建的Web Services引用到该类库当中,并ADD to AOD中

第三步,用JOB调用该Web Services,运行Job

static void KimConsumeWebService(Args _args)
{
ClassLibrary1.Class1 webService;
ClassLibrary1.ServiceReference1.WebService1SoapClient clients;
System.ServiceModel.Description.ServiceEndpoint endPoint;
System.ServiceModel.EndpointAddress endPointAddress;
System.Type type;
System.Exception ex;
;
try
{
type = CLRInterop::getType('ClassLibrary1.ServiceReference1.WebService1SoapClient');
clients = AifUtil::createServiceClient(type);
print clients.Kim();
pause;
}
catch(Exception::CLRError)
{
ex = CLRInterop::getLastException(); while(ex)
{
info(CLRInterop::getAnyTypeForObject(ex.ToString()));
ex = ex.get_InnerException();
}
}
}

Consuming a Web Service in AX 2012的更多相关文章

  1. Dynamics AX 2012 R2 安装 AIF IIS上的Web服务

    1.为什么使用IIS上的WEB服务 组件? 如果你要在Dynamics AX Service中使用HTTP Adapter,那么你就要安装IIS上的WEB服务 组件.HTTP Adapter会在IIS ...

  2. 【转载】在 Visual Studio 2012 中创建 ASP.Net Web Service

    在 Visual Studio 2012 中创建 ASP.Net Web Service,步骤非常简单.如下: 第一步:创建一个“ASP.Net Empty Web Application”项目 创建 ...

  3. Consuming a RESTful Web Service

    本篇文章将介绍使用Spring来建立RESTful的Web Service. 我们通过一个例子来说明这篇文章:这个例子将会使用Spring的RestTemplate来从Facebook的提供的API中 ...

  4. Error in WCF client consuming Axis 2 web service with WS-Security UsernameToken PasswordDigest authentication scheme

    13down votefavorite 6 I have a WCF client connecting to a Java based Axis2 web service (outside my c ...

  5. Part 17 Consuming ASP NET Web Service in AngularJS using $http

    Here is what we want to do1. Create an ASP.NET Web service. This web service retrieves the data from ...

  6. Web Service 中返回DataSet结果大小改进

    http://www.cnblogs.com/scottckt/archive/2012/11/10/2764496.html Web Service 中返回DataSet结果方法: 1)直接返回Da ...

  7. Dynamics AX 2012 R2 安装Reporting Services 扩展

    今天Reinhard在VS中部署SSRS报表时,接到以下错误: 部署因错误而被取消.在报表服务器上,验证:-SQL Server Reporting Services 服务是否正在运行. 接着,Rei ...

  8. Dynamics AX 2012 R2 配置报表服务器

    今天Reinhard在使用报表的过程中,发现以下错误: The default Report Server Configuration ID could not be found in the SRS ...

  9. AX 2012 EP服务器配置多个环境

    AX 2012 如何在一台服务器配置不同环境的EP站点 安装完EP后,修改对应站点的web.config文件,指定需要连接的客户端配置文件路径即可,如下图: ` ``````````````````` ...

随机推荐

  1. 二叉搜索树 C++代码实现

    暂未发现什么bug,如果发现请指出. #include<iostream> using namespace std; //定义二叉搜索树的结点 struct Node { int data ...

  2. Java甘特图控件swing版免费下载地址

    FlexGantt 控件是现在Java 平台下最先进的甘特图解决方案,使用一个很高的抽象层次,能适用于多种不同的域,例如 ERP 系统.生产计划和日程安排.制造流程系统或项目公文管理程序等.这些使得 ...

  3. UE4 异步资源加载

    http://blog.csdn.net/pizi0475/article/details/48178861 http://blog.sina.com.cn/s/blog_710ea1400102vl ...

  4. Classes

    Class Organization Following the standard Java convention, a class should begin with a list of varia ...

  5. Android Priority Job Queue (Job Manager):多重不同Job并发执行并在前台获得返回结果(四)

     Android Priority Job Queue (Job Manager):多重不同Job并发执行并在前台获得返回结果(四) 在Android Priority Job Queue (Jo ...

  6. Smart210学习记录----nand flash驱动

    [详解]如何编写Linux下Nand Flash驱动  :http://www.cnblogs.com/linux-rookie/articles/3016990.html 当读写文件请求到来的时候, ...

  7. Activity 属性设置大全

    activity属性设置大全 android:allowTaskReparenting=["true"|"false"] 是否允许activity更换从属的任务 ...

  8. 详解Objective-C runtime

    感谢翻译小组成员wingpan热心翻译.本篇文章是我们每周推荐优秀国外的技术类文章的其中一篇.如果您有不错的原创或译文,欢迎提交给我们,更欢迎其他朋友加入我们的翻译小组(联系qq:2408167315 ...

  9. 解决CentOS6.4 Docker "Couldn't connect to Docker daemon ..." 问题

    OS: CentOS6.4 #uname -r 2.6.32-504.1.3.el6.x86_64 安装完毕fig,并完成相应配置时执行如下命令出错(fig安装参见:http://www.fig.sh ...

  10. 【转】AngularJS 取消对 HTML 片段的转义

    今天尝试用 Rails 做后端提供 JSON 格式的数据, AngularJS 做前端处理 JSON 数据,其中碰到 AngularJS 获取的是一段 HTML 文本,如果直接使用 data-ng-b ...