M
MarkA
I have a web service (WCF, with basicHttpBinding) that accepts a
message and returns an integer ID that has been assigned to that
message for correlation at a later time.
When using this web service in the Submit action, I can't seem to get
access to the ID returned from the web service at the completion of the
submit operation.
After realising that this couldn't be done in GUI, I tried dropping
into code to do this manually, ie.
--8<---
public void FormEvents_Submit(object sender, SubmitEventArgs e)
{
....
// Retrieve the data connection for submission and execute it.
DataConnection dc = RetreiveNamedConnection("MySubmissionConnection");
dc.Execute();
....
}
--8<---
The RetreiveNamedConnection method above simply enumerates the
available data connections looking for one with the specified name.
But again, The Execute method on the data connection returns void,
accepts no data, and there is no secondary data source that stores the
return value.
It seems to me that this should be a rather commonly used scenario for
from submission within InfoPath, and it will surprise me if this isn't
provided out of the box.
My one workaround that I have thought of so far, but got stuck in
implementing was using a "Request Data" WS to submit the data to the
web service and retrieve the ID this way, but i'm stuck on how to map
the Main Data Source to the Secondary Data Source created for the
Request Data WS call. I briefly tried getting the secondary data source
and using it's SetNamedNodeProperty in order to transfer the data, but
this didn't seem to be what I need, and I dread the thought of having
to write a significant amount of code to map the two data sources
together.
message and returns an integer ID that has been assigned to that
message for correlation at a later time.
When using this web service in the Submit action, I can't seem to get
access to the ID returned from the web service at the completion of the
submit operation.
After realising that this couldn't be done in GUI, I tried dropping
into code to do this manually, ie.
--8<---
public void FormEvents_Submit(object sender, SubmitEventArgs e)
{
....
// Retrieve the data connection for submission and execute it.
DataConnection dc = RetreiveNamedConnection("MySubmissionConnection");
dc.Execute();
....
}
--8<---
The RetreiveNamedConnection method above simply enumerates the
available data connections looking for one with the specified name.
But again, The Execute method on the data connection returns void,
accepts no data, and there is no secondary data source that stores the
return value.
It seems to me that this should be a rather commonly used scenario for
from submission within InfoPath, and it will surprise me if this isn't
provided out of the box.
My one workaround that I have thought of so far, but got stuck in
implementing was using a "Request Data" WS to submit the data to the
web service and retrieve the ID this way, but i'm stuck on how to map
the Main Data Source to the Secondary Data Source created for the
Request Data WS call. I briefly tried getting the secondary data source
and using it's SetNamedNodeProperty in order to transfer the data, but
this didn't seem to be what I need, and I dread the thought of having
to write a significant amount of code to map the two data sources
together.