GetUser info with web service

H

Hans

Hi,

I have a web service that provides info on the user that has opened the form.
The problem is that I have to submit a user id to the service to be able to
get the information from it, and I don't know how.
Is there another way that this can be done so I can get this information
from the web service when opening the form?

Regards,
Hans
 
D

darko

Hi,

I understand the question, that you don't know how to submit a parameter to
the web service (the parameter is user id that you have on the client
side-InfoPath) or you need the webService automaticly to identify the caller
and return some result?

in the first case, you need to reference the web service method, and give a
sample parameter data to the web service. Than you give name to the
connection you just made and uncheck the checkbox auto-call....

After taht you need to write some .NET code in the onLoad InfoPath metod,
to pass the user id value as a parameter to the web service. The data
connection that you made with the web service, creates secondary datasource
as xml in the InfoPath. It containt the queryFields node group, that contains
all the parameter for the web service as a xml element node. Give this xml
element nodes (parameters) a right value, and the call the Query() mmethod of
the data connection you made.
(thisxdocument.dataobjects("name").qeury())
 
A

Ameet Phadnis

You need to determine the User name prior to accessing the Web Service. You
can do it through Jscript or .NET.

I think JScript syntax is as -
var networkuser = new ActiveXObject("WScript.Network");

// Use networkuser.UserName as Network User Name.
 

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