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="">schemas.xmlsoap.org/.../"
xmlns:xsd="
">www.w3.org/.../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="schemas.novell.com/.../
01/GroupWise/methods"><entry><id xmlns="schemas.novell.com/.../
GroupWise/types">2F3305F0-0C50-0000-996A-726262333862</id><appointment
xmlns="">schemas.novell.com/.../read>
<write>1</write></appointment><mail xmlns="schemas.novell.com/.../
01/GroupWise/types"/><misc xmlns="schemas.novell.com/.../GroupWise
/types"/><note xmlns="">schemas.novell.com/.../>
<task xmlns="">schemas.novell.com/.../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

Tags:

  • 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
  • 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
  • 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