changing values of web service parameters in .net

B

Bicazian

HI

I have looked at the how to example of microsoft.
How to dynamically populate a drop-down list box by using a Web service in
InfoPath 2003 and Visual Studio .NET (2003)
I have loaded SP1 and The toolkit for dotnet so it does not allow me to do
the coding in Microsoft script Editor.
What it is I am trying to do is on a change event of a drop down list box it
should update the parameter of the webservice and querry it again.
I can get the value of the drop down list box with the
thisXDocument.DOM.selectSingleNode method.
I can get the secondary data object with
thisXDocument.DataObjects("mywebmethod").DOM().

I am unable to set the property or get the node.

If I do a selectsinglenode on it it returns nothing.
when I do a selectsinglenode on the object returned by
thisXDocument.DataObjects("mywebmethod").DOM() it complains about the dfs and
s0 in the string.

TX
B
 
J

jb

If I do a selectsinglenode on it it returns nothing.
when I do a selectsinglenode on the object returned by
thisXDocument.DataObjects("mywebmethod").DOM() it complains about the dfs and
s0 in the string.

(According to me) You have to set the XPath query namespaces for the
secondary adapter like for the main one.

In the script.js you already have something like:
XDocument.DOM.setProperty("SelectionNamespaces", "........");
for the main DOM. You have to do the same for the secondary adapter, e.g.

XDocument.DataObjects("mywebmethod").DOM.setProperty("SelectionNamespaces",
"........");
to set up the "dfs"/"s0" etc namespaces (and use them in your XPath query).
In your case, adjust XDocument to thisXDocument or whatever for managed code
(I use JScript).
 
B

Bicazian

Yes in scripting it seems to work but I am would prefer to do it in C# or
vb.net
and the objects are different the setproperty method is not there
 
J

jb

Well, they will be, you just need to find the equivalent! Just look up
however this is done for the Main DOM (there must be something in generated
code) and apply to secondary. There will be an equivalent for setProperty;
maybe it's just an assignment or something...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top