Infopath cannot connect to data source - Web Service

N

Natalie Lewis

We have a web service set up to generate an unique ID to be used in an
Infopath form. The web service is installed on our sharepoint server 2007
and it can be accessed from multiple computers. However, when we create a
new form from the InfoPath form library on Sharepoint we receive the
following error:

Form template:
http://mossdev.dci.com/ind/ddTestReq/Disk Drive Test Lab Request Form/Forms/template.xsn
The following DataObject either cannot be created or cannot be initialized:
NextDDSerialNumber
The query cannot be run for the following DataObject: NextDDSerialNumber
InfoPath cannot run the specified query.
InfoPath either cannot connect to the data source or the service has timed
out.
 
S

S.Y.M. Wong-A-Ton

Is it a browser form making use of the web service? And how does the web
service generate the unique ID? Does it access a database? The error could
have many causes, so it's difficult to say what is going wrong, but one of
these causes can be denial of access to network resources.
 
N

Natalie Lewis

It is an Infopath form being opened in Infopath. The webservice increments
an ID in a text file on a network path. I think it's a security issue, but
I've tried several things and nothing seems to work.
 
S

S.Y.M. Wong-A-Ton

I think so too! Did you test the web service independently of InfoPath? Does
it work? How are you calling the web service in InfoPath? Through code?
 
N

Natalie Lewis

It works as a web service if I'm running it as me from my machine. If I try
to access it from another computer, I can navigate to the web service page,
but I can't run it. From everything I've read, its got to be related to the
text file that has to be written to be the webservice. I've tried giving the
application pool the web service runs under, aspnet, computername_User and
authenticated users access to the folder to write to it. I can get to the
point where it looks like it will work - but then it either gives me the
error above or an access is denied error. (I'm not a programmer by training,
so this is a bit of a hunt and peck expedition for me...) Thanks for your
help!
 
S

S.Y.M. Wong-A-Ton

For a non-programmer you know quite a bit. :) You gave permissions on the
folder, but how about the file itself? And what OS is the web service running
on? If it is running on Win 2003 server, you may want to try giving write
permission to the Network Service account if your web service is not
impersonating any user account.
 
N

Natalie Lewis

I gave permissions for aspnet and network service to the folder and the file.
The webservice is running on a Win 2003 server. I've read that you should
have the config file impersonate the network service, but I'm not sure how to
do that.
 
S

S.Y.M. Wong-A-Ton

If you haven't changed the default user account on the application pool the
web service is using, Network Service should be the default account being
used on a Win 2K3 server box. So you need not impersonate the Network Service
account. However, if you want to let the web service run under a different
account than the Network Service account, you can set this on the application
pool or impersonate a user in the web.config of the web service using the
<identity> element (see http://support.microsoft.com/kb/315736).

Another question: Is anonymous access enabled on your web service? If it
isn't and you're calling the web service from code, you need to specify valid
credentials to access it.
 

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