Simon Fell > Its just code > more on Indigo

Tuesday, May 24, 2005

Got the new drop installed, although the final step, which I think is the docs, died with an AV. The good news is that the SSL problems that were plaguing me are gone, but I ran into one new problem, the generated config file just doesn't seem to work, calls to new SoapProxy("Soap") return an error

Unhandled Exception: System.InvalidOperationException: Could not find Channel element for configuration name Soap and contractType Soap, client, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
at System.ServiceModel.Design.ConfigLoader.LoadChannelDescription(ChannelDescription channelDescription, ContractDescription contract, String configurationName, EndpointAddress address)
at System.ServiceModel.Design.ChannelLoader..ctor(Type contractType, String configurationName, EndpointAddress address)
at System.ServiceModel.ChannelFactory`1..ctor(String configurationName)
at System.ServiceModel.ProxyBase`1..ctor(String configurationName)
at client.Main(String[] args)

The problem with the missing Position attributes in the generated code is still there, but the problem around arrays not being declared as arrays is fixed. I was able to put together a quick sample that created some accounts and queried them back.

I finally worked out what it is about the programming model that bugs me, I have to create a request object that represents the entire request message, yet the proxy still have methods on it for each operation, so you end up with code like

create_RequestMessage crm = new create_RequestMessage();
// populate all the headers and body for crm
proxy.create(crm)

It seems weird that the operation to be invoked is both embodied by the type of the create message, and the method I pass it to on the proxy, It feels like some halfway house between the RPC style, and a more messaging style.