Secondary data connection using xsl & web service - InfoPath Dev
in

InfoPath Dev

Secondary data connection using xsl & web service

Last post 10-08-2006 02:11 AM by CGlover. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-08-2006 01:40 AM

    • CGlover
    • Top 500 Contributor
    • Joined on 01-21-2006
    • United Kingdom
    • Posts 34

    Secondary data connection using xsl & web service

    I have an asp.net web service that returns a dataset from an xml document and an xsl transform. My service produces what looks like the right data (a list of names) but Infopath complains when I try to create the Receive data connection:

    'Infopath cannot design a form based on this operation because it uses a DataSet which contains a column with SimpleContent column mapping.'

    I want to use the connection for a drop down list box. I have not had this problem with web services coming from databases.

    If anyone has any ideas I would be very grateful.

    Clive Glover

    My xsl is this:

    <?xml version="1.0" encoding="UTF-8" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:m="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-04-24T20:16:04">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />

    <xsl:template match="/m:sitemenu">
    <Construction>
    <Documents>
    <xsl:for-each select="m:DocFolders/m:DocFolder[m:DocFolderName='Construction']/m:Documents/m:Document">
    <Document>
    <xsl:value-of select="m:DocMenuText" />
    </Document>
    </xsl:for-each>
    </Documents>
    </Construction>
    </xsl:template>
    </xsl:stylesheet>

    My web service output looks like this:

    <?xml version="1.0" encoding="utf-8" ?>
    - <DataSet xmlns="http://www.munro.co.uk/ActiveProjects/UploadIP">
    - <xs:schema id="Construction" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    - <xs:element name="Construction" msdata:IsDataSet="true" msdata:Locale="en-US">
    - <xs:complexType>
    - <xs:choice minOccurs="0" maxOccurs="unbounded">
    - <xs:element name="Documents">
    - <xs:complexType>
    - <xs:sequence>
    - <xs:element name="Document" nillable="true" minOccurs="0" maxOccurs="unbounded">
    - <xs:complexType>
    - <xs:simpleContent msdata:ColumnName="Document_Text" msdata:Ordinal="0">
    <xs:extension base="xs:string" />
    </xs:simpleContent>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    - <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
    - <Construction xmlns="">
    - <Documents diffgr:id="Documents1" msdata:rowOrder="0" diffgr:hasChanges="inserted" msdata:hiddenDocuments_Id="0">
    <Document diffgr:id="Document1" msdata:rowOrder="0" diffgr:hasChanges="inserted" msdata:hiddenDocuments_Id="0">Drawing schedule</Document>
    <Document diffgr:id="Document2" msdata:rowOrder="1" diffgr:hasChanges="inserted" msdata:hiddenDocuments_Id="0">Air conditioning 2</Document>
    <Document diffgr:id="Document3" msdata:rowOrder="2" diffgr:hasChanges="inserted" msdata:hiddenDocuments_Id="0">Builderswork</Document>
    <Document diffgr:id="Document4" msdata:rowOrder="3" diffgr:hasChanges="inserted" msdata:hiddenDocuments_Id="0">Colours</Document>
    <Document diffgr:id="Document5" msdata:rowOrder="4" diffgr:hasChanges="inserted" msdata:hiddenDocuments_Id="0">Door schedule</Document>
    <Document diffgr:id="Document6" msdata:rowOrder="5" diffgr:hasChanges="inserted" msdata:hiddenDocuments_Id="0">Drawing schedule</Document>
    <Document diffgr:id="Document7" msdata:rowOrder="6" diffgr:hasChanges="inserted" msdata:hiddenDocuments_Id="0">Finishes</Document>
    <Document diffgr:id="Document8" msdata:rowOrder="7" diffgr:hasChanges="inserted" msdata:hiddenDocuments_Id="0">Fire alarm</Document>
    <Document diffgr:id="Document9" msdata:rowOrder="8" diffgr:hasChanges="inserted" msdata:hiddenDocuments_Id="0">Joinery</Document>
    <Document diffgr:id="Document10" msdata:rowOrder="9" diffgr:hasChanges="inserted" msdata:hiddenDocuments_Id="0">Lighting</Document>
    <Document diffgr:id="Document11" msdata:rowOrder="10" diffgr:hasChanges="inserted" msdata:hiddenDocuments_Id="0">Power</Document>
    <Document diffgr:id="Document12" msdata:rowOrder="11" diffgr:hasChanges="inserted" msdata:hiddenDocuments_Id="0">Schedule of works</Document>
    <Document diffgr:id="Document13" msdata:rowOrder="12" diffgr:hasChanges="inserted" msdata:hiddenDocuments_Id="0">Structure</Document>
    </Documents>
    </Construction>
    </diffgr:diffgram>
    </DataSet>
  • 10-08-2006 02:11 AM In reply to

    • CGlover
    • Top 500 Contributor
    • Joined on 01-21-2006
    • United Kingdom
    • Posts 34

    Re: Secondary data connection using xsl &amp; web service

    I have discovered that if my web service returns an xmldocument, everything is fine. I would still be interested to know any thoughts on my original question though.

    Clive Glver
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.