InfoPath close/crashes when connecting to a web service

Y

Yann Gibaja

I created a template that retrieves data via a web service. It works OK in
design mode when I preview the form for the first time. Then if I preview
the form again, Infopath crashes and closes just when it tries to access the
web service using the following code:

thisXDocument.DataObjects["GetData"].Query();

where GetData is the name of the data connection that uses a web service.

The same thing happens if I check out the box "Automatically retrieves data
when the form is opened".

I publish the template, made it fully trusted. And the same thing happens
when I create a new form with the Infopath template.

Any idea? I have spent so much time researching this problem and I'm running
out of time.

I'm using Infopath SP1 and VS 2003 with C#.

Thanks in advance for your help,

Yann
 
N

Norpa

iT SOUNDS LIKE YOUR VIEW IS LOOKING FOR A DATAOBJECTS THAT NO LONGER EXISTS..
DELETE THE CODE FROM THE XSL (THE VIEW) AND JUST ADD IT AGAIN IN INFOPATH,
BUT BE CAREFUL TO LEAVE THE XSL CODE WITH MATCHING TAGS.
 
Y

Yann Gibaja

I'm not sure what you mean by deleting the code from the XSL. Which line of
code?

The only way I can make this work is by modifying the dataconnection but not
change anything as if it would help refresh or reset it, and then the
Preview Form works again until I save the template. The next time I preview
the form, the query to the dataobject makes the preview form close
immediately.

Something weird is that I end up with several schemas in the project:
getdata2.xsd, getdata3.xsd

What's going on here?

Yann




Norpa said:
iT SOUNDS LIKE YOUR VIEW IS LOOKING FOR A DATAOBJECTS THAT NO LONGER
EXISTS..
DELETE THE CODE FROM THE XSL (THE VIEW) AND JUST ADD IT AGAIN IN INFOPATH,
BUT BE CAREFUL TO LEAVE THE XSL CODE WITH MATCHING TAGS.

Yann Gibaja said:
I created a template that retrieves data via a web service. It works OK
in
design mode when I preview the form for the first time. Then if I preview
the form again, Infopath crashes and closes just when it tries to access
the
web service using the following code:

thisXDocument.DataObjects["GetData"].Query();

where GetData is the name of the data connection that uses a web service.

The same thing happens if I check out the box "Automatically retrieves
data
when the form is opened".

I publish the template, made it fully trusted. And the same thing happens
when I create a new form with the Infopath template.

Any idea? I have spent so much time researching this problem and I'm
running
out of time.

I'm using Infopath SP1 and VS 2003 with C#.

Thanks in advance for your help,

Yann
 

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