0

おそらく単純なものが欠けているのでしょうが、それとの戦いにうんざりしています。ストック AIF サービスに接続するための例はかなりあるようですが、カスタム サービスに接続するための簡潔で実用的な例をまだ見つけていません。

以下を仮定します。

Service reference configured in the project with a namespace of MyService

That service has two methods exposed from Dynamics AX that we'll call:   
     helloWorld()    and   helloWorld2(str yourName)

Each method returns a simple string

各メソッドを呼び出して結果をラベルに書き込むには、どの C# コードを使用しますか?

助けてくれてありがとう。

4

1 に答える 1

2
using [MyProjectName].MyService;

...

MyServiceClient client = new MyServiceClient();
CallContext context = new CallContext();
label1.Text = client.helloWorld(context);

MyServiceClient client = new MyServiceClient();
CallContext context = new CallContext();
label1.Text = client.helloWorld2(context, "test");

...

于 2012-02-01T16:27:30.800 に答える