Hi,
I had the same problem to.
There are many solutions:
- create a proxy web service that exposes the xml returned by
GetGroupCollectionFromUser method in a infopath understandable manner
- use .net code behind the infopath form
- modify the infopath xsd manually.
For the first two methods you can google (there are some examples in
the net, expecially for the second one)
The last one is what we get.
If you unzip a infopath form tempalte created with as secondary data
source that call the GetGroupCollectionFromUser method, you can view a
file named GetGroupCollectionFromUser1.xsd
In this file there is the definition for all usergroup.asmx method.
I have modify this file in this manner:
- adding the following type definition:
<s:complexType name="GetGroupCollectionFromUserType">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="userLoginName"
type="s:string"></s:element>
<s:element minOccurs="0" maxOccurs="1" name="Groups">
<s:complexType>
<s:sequence>
<s:element maxOccurs="unbounded" name="Group" >
<s:complexType>
<s:attribute name="ID" type="s:unsignedShort"
use="required" />
<s:attribute name="Name" type="s:string"
use="required" />
<s:attribute name="Description" type="s:string"
use="required" />
<s:attribute name="OwnerID" type="s:unsignedByte"
use="required" />
<s:attribute name="OwnerIsUser" type="s:string"
use="required" />
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:choice>
</s:sequence>
- go to the GetGroupCollectionFromUser element definition and modify
it in the following manner:
<s:element name="GetGhttp://groups.google.it/group/
microsoft.public.infopath/watch_topic?
hl=it&WebToken=3f63b1bb28c689637ef4a5f1ccefdc5f&tid=d82184fc5acc9fd5&oldstate=0
[Fai clic sulla stella per visualizzare l'argomento]
roupCollectionFromUser" type="tns:GetGroupCollectionFromUserType" /
now reopen your form with infopath and your secondary data source work
fine.
Claudio
This is a repost.. i'm actually without a reply
I need to identify the user group of the actual user. I know that this
webserfvice doing the job.
It reply with xml contains the info i need.
So.. how to correctly use it ininfopathform??
If I make a new connection tousergroup.asmxat GetGroupCollectionFromUser
function,infopathcreate the new data connetion.. but with wrong
structure!!
Try it.
You can view the wrong job ofinfopath.
If I save all the forms file and inspect the data.. i see that the correct
structure is retrived.. but not used!!
Have you a reply? Please!!