2011-09-12 4 views
2

Magento実装のエンドポイントをC#で動的に設定する必要がありますが、web.configのエンドポイントパスと資格情報のC#のデフォルトチェックをオーバーライドすることはできません。C#でMagentoのエンドポイントを動的に作成

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

私のサービスは現在、次のようになります。ログイン時に

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つのエンドポイントが設定されていることを述べています。

私はどこにでも見えましたが、解決策を見つけることができません。

ありがとうございます!

答えて

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); 
関連する問題