R
redbastid
Hi!
I am in desperate need of advice here. Any help would be most
appreciated.
I have an Infopath form that submits to a web service. That much works
fine.
I added a second button to the form. From that button I call a second
web service using a secondary data source. The secondary data source
is a second web service. I want to pass the entire form XML document
as a string to the web service and update one of the text boxes with
the result.
The problem is, I cannot seem to set the query parameter! The
secondary data source XSD has only one query parameter: a string.
Currently, the button has these three logical rules:
1) Set expression: Set query param of secondary source to main data
source's top node. I use the String() method to convert the node to a
string.
2) Query secondary data source (web service)
3) Set expression: Update main document attribute field with secondary
data source's result field value.
I injected a message box rule between #1 and #2 to display the value of
the secondary data source parameter, but it always comes up blank!
I'm using the Visual Studio SDK to develop this form too. When I try
to access the thisXDocument object I always get a NULL exception error
which prevents me from stepping through the code. Using the OnClick's
DocActionEvent object seems to not work either. I am at a loss as to
how to get this seemingly-simple feature to actually do something!
Using a test ASPX page, I have verified that, given the input string,
the web service returns the proper result.
I have not been able to locate an example that does this either.
Locating one that does this has been a trial-and-error effort that has
so far led me nowhere.
If you have a code snipped that sets the secondary's parameter,
executes the query, reads the value and updates the main source's
element, I would GREATLY appreciate that too! (Ideally, I'd like to do
this using rules only, but if I must write code I will!)
I appreciate any help or any pointers you can provide me!
-- Red
I am in desperate need of advice here. Any help would be most
appreciated.
I have an Infopath form that submits to a web service. That much works
fine.
I added a second button to the form. From that button I call a second
web service using a secondary data source. The secondary data source
is a second web service. I want to pass the entire form XML document
as a string to the web service and update one of the text boxes with
the result.
The problem is, I cannot seem to set the query parameter! The
secondary data source XSD has only one query parameter: a string.
Currently, the button has these three logical rules:
1) Set expression: Set query param of secondary source to main data
source's top node. I use the String() method to convert the node to a
string.
2) Query secondary data source (web service)
3) Set expression: Update main document attribute field with secondary
data source's result field value.
I injected a message box rule between #1 and #2 to display the value of
the secondary data source parameter, but it always comes up blank!
I'm using the Visual Studio SDK to develop this form too. When I try
to access the thisXDocument object I always get a NULL exception error
which prevents me from stepping through the code. Using the OnClick's
DocActionEvent object seems to not work either. I am at a loss as to
how to get this seemingly-simple feature to actually do something!
Using a test ASPX page, I have verified that, given the input string,
the web service returns the proper result.
I have not been able to locate an example that does this either.
Locating one that does this has been a trial-and-error effort that has
so far led me nowhere.
If you have a code snipped that sets the secondary's parameter,
executes the query, reads the value and updates the main source's
element, I would GREATLY appreciate that too! (Ideally, I'd like to do
this using rules only, but if I must write code I will!)
I appreciate any help or any pointers you can provide me!
-- Red