Cadet 1st Class
Cadet 1st Class
1236 views

Need help with createProxyAccessRequest

Hi Preston

I need some help adding a proxy on GroupWise 2014. Its several years since I've done anything new with SOAP so I'm a little rusty. The GroupWise SOAP docs (P86) show the relevant XML request starting like this.

<createProxyAccessRequest>
<entry>
<displayName>u4</displayName>
<email>u4@phantom.com</email>
<uuid>66301550-175B-0000-890F-6E00D5004E00</uuid>
<appointment>
<read>1</read>
<write>1</write>
</appointment>

It contains displayName, email and uuid fields which is consistent with the XML returned in getProxyAccessListResponse.

Looking at groupwise.h (I'm using C/C++) generated from groupwise.wsdl (2014 version), createProxyAccessRequest has a single property "entry" of type AccessRightEntry.

Looking at class AccessRightEntry in groupwise.h, the published properties are:

__property id id = { index=(IS_OPTN | IS_REF), read=Fid, write=Setid, stored = id_Specified };
__property AccessRight* appointment = { index=(IS_OPTN), read=Fappointment, write=Setappointment, stored = appointment_Specified };
__property AccessRight* mail = { index=(IS_OPTN), read=Fmail, write=Setmail, stored = mail_Specified };
__property AccessMiscRight* misc = { index=(IS_OPTN), read=Fmisc, write=Setmisc, stored = misc_Specified };
__property AccessRight* note = { index=(IS_OPTN), read=Fnote, write=Setnote, stored = note_Specified };
__property AccessRight* task = { index=(IS_OPTN), read=Ftask, write=Settask, stored = task_Specified };

But class "id" appears to be a single unicode string whereas I'd expect a property of class "NameAndEmail" which has the 3 fields in the XML above.

If I assign a single value (the guid) to "id", the request appears successful, i.e. createProxyAccessResponse has a status of 0, but the proxy is not added. The XML for createProxyAcessRequest looks like this when I try to assign RW to appointment:

XXns=<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance"><SOAP-ENV:Header><NS1:session xmlns:NS1="http://schemas.novell.com
/2005/01/GroupWise/types">gpz6nHQEw2i8ZZb1</NS1:session></SOAP-ENV:Header>
<SOAP-ENV:Body><createProxyAccessRequest xmlns="http://schemas.novell.com/2005/
01/GroupWise/methods"><entry><id xmlns="http://schemas.novell.com/2005/01/
GroupWise/types">2F3305F0-0C50-0000-996A-726262333862</id><appointment
xmlns="http://schemas.novell.com/2005/01/GroupWise/types"><read>1</read>
<write>1</write></appointment><mail xmlns="http://schemas.novell.com/2005/
01/GroupWise/types"/><misc xmlns="http://schemas.novell.com/2005/01/GroupWise
/types"/><note xmlns="http://schemas.novell.com/2005/01/GroupWise/types"/>
<task xmlns="http://schemas.novell.com/2005/01/GroupWise/types"/></entry>
</createProxyAccessRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>

Groupwise.h appears to be at odds with the SOAP docs. Any suggestions? I'm running short of ideas here.

Thanks, John
Labels (1)
Tags (2)
0 Likes
3 Replies
Absent Member.
Absent Member.

AccessRightEntry is based on NameAndEmail.
So it inherits:
displayName
email
uuid

The id element is a read-only element. It is generated
the SOAP code.

Here is an example in Java.
It should be similar.

private void testAddProxies()
{
AccessRight right = new AccessRight();
AccessRightChanges changes = new AccessRightChanges();
AccessRightEntry add = new AccessRightEntry();
AccessRightEntry del = new AccessRightEntry();
AccessRightEntry upd = new AccessRightEntry();
AccessRightEntry entry = new AccessRightEntry();
AccessRightList list;
AccessMiscRight misc = new AccessMiscRight();
CreateProxyAccessRequest request = new CreateProxyAccessRequest();
GetProxyAccessListRequest preq = new GetProxyAccessListRequest();
GetProxyAccessListResponse presp;
ModifyProxyAccessRequest mreq = new ModifyProxyAccessRequest();
RemoveProxyAccessRequest rreq = new RemoveProxyAccessRequest();
String id;
String uuid = "2D16B180-0922-0000-846C-82BD300F9E1C";

entry.setDisplayName("Preston Stephenson");
entry.setEmail("pstephenson@prestons.provo.novell.com");
entry.setUuid(uuid);
right.setRead(true);
right.setWrite(true);
entry.setMail(right);
right = new AccessRight();
right.setRead(true);
right.setWrite(false);
entry.setTask(right);
right = new AccessRight();
right.setRead(true);
right.setWrite(true);
entry.setNote(right);
misc.setAlarms(true);
misc.setFolders(true);
misc.setNotify(true);
misc.setReadHidden(true);
misc.setRules(true);
misc.setSetup(true);
misc.setSetupSecurity(true);
entry.setMisc(misc);
request.setEntry(entry);
port.createProxyAccessRequest(request);
preq.setView("misc");
presp = port.getProxyAccessListRequest(preq);

if ( null == presp && 0 != presp.getStatus().getCode())
return;

list = presp.getAccessRights();
for( AccessRightEntry are : list.getEntry())
{
if ( are.getUuid().matches(uuid))
{
id = are.getId();
right = new AccessRight();
right.setRead(true);
right.setWrite(true);
add.setAppointment(right);
right = new AccessRight();
right.setRead(true);
right.setWrite(true);
add.setTask(right);
changes.setAdd(add);

misc = new AccessMiscRight();
misc.setSetup(true);
del.setMisc(misc);
right = new AccessRight();
del.setNote(right);
right = new AccessRight();
right.setRead(true);
right.setWrite(true);
del.setTask(right);
changes.setDelete(del);

right = new AccessRight();
right.setRead(true);
right.setWrite(false);
upd.setNote(right);
changes.setUpdate(upd);

mreq.setId(id);
mreq.setUpdates(changes);
port.modifyProxyAccessRequest(mreq);
port.getProxyAccessListRequest(preq);

rreq.setId(id);
port.removeProxyAccessRequest(rreq);
port.getProxyAccessListRequest(preq);
break;
}
}
}

Preston



>>>


> Hi Preston
>
> I need some help adding a proxy on GroupWise 2014. Its several years
> since I've done anything new with SOAP so I'm a little rusty. The
> GroupWise SOAP docs (P86) show the relevant XML request starting like
> this.
>
> <createProxyAccessRequest>
> <entry>
> <displayName>u4</displayName>
> <email>u4@phantom.com</email>
> <uuid>66301550‑175B‑0000‑890F‑6E00D5004E00</uuid>
> <appointment>
> <read>1</read>
> <write>1</write>
> </appointment>
>
> It contains displayName, email and uuid fields which is consistent with
> the XML returned in getProxyAccessListResponse.
>
> Looking at groupwise.h (I'm using C/C++) generated from groupwise.wsdl
> (2014 version), createProxyAccessRequest has a single property "entry"
> of type AccessRightEntry.
>
> Looking at class AccessRightEntry in groupwise.h, the published
> properties are:
>
> __property id id = { index=(IS_OPTN | IS_REF),
> read=Fid, write=Setid, stored = id_Specified };
> __property AccessRight* appointment = { index=(IS_OPTN),
> read=Fappointment, write=Setappointment, stored = appointment_Specified
> };
> __property AccessRight* mail = { index=(IS_OPTN), read=Fmail,
> write=Setmail, stored = mail_Specified };
> __property AccessMiscRight* misc = { index=(IS_OPTN),
> read=Fmisc, write=Setmisc, stored = misc_Specified };
> __property AccessRight* note = { index=(IS_OPTN), read=Fnote,
> write=Setnote, stored = note_Specified };
> __property AccessRight* task = { index=(IS_OPTN), read=Ftask,
> write=Settask, stored = task_Specified };
>
> But class "id" appears to be a single unicode string whereas I'd expect
> a property of class "NameAndEmail" which has the 3 fields in the XML
> above.
>
> If I assign a single value (the guid) to "id", the request appears
> successful, i.e. createProxyAccessResponse has a status of 0, but the
> proxy is not added. The XML for createProxyAcessRequest looks like this
> when I try to assign RW to appointment:
>
> XXns=<?xml version="1.0"?>
> <SOAP‑ENV:Envelope
> xmlns:SOAP‑ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/
> XMLSchema‑instance"><SOAP‑ENV:Header><NS1:session
> xmlns:NS1="http://schemas.novell.com
>

/2005/01/GroupWise/types">gpz6nHQEw2i8ZZb1</NS1:session></SOAP‑ENV:Header>

> <SOAP‑ENV:Body><createProxyAccessRequest
> xmlns="http://schemas.novell.com/2005/
> 01/GroupWise/methods"><entry><id
> xmlns="http://schemas.novell.com/2005/01/
>

GroupWise/types">2F3305F0‑0C50‑0000‑996A‑726262333862</id><appointme
nt
> xmlns="http://schemas.novell.com/2005/01/GroupWise/types"><read>1</read>
> <write>1</write></appointment><mail
> xmlns="http://schemas.novell.com/2005/
> 01/GroupWise/types"/><misc
> xmlns="http://schemas.novell.com/2005/01/GroupWise
> /types"/><note
> xmlns="http://schemas.novell.com/2005/01/GroupWise/types"/>
> <task
> xmlns="http://schemas.novell.com/2005/01/GroupWise/types"/></entry>
> </createProxyAccessRequest></SOAP‑ENV:Body></SOAP‑ENV:Envelope>
>
> Groupwise.h appears to be at odds with the SOAP docs. Any suggestions?
> I'm running short of ideas here.
>
> Thanks, John


0 Likes
Cadet 1st Class
Cadet 1st Class

Thanks, I had that feeling I was overlooking something simple.

I now have createProxyAccessRequest, modifyProxyAccessRequest and removeProxyAccessRequest working fine. Getting the latter two to work without error caused some head scratching until I realised I had to append '@60' to the guid which was not required for the 'create' function. Which raises another question. Currently, I'm retrieving the guid via REST then using it for SOAP. From one of your previous posts, MF reserve the right to change this suffix. So ideally, I need to determine what value to use via SOAP. How would you suggest I do that? I guess any function accepting a name as input and returning a user's guid would suffice, but I have yet to find such a function.

Thanks, John
0 Likes
Absent Member.
Absent Member.

We are not going to change the id's and the suffixes.
You can just append the "@60" or you can get the
list of proxies and match up the guid to get the id.

Preston


>>>


> Thanks, I had that feeling I was overlooking something simple.
>
> I now have createProxyAccessRequest, modifyProxyAccessRequest and
> removeProxyAccessRequest working fine. Getting the latter two to work
> without error caused some head scratching until I realised I had to
> append '@60' to the guid which was not required for the 'create'
> function. Which raises another question. Currently, I'm retrieving the
> guid via REST then using it for SOAP. From one of your previous posts,
> MF reserve the right to change this suffix. So ideally, I need to
> determine what value to use via SOAP. How would you suggest I do that? I
> guess any function accepting a name as input and returning a user's guid
> would suffice, but I have yet to find such a function.
>
> Thanks, John


0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.