Simon Fell > Its just code > A (Disappointing) evening with Indigo

Tuesday, April 19, 2005

I worked around the previous problem with Indigo and Sforce and continued my exploration, and I now have the distinct impression that everyone who's trying Indigo out is doing Indigo -> Indigo testing, because well frankly for anything else it appears be fairly broken.

In addition I see my favorite compliant from ASMX is now in Indigo as well, I really really really hope they do something about this, it seems ridiculous to hobble Indigo with all the AMSX v1.0 decisions. I also hope that Don & Co's work on the programming model just hasn't made it to the client end yet, because it seems pretty yucky so far. (I know this is all early access beta, I just some feedback will make a difference), e.g. here's a call to Login, that dumps the resulting sessionId and serverUrl to the console

SoapProxy proxy = new SoapProxy(new EndpointAddress(""), new BasicProfileBinding());
login_RequestMessage loginMsg = new login_RequestMessage();
loginMsg.username = "";
loginMsg.password = "hahahahaha";
login_ResponseMessage lr = proxy.login(loginMsg);
LoginResult res = lr.result;

Compare this with .NET 1.1, note that in this case the programmer doesn't need to manually extract the endpoint URL from the WSDL and put it in his code

sforce.SforceService svc = new sforce.SforceService();
sforce.LoginResult lr = svc.login(username, password);

All the above bugs meant i couldn't actually test much further than this, but it appears that the client is going to be responsible for hanging onto the header state (such as the SessionHeader) between each call and set it on every RequestMessage instance before calling the proxy. Perhaps I'm just doing something wrong, but I couldn't find much docs on using Indigo to call other non Indigo services. The wsdl was processed with svcutil /uxs /tm enterprise.wsdl which seems to be the only way it'll handle the sforce WSDL.