2

C# を使用して Magento 実装のエンドポイントを動的に設定する必要がありますが、web.config のエンドポイント パスと資格情報の C# の既定のチェックをオーバーライドできません。

誰もこれを行う方法を知っていますか?

私のサービスは現在次のようになっています。

 using (Mage_Api_Model_Server_V2_HandlerPortTypeClient proxy = new Mage_Api_Model_Server_V2_HandlerPortTypeClient("NameOfEndpoint", ConnectionCurrent.WsdlPath))
 {
      string sessionKey = proxy.startSession();
      string loginSession = proxy.login(ConnectionCurrent.UserName, ConnectionCurrent.Password);

 ...

ログインすると、2 つのエンドポイントが構成されていると表示されます。

私はどこでも見ましたが、解決策が見つかりません。

ありがとう!!

4

1 に答える 1

0

これは WCF を使用していますが、古い Web サービスの実装でも同様に行われます。

EndpointAddress endPoint = new EndpointAddress("http://some.endpoint.addr");
Binding binding = new WSHttpBinding(SecurityMode.None);
var service = new Mage_Api_Model_Server_V2_HandlerPortTypeClient(binding, endpoint);
于 2011-09-13T15:19:48.650 に答える