Hello Alain,
I have to do also like these, but i don't know how to bind or fill the
parameter to the web service call. From Your Code what is variable param1
stand for.
I am poor in jscript. Follows a fragment of code which i am trying:
function XDocument::OnSubmitRequest(eventObj)
{
//var fieldValue = XDocument.DOM.selectSingleNode(
"/dfs:myFields/dfs:dataFields/so:ResSRR/so:CompnayID");
XDocument.UI.Alert("FieldVal:"+ fieldValue);
//Check the Xml document
XDocument.UI.Alert(XDocument.DOM.xml);
//Get a reference to the SDS bound to the Web Service.
var theDataObject = XDocument.DataObjects.Item("ShowRegionrepresentative");
XDocument.DOM.setProperty("SelectionNamespaces",
'xmlns:so="urn:uddi-org:api_v2"
xmlns:dfs="
http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"
xmlns:my="
http://schemas.microsoft.com/office/infopath/2003/myXSD/2004-12-23T13:47:22"');
//Set the SelectionNamespaces so that you can find the correct field.
// Note: If the Web service was created with Visual Studio .NET 2003, the
xmlns:s0 namespace is
//
http://tempuri.org/PopulateCities/Service1
/*theDataObject.DOM.setProperty("SelectionNamespaces",
'xmlns:dfs="
http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" ' +
'xmlns:s0="
http://tempuri.org/"');
*/
/*var queryValue = theDataObject.DOM.selectSingleNode(
"/dfs:myFields/dfs:queryFields/s0:GetCities/s0:sState" );
queryValue.text = fieldValue.text;*/
theDataObject.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/so:ResSRR/so:CompnayID[1]").text = "181063";
theDataObject.Query();
eventObj.ReturnStatus = true;
// Write your code here
}
Parameter for my Web service is called CompanyId. In my case a runtime error
is occured that Namespace DFS is not found. what should i do?
Thank'x in advance