Once again I'll just make a comment about this error. When using Dataset across a WCF service the service call may fail with the error "No Corresponding Start Element Open". The error makes perfect sense once you know the answer, but to the uninitiated it might be perplexing.
The problem is that the return value of the service call is a Dataset. If you return null from the service call then the client will see this error. The answer, well it depends on what you want to achieve. But probably just return an empty dataset and then test the contents on the client (which should be done anyway for good coding practice).
Instant Development: Frustrating Error: No Corresponding Start Element Open
Friday, March 07, 2008
WCF client says 'No Corresponding Start Element Open'
Posted by
Unknown
3
comments
Labels: C#, Tips, WCF, Web Services
Wednesday, February 20, 2008
Global and tidy exception handling for ScriptService
Faced with a handful of ScriptService for the site I am working on, I would like to implement some common exception handling across all the methods. Not to change the behaviour on the client, but rather to capture the exceptions and post the to an exception log or an email or something...
So there are solutions to this for traditional WebServices. See the SoapExtension mechanism documentation provided by Microsoft Handling and Throwing Exceptions in XML Web Services and SOAP Message Modification Using SOAP Extensions. But as we all know the ScriptService mechanism doesn't use the SOAP message stack.
Which brings us to the point Ayende makes ASP.Net Ajax, Error Handling and WTF. I'm not sure whether this is entirely correct that there are no hooks to provide custom handling in the ScriptService lifecycle.
Maybe I'll get a chance to investigate myself one day, but for the moment there just isn't time....
Posted by
Unknown
0
comments
Labels: AJAX, ASP.Net, WCF, Web Services
Tuesday, October 23, 2007
Frustrating Error: No Corresponding Start Element Open
If you have been searching and have found this then you have probably had a frustrating hour or more with an error of "No Corresponding Start Element Open". No doubt you have rebuilt your WCF service, updated the service reference, maybe even removed and re added the service reference. Still you'll have the error.
So maybe one of a couple of things are happening. If your client is not WCF then maybe the generation of the service proxy is making some parameters optional in the request or response. In this case have a read of this article to get a better idea of what is happening.
Eugene Osovetsky's Blog : Solving the "disappearing data" issue when using Add Web Reference or Wsdl.exe with WCF services
However, in my case I have WCF as the client - something else is awry. One thing to check is if you have a Dataset in your method signature. If the service call is returning null instead of a Dataset instance then this error will come up. There are a couple of options - return an empty Dataset or set the EmitDefaultValue attribute on the argument. Read more about that here No Corresponding Start Element Open
Posted by
Unknown
0
comments
Labels: ASP.Net, WCF, Web Services