During a migration from SharePoint 2007 to SharePoint 2010, there was a site containing several Forms Libraries and, among them, a library relying on a template calling the UserGroup web service of SharePoint.
So, after the migration of the libraries themselves, the change of the datasources to point to the correct servers and different little other things, we faced the error below when the form was loading :
Or, in full text : “The SOAP response indicates that an error occurred on the server:
Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.
<detail><errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">The parameter name cannot be empty or bigger than 255 characters.</errorstring><errorcode xmlns="http://schemas.microsoft.com/sharepoint/soap/">0x80131600</errorcode></detail>”
Luckily, my colleague Julien told me about the not enough popular blog post of Ian Chivers about using the User Group web service. But, it was not the end. Even after the change of the GetUserCollectionFromGroupX.xsd file as written in the before mentioned post, the message was still displaying. It seemed that the parameter sent to the web service was empty, so the question was “how to set the parameter” ? Our requirement was not to have a dynamic parameter to be set at runtime. It was sufficient to have a constant group sent to the web service. Therefore, after having extracted the files composing the .xsn file, modified the .xsd one, we had to modify the GetUserCollectionFromGroupX.xml to precise the parameter, as follows :
1 <dfs:myFields xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:tns="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2010-12-22T15:30:19" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
The steps after that were easy : opening the .xsf file in design, saving it as a .xsn one and publishing it to the target library.
So, after several hours, we were finally able to connect again the web services, but we spent a quite amount of time in trying, googling and so on. It was then obvious to share and also keep a self note about this topic.
Ah, yes, before closing this post, I take the occasion to congratulate my friend and colleague for his nomination as a Windows Azure MVP : @bsoulier (Benjamin Soulier). Well Done man !