没有端点监听GPS服务可以接受该消息。这通常是由错误的地址或SOAP操作引起的。

时间:2014-03-18 10:13:34

标签: c# web-services

动态GP 2013安装程序在服务器(Windows Server 2008 R2)上成功完成。在SQL Server 2008 R2上自动创建数据库。创建服务并运行这些服务。

在Visual Studio 2012上获取控制台应用程序并添加Dynamic GP的Web服务。 http://MyDomainName:48620/Dynamics/GPService/mex

使用示例代码测试下面给出的内容:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using  WebServiceConsoleApp.DynamicGPAtTen;
using System.ServiceModel;

namespace WebServiceConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            CompanyKey companyKey;
            Context context;
            Vendor vendor;
            VendorKey vendorKey;
            Policy vendorPolicy;

            // Create an instance of the service
            DynamicsGPClient wsDynamicsGP = new DynamicsGPClient();

            // Create a context object with which to call the web service
            context = new Context();

            // Specify which company to use (sample company)
            companyKey = new CompanyKey();
            companyKey.Id = (-1);

            // Set up the context
            context.OrganizationKey = companyKey;

            // Create a new vendor key
            vendorKey = new VendorKey();
            vendorKey.Id = "TstVndr0001";

            // Populate the vendor object
            vendor = new Vendor();
            vendor.Key = vendorKey;
            vendor.Name = "TestVendor0001";

            // Get the create policy for the vendor
            vendorPolicy = wsDynamicsGP.GetPolicyByOperation("CreateVendor",  context);

            // Create the vendor
            wsDynamicsGP.CreateVendor(vendor, context, vendorPolicy);

            // Close the service
            if (wsDynamicsGP.State != CommunicationState.Faulted)
            {
                wsDynamicsGP.Close();
            }
        }
    }
}

运行应用程序后,会显示以下错误消息:

There was no endpoint listening at http://MyDomainName:48620/Dynamics/GPService/GPService that could accept the message. This is often caused by an incorrect address or SOAP action.

有任何想法要解决吗?

图片详情信息

enter image description here

1 个答案:

答案 0 :(得分:1)

Windows服务

检查以下Windows服务是否正在运行(开始>所有程序>管理工具>服务):

  • Microsoft Dynamics GP服务主机
  • eConnect for Microsoft Dynamics GP 2013年整合服务

在浏览器中打开以下网址检查旧版本:

http://MyDomainName:48620/DynamicsGPWebServices

在浏览器中打开以下网址检查原生版本:

http://MyDomainName:48620/Dynamics/GPService

不工作?

如果两者都不起作用,请尝试检查所有这些内容:http://support.microsoft.com/kb/950844

如果您在上述任何阶段遇到任何问题,请告诉我们。