AX2009配置AIF WCF服务教程

需积分: 9 15 下载量 22 浏览量 更新于2024-09-13 收藏 362KB DOCX 举报
"本文档详细介绍了如何在AX2009中配置并使用AIF (Application Integration Framework) 来生成和部署WCF服务。" 在Microsoft Dynamics AX 2009中,AIF是一个关键组件,它允许系统与其他应用程序进行集成和数据交换。通过AIF,你可以创建Web服务,使得外部系统能够访问和操作AX2009中的业务数据。以下是配置AIF以生成WCF服务的详细步骤: 1. **安装AIF组件** 要安装AIF,首先需要重新运行`setup.exe`安装程序,并选择“添加或修改组件”选项。确保.NET Business Connector已经安装,因为AIF Web服务的安装需要这个前提。 2. **配置虚拟目录** 安装过程中,会提示你为虚拟目录提供默认名称,记住这个名字以备后续使用。虚拟目录用于存放AIF Web服务的相关文件。 3. **创建AIF网站** 在AX2009中,进入“基本设置”->“设置”->“应用程序框架”->“网站”。在这里创建一个新的网站记录,指定名称和虚拟目录的共享路径。此路径应指向安装AIF后在C:\Program Files\Microsoft Dynamics AX\50下生成的AifWebServices共享文件夹。 4. **创建服务** - 新增一个类,并设置其`RunOn`属性为`Server`。这将确保服务在服务器端运行。 - 创建新的Service,定义其命名空间为`http://schemas.microsoft.com/dynamics/2008/01/services`,并关联新创建的类。随后,添加Operations以定义服务的行为。 5. **启用和生成服务** 在“基本设置”->“设置”->“应用程序框架”->“服务”中,刷新列表,找到刚刚创建的服务,勾选“已启用”,然后点击“生成”按钮。这将创建WCF服务的元数据,并使其可供外部调用。 6. **测试WCF服务** 使用IIS管理器,找到Default Website下的Microsoft Dynamics AX Aif50站点,可以查看生成的WCF服务。通过发送请求到这些服务,你可以测试它们是否正常工作。 配置完成后,外部系统可以通过WCF服务与AX2009进行交互,例如,进行数据导入导出、业务流程自动化等。AIF提供了丰富的接口和工具,使得集成过程更加灵活和高效。注意,为了确保安全,你可能还需要配置身份验证和权限,以限制对AX2009数据的访问。 在实际操作中,可能还会遇到其他问题,如IIS配置、防火墙设置、错误调试等。因此,熟悉AX2009的错误日志和调试工具至关重要,它们能帮助你快速定位并解决问题。同时,遵循最佳实践,定期更新和维护AIF配置,以确保系统的稳定性和安全性。
2023-05-18 上传

function [mag,ax,ay, or] = Canny(im, sigma) % Magic numbers GaussianDieOff = .0001; % Design the filters - a gaussian and its derivative pw = 1:30; % possible widths ssq = sigma^2; width = find(exp(-(pw.*pw)/(2*ssq))>GaussianDieOff,1,'last'); if isempty(width) width = 1; % the user entered a really small sigma end gau=fspecial('gaussian',2*width+1,1); % Find the directional derivative of 2D Gaussian (along X-axis) % Since the result is symmetric along X, we can get the derivative along % Y-axis simply by transposing the result for X direction. [x,y]=meshgrid(-width:width,-width:width); dgau2D=-x.*exp(-(x.*x+y.*y)/(2*ssq))/(pi*ssq); % Convolve the filters with the image in each direction % The canny edge detector first requires convolution with % 2D gaussian, and then with the derivitave of a gaussian. % Since gaussian filter is separable, for smoothing, we can use % two 1D convolutions in order to achieve the effect of convolving % with 2D Gaussian. We convolve along rows and then columns. %smooth the image out aSmooth=imfilter(im,gau,'conv','replicate'); % run the filter across rows aSmooth=imfilter(aSmooth,gau','conv','replicate'); % and then across columns %apply directional derivatives ax = imfilter(aSmooth, dgau2D, 'conv','replicate'); ay = imfilter(aSmooth, dgau2D', 'conv','replicate'); mag = sqrt((ax.*ax) + (ay.*ay)); magmax = max(mag(:)); if magmax>0 mag = mag / magmax; % normalize end or = atan2(-ay, ax); % Angles -pi to + pi. neg = or<0; % Map angles to 0-pi. or = or.*~neg + (or+pi).*neg; or = or*180/pi; % Convert to degrees. end

2023-05-22 上传

# Look through unique values in each categorical column categorical_cols = train_df.select_dtypes(include="object").columns.tolist() for col in categorical_cols: print(f"{col}", f"Number of unique entries: {len(train_df[col].unique().tolist())},") print(train_df[col].unique().tolist()) def plot_bar_chart(df, columns, grid_rows, grid_cols, x_label='', y_label='', title='', whole_numbers_only=False, count_labels=True, as_percentage=True): num_plots = len(columns) grid_size = grid_rows * grid_cols num_rows = math.ceil(num_plots / grid_cols) if num_plots == 1: fig, axes = plt.subplots(1, 1, figsize=(12, 8)) axes = [axes] # Wrap the single axes in a list for consistent handling else: fig, axes = plt.subplots(num_rows, grid_cols, figsize=(12, 8)) axes = axes.ravel() # Flatten the axes array to iterate over it for i, column in enumerate(columns): df_column = df[column] if whole_numbers_only: df_column = df_column[df_column % 1 == 0] ax = axes[i] y = [num for (s, num) in df_column.value_counts().items()] x = [s for (s, num) in df_column.value_counts().items()] ax.bar(x, y, color='blue', alpha=0.5) try: ax.set_xticks(range(x[-1], x[0] + 1)) except: pass ax.set_xlabel(x_label) ax.set_ylabel(y_label) ax.set_title(title + ' - ' + column) if count_labels: df_col = df_column.value_counts(normalize=True).mul(100).round(1).astype(str) + '%' for idx, (year, value) in enumerate(df_column.value_counts().items()): if as_percentage == False: ax.annotate(f'{value}\n', xy=(year, value), ha='center', va='center') else: ax.annotate(f'{df_col[year]}\n', xy=(year, value), ha='center', va='center', size=8) if num_plots < grid_size: for j in range(num_plots, grid_size): fig.delaxes(axes[j]) # Remove empty subplots if present plt.tight_layout() plt.show()

2023-06-11 上传