Expand my Community achievements bar.

Does anyone have experience using MS Visual Web Designer 2008 VB?

Avatar

Former Community Member

I've created a webservice that accepts a single input (ID number) and returns data from a table. It's written in VB. My question is what do I return so I can see the fields in Designer data connection?

Right now I'm returning XML in an object so all I see is webservice result,

A string gives me the same thing. When I try to return XML or XDocument I get an error on the webservice. There was no help in the MS knowledge base that I have found so far on the error.

I tried to use the returned string by adding it to the data structure using:

xfa.datasets.data.loadXML(xfa.resolveNode("form1.#subform.xmldata").rawValue

,FALSE,FALSE);

xfa.resolveNode("form1.#subform.TextField4").rawValue

= xfa.datasets.data.saveXML();

for (var i=0; i < len; i++){
  app.alert("adding " + theDataGroup.nodes.item(i).nodes.item(0).value + " to the DD list");
  //DropDownList2.addItem(theDataGroup.nodes.item(i).nodes.item(0).value);
}

from this example:

xfa.datasets.data.loadXML(xml_result.rawValue, false, false);
xml_result.rawValue = xfa.datasets.data.saveXML();
var theDataGroup = xfa.resolveNode("xfa.data.people");
var len = theDataGroup.nodes.length;

for (var i=0; i < len; i++){
  app.alert("adding " + theDataGroup.nodes.item(i).nodes.item(0).value + " to the DD list");
  DropDownList2.addItem(theDataGroup.nodes.item(i).nodes.item(0).value);
}

on a button click event to see what I get but nothing happens even when I paste xml into the xmldata field.

What am i missing?

4 Replies

Avatar

Former Community Member

You have no choice but to return the XML as a string and then load it into the data dom. Are you getting the XML returned to the field? The manipulation of the data in the dom can be tricky....can you send the form and the data file that is returned to LiveCycle8@gmail.com and I will have a look when I get a chance.

paul

Avatar

Former Community Member

Yes, I can get the string into the field.

The problem comes when I try to add to the DOM. I can't tell if the data makes it or not.

Avatar

Former Community Member

I will put a multiline field on the form somewhere and the write the result into that field. This gives you a scr

olling view of the Dom. To get it use this command:

fieldName.rawValue = xfa.datasets.data.saveXML("pretty")

Paul

Avatar

Former Community Member

Thanks again Paul. I wasn't sure how to get to the  xml data loaded. It worked fine.