locked
Dynamic Import Export ISV.config XML RRS feed

  • Question

  • I'm fairly sure there is a web service for this, but I had trouble finding it myself.

    I'm building an installer, and need to export the isv.config xml, make a few changes, then re-import the modified xml to add buttons/etc to menus and grids.

    Can anyone point me in the right direction in terms of finding this request object and which service it will relate to?
    Alternatively, if there is another preferred way to do this task, please speak up.
    Monday, August 17, 2009 8:08 AM

Answers

  • Ahh... After passing through a million (slight exaggeration) links in MSDN, i found what I was looking for and resulted in the importexportxml:

                var exportRequest = new ExportXmlRequest
                                        {
                                            ParameterXml = @"<importexportxml>
                                                                <entities/>
                                                                <nodes> 
                                                                   <node>isvconfig</node>
                                                                </nodes>
                                                                <securityroles/>
                                                                <settings/>
                                                                <workflows/>
                                                              </importexportxml>"
                                        };
                using (var service = GetService())
                {
                    var exportResponse = service.Execute(exportRequest);   
                }

    If anyone else is interested, i found what I was looking for form this MSDN url .
    • Marked as answer by Luke Baulch Tuesday, August 18, 2009 12:05 AM
    Tuesday, August 18, 2009 12:03 AM

All replies

  • Hi, Luke.

    Check this url .

    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    • Proposed as answer by Hassan Hussain Monday, August 17, 2009 9:00 AM
    Monday, August 17, 2009 8:12 AM
    Moderator
  • Thanks for the super prompt response.
    I created myself a project with the following code:

            public static void Main()
            {
                var exportRequest = new ExportXmlRequest
                                        {
                                            ParameterXml = @"<importexportxml>
                                                               <entities>
                                                                 <entity>account</entity>
                                                               </entities>
                                                               <nodes/>
                                                             </importexportxml>"
                                        };
                using (var service = GetService())
                {
                    var exportResponse = service.Execute(exportRequest);   
                }
                //... do something here
            }

    When executing the request, I kept receiving this SOAP error:
    "\n  0x80040216\n  An unexpected error occurred.\n  Platform\n"

    Am i doing something wrong?
    Monday, August 17, 2009 8:17 AM
  • Hi.

    Add try..catch statement to your code in manner:

    try
    {
    var exportResponse = service.Execute(exportRequest);   
    }
    catch (SoapException exc)
    {
    throw new Exception(exc.Detail.InnerText);
    }

    this will give you detailed information about exception.
    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    Monday, August 17, 2009 8:31 AM
    Moderator
  • This is the error that I get from the SoapException.Detail.InnerText:
    "\n  0x80040216\n  An unexpected error occurred.\n  Platform\n"

    So, not very descriptive. I got back a result when i changed the importexportxml to this:

            ParameterXml = @"<importexportxml>
                                                                <entities>
                                                                   <entity>account</entity>
                                                                </entities>
                                                                <nodes> 
                                                                   <node>templates</node>
                                                                </nodes>
                                                                <securityroles/>
                                                                <settings/>
                                                                <workflows/>
                                                              </importexportxml>"

    I was hoping for the xml for altering menu/grid buttons etc.. How would i modify the above xml to retrieve this data, assuming this is the correct service/request to use for such data.
    Monday, August 17, 2009 11:31 PM
  • Ahh... After passing through a million (slight exaggeration) links in MSDN, i found what I was looking for and resulted in the importexportxml:

                var exportRequest = new ExportXmlRequest
                                        {
                                            ParameterXml = @"<importexportxml>
                                                                <entities/>
                                                                <nodes> 
                                                                   <node>isvconfig</node>
                                                                </nodes>
                                                                <securityroles/>
                                                                <settings/>
                                                                <workflows/>
                                                              </importexportxml>"
                                        };
                using (var service = GetService())
                {
                    var exportResponse = service.Execute(exportRequest);   
                }

    If anyone else is interested, i found what I was looking for form this MSDN url .
    • Marked as answer by Luke Baulch Tuesday, August 18, 2009 12:05 AM
    Tuesday, August 18, 2009 12:03 AM