<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Web Service to load data to main</title><link>https://www.infopathdev.com:443/forums/thread/8654.aspx</link><pubDate>Thu, 12 Jan 2006 18:56:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8654</guid><dc:creator>Richard</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8654.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8654</wfw:commentRss><description>thanks for the update, However, Before I got to try the xsl, it seems that I have a problem with loadXML :&lt;br /&gt;Here is the code:&lt;br /&gt;&lt;br /&gt;IXMLDOMDocument oXml =  (IXMLDOMDocument) thisXDocument.CreateDOM()oXml.async = false;&lt;br /&gt;oXml.resolveExternals=true;&lt;br /&gt;if ( oXml.loadXML(tempnode.text) == true ) &lt;br /&gt;thisXDocument.UI.Alert("Successfull load");&lt;br /&gt;	else&lt;br /&gt;thisXDocument.UI.Alert(oXml.parseError.reason);&lt;br /&gt;&lt;br /&gt;Reason Error:&lt;br /&gt;While loading the schema 'CDA.xsd' following error has occured&lt;br /&gt;the process can not access the file because it is being used by another process&lt;br /&gt;&lt;br /&gt;And If I set oXml.resolveExternals=false, then certain xsd types are not defined and I will get error from the xml parser .&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Web Service to load data to main</title><link>https://www.infopathdev.com:443/forums/thread/8653.aspx</link><pubDate>Thu, 12 Jan 2006 06:32:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8653</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8653.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8653</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;Sorry  I have make an error I have not good read! You must change the secondary DS so you need to add a namespace. Here is the following:&lt;br /&gt;&lt;br /&gt; &lt;blockquote id="quote"&gt;&lt;font size="1" face="Verdana, Arial, Helvetica" id="quote"&gt;quote:&lt;hr height="1" noshade id="quote"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns1="http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-06-14T14-11-47" xmlns:ns3="http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-01-05T09:29:52" xmlns:tsd="http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition" xmlns:ns2="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns4="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://zefix.powernet.ch/WebServices" xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-07-06T05:50:54" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"&amp;gt;&lt;br /&gt;	&amp;lt;xsl:template match="/"&amp;gt;&lt;br /&gt;		&amp;lt;xsl:apply-templates/&amp;gt;&lt;br /&gt;	&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;	&amp;lt;xsl:template match="*"&amp;gt;&lt;br /&gt;		&amp;lt;xsl:element name="{concat('ns1:', local-name())}"&amp;gt;&lt;br /&gt;			&amp;lt;xsl:apply-templates select="@*|node()"/&amp;gt;&lt;br /&gt;		&amp;lt;/xsl:element&amp;gt;&lt;br /&gt;	&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;	&amp;lt;xsl:template match="@*"&amp;gt;&lt;br /&gt;		&amp;lt;xsl:attribute name="{concat(&lt;font color="red"&gt;'ns1:'&lt;/font id="red"&gt;, local-name())}"&amp;gt;&amp;lt;xsl:value-of select="."/&amp;gt;&amp;lt;/xsl:attribute&amp;gt;&lt;br /&gt;	&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;&amp;lt;/xsl:stylesheet&amp;gt;&lt;hr height="1" noshade id="quote"&gt;&lt;/font id="quote"&gt;&lt;/blockquote id="quote"&gt;&lt;br /&gt;&lt;br /&gt;You need to change the namespace declaration by your (the best is make a copy of the namespace declaration in template.xml) and I don't know if your attribut need to have ns1: in the name (see in template.xml too)!&lt;br /&gt;&lt;br /&gt;++&lt;br /&gt;&lt;br /&gt;Thierry</description></item><item><title>Re: Web Service to load data to main</title><link>https://www.infopathdev.com:443/forums/thread/8652.aspx</link><pubDate>Wed, 11 Jan 2006 18:58:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8652</guid><dc:creator>Richard</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8652.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8652</wfw:commentRss><description>Are you suggesting that I remove the prefixes from the main DOM or remove it from the secondary. ?&lt;br /&gt;</description></item><item><title>Re: Web Service to load data to main</title><link>https://www.infopathdev.com:443/forums/thread/8651.aspx</link><pubDate>Wed, 11 Jan 2006 06:36:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8651</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8651.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8651</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;No problem here is the nonamespace xsl you have only to change my by your prefix and change the namespace too.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" &lt;br /&gt;xmlns:my="http://..." exclude-result-prefixes="my"&amp;gt;&lt;br /&gt;&amp;lt;xsl:template match="/" &amp;gt;&lt;br /&gt;&amp;lt;xsl:apply-templates /&amp;gt;&lt;br /&gt;&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;&amp;lt;xsl:template match="*"&amp;gt;&lt;br /&gt;&amp;lt;xsl:element name="{local-name()}"&amp;gt;&lt;br /&gt;&amp;lt;xsl:apply-templates select="@*|node()"/&amp;gt;&lt;br /&gt;&amp;lt;/xsl:element&amp;gt;&lt;br /&gt;&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;&amp;lt;xsl:template match="@*"&amp;gt;&lt;br /&gt;&amp;lt;xsl:attribute name="{local-name()}"&amp;gt;&lt;br /&gt;&amp;lt;xsl:value-of select="."/&amp;gt;&lt;br /&gt;&amp;lt;/xsl:attribute&amp;gt;&lt;br /&gt;&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;&amp;lt;/xsl:stylesheet&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;++&lt;br /&gt;&lt;br /&gt;Thierry</description></item><item><title>Re: Web Service to load data to main</title><link>https://www.infopathdev.com:443/forums/thread/8650.aspx</link><pubDate>Tue, 10 Jan 2006 19:22:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8650</guid><dc:creator>Richard</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8650.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8650</wfw:commentRss><description>Thanks Thierry,&lt;br /&gt;the xml coming from the web service, has the following:&lt;br /&gt;&amp;lt;ClinicalDocument xmlns="urn:hl7-org:v3" ....... &amp;gt;&lt;br /&gt;&lt;br /&gt;please send me your sample..&lt;br /&gt;&lt;br /&gt;thanks.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Web Service to load data to main</title><link>https://www.infopathdev.com:443/forums/thread/8649.aspx</link><pubDate>Tue, 10 Jan 2006 08:12:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8649</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8649.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8649</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;The problem is the namespace one has ns1: and not the other!&lt;br /&gt;&lt;br /&gt;For XML it's not the same things!&lt;br /&gt;&lt;br /&gt;You need to add or remove the namespace in one of your IXMLDOMNode!&lt;br /&gt;&lt;br /&gt;Me I do this with a XSL! If you want I can send you I have the two for add and remove!&lt;br /&gt;&lt;br /&gt;++&lt;br /&gt;Thierry</description></item><item><title>Re: Web Service to load data to main</title><link>https://www.infopathdev.com:443/forums/thread/8648.aspx</link><pubDate>Tue, 10 Jan 2006 00:33:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8648</guid><dc:creator>Richard</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8648.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8648</wfw:commentRss><description>thanks for your response,,&lt;br /&gt;I was able to loadxml , but replacing the child of the main dom gives me error&lt;br /&gt;here is what I have:&lt;br /&gt;&lt;br /&gt;IXMLDOMDocument3 wsDOM = (IXMLDOMDocument3) thisXDocument.GetDOM("GetMarkLogicString");&lt;br /&gt;&lt;br /&gt;wsDOM.setProperty("SelectionNamespaces", "......");&lt;br /&gt;IXMLDOMNode tempnode = wsDOM.selectSingleNode("//dfs:myFields//dfs:dataFields");&lt;br /&gt;&lt;br /&gt;IXMLDOMDocument  oXml = thisXDocument.CreateDOM();&lt;br /&gt;oXml.async = false;&lt;br /&gt;oXml.loadXML(tempnode.text);&lt;br /&gt;&lt;br /&gt;IXMLDOMNode NewChild = oXml.documentElement.selectSingleNode("/ClinicalDocument");&lt;br /&gt;&lt;br /&gt;IXMLDOMNode OldChild = thisXDocument.DOM.selectSingleNode("/my:myFields//ns1:ClinicalDocument");&lt;br /&gt;&lt;br /&gt;OldChild.parentNode.replaceChild(NewChild,OldChild);&lt;br /&gt;</description></item><item><title>Re: Web Service to load data to main</title><link>https://www.infopathdev.com:443/forums/thread/8647.aspx</link><pubDate>Sun, 01 Jan 2006 14:04:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8647</guid><dc:creator>vt_asparagus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8647.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8647</wfw:commentRss><description>Ok, here are some code snippets that you can try to use.  You should be able to write a web webservice that returns an XML string and then you can subsequently push that into you InfoPath form's main DOM.  They are in VBScript.&lt;br /&gt;&lt;br /&gt;This first method will allow you take an XML string and append it into the main DOM.  When calling this method sParentNodePath would take an XPath query to a group and subsequently add a row into a repeating section.  Although this does not do exactly what you are looking for, you should get the point.&lt;br /&gt;&lt;br /&gt;Sub CreateRow(sXML, sParentNodePath)&lt;br /&gt;	&lt;br /&gt;	'Create a new row&lt;br /&gt;	dim oXml &lt;br /&gt;	set oXml = XDocument.CreateDOM()&lt;br /&gt;	oXml.async = false&lt;br /&gt;	oXml.loadXML(sXML)&lt;br /&gt;	&lt;br /&gt;	'add the row to the DOM&lt;br /&gt;	XDocument.DOM.selectSingleNode(sParentNodePath).appendChild(oXml.documentElement)&lt;br /&gt;	&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;Here is more code.  What you can do with this code is modify it such that you take a DOM from a secondary data source and if it conforms to the main data source, you can push the values from the secondary datasource into the main data source.&lt;br /&gt;&lt;br /&gt;Dim existingDataFields &lt;br /&gt;Set existingDataFields = XDocument.DOM.selectSingleNode(...Path to root node...)&lt;br /&gt;Call domTemplate.setProperty("SelectionNamespaces", MY_XML_NAMESPACE)&lt;br /&gt;&lt;br /&gt;Dim newDataFields &lt;br /&gt;Set newDataFields = domTemplate.selectSingleNode(...Path to root node...)&lt;br /&gt;Call existingDataFields.parentNode.replaceChild(newDataFields.cloneNode(true), existingDataFields)&lt;br /&gt;&lt;br /&gt;There are tons of things you can do.&lt;br /&gt;&lt;br /&gt;HTH</description></item><item><title>Re: Web Service to load data to main</title><link>https://www.infopathdev.com:443/forums/thread/8646.aspx</link><pubDate>Sat, 31 Dec 2005 17:03:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8646</guid><dc:creator>vt_asparagus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8646.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8646</wfw:commentRss><description>Inferring only occurs when designing when going through the data connection wizard.  So, one approach would be when going through the wizard to hook in your webservice to set sample data such that you entire schema can be inferred.  Once that is done, you should be ok.  &lt;br /&gt;&lt;br /&gt;Another thing you can do is pass a strongly typed dataset from your .NET webservice into you IP form.  That way the entire schema as defined is picked up and it should not be inferred.  Correct me if I am wrong there.  This is just my opinion but I usually do not return strongly typed datasets from webserivces because a strongly typed dataset is specific to .NET and I like to make sure that my webservices can be consumed by any platform.  Although since there is nice integration with IP and webservices that return strongly typed datasets...&lt;br /&gt;&lt;br /&gt;Oh, there is a way get an XML string into an XML document via stript.  Got to take care of something...will post in a couple.</description></item><item><title>Web Service to load data to main</title><link>https://www.infopathdev.com:443/forums/thread/5233.aspx</link><pubDate>Fri, 30 Dec 2005 23:08:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5233</guid><dc:creator>Richard</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5233.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5233</wfw:commentRss><description>I have created a form from a given schema, (foo.xsd).&lt;br /&gt;Now, I want to be able to load the main DOM with the xml received from a web service. this xml conforms to foo.xsd but each sample xml may  or may not use all the elemts,, So, I do not want infopath to infer a schema for it.. !.&lt;br /&gt;&lt;br /&gt;Unfortunately , returning the webservice with the foo.xsd class does not work, .. ! ( some compatibility issues with the MSXML )..&lt;br /&gt;&lt;br /&gt;I thought that the best way was to have the web service return the result as string, But , there is no tool to convert the string to xml  ? &lt;br /&gt;&lt;br /&gt;Is there a way to open a form with data that comes from the web service ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description></item></channel></rss>