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. php函数的可变参数

    <?php function add() { $arr = func_get_args(); //func_num_args() $sum =0; for($i=0;$i<count($a ...

  2. 例子:Background Agent Sample

    通过本例程学习: 后台代理Agent的使用方法 定期代理(PeriodicTask)来说,限制了: 有一些API不能使用,并不是说你不调用就可以了,只要你在同一个程序集里使用了这些API,就不会通过验 ...

  3. C# WinForm控件之Dock顺序调整

    最近被.net winform中的控件布局搞困惑了,由于控件都是使用Dock方式的,操作起来也是比较方便,如果最大化,窗口大小调整等,都可以随着窗口大小的变化而变化. 但问题是,.net winfor ...

  4. Ubuntu中查看32还是64

    安装ubuntu在pc上,不推荐在32位pc安装64位操作系统,64位pc安装32位操作系统 方法/步骤   1 按ctrl+shift+t 快捷键,打开终端,输入sudo uname --m ,按下 ...

  5. [转]lua面向对象编程之点号与冒号的差异详细比较

    首先,先来一段在lua创建一个类与对象的代码 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Class = {} Class.__index = Cl ...

  6. Smart210学习记录------linux串口驱动

    转自:http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=27025492&id=327609 一.核心数据结构 串口驱动有 ...

  7. 移动互联网实战--Web Restful API设计和基础架构

    前言: 在移动互联网的大潮中, Web Restful API逐渐成为Web Server重要的一个分支. 移动端和服务端的交互, 主流的方式还是通过Http协议的形式来进行. 请求以Get/Post ...

  8. Scramble String

    Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrin ...

  9. UVA 10474 大理石在哪 lower_bound

    题意:找输入的数在排完序之后的位置. 主要是lower_bound 函数的使用.它的作用是查找大于或者等于x的第一个位置. #include<cstdio> #include<alg ...

  10. 【ZJOI2004】嗅探器

    练tarjian不错的题,连WA几次后终于会记住tarjian的模板了 原题: 某军搞信息对抗实战演习.红军成功地侵入了蓝军的内部网络.蓝军共有两个信息中心.红军计划在某台中间服务器上安装一个嗅探器, ...