Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] groupSave WebService call and spaces in values

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] groupSave WebService call and spaces in values


Chronological Thread 
  • From: "Hagimoto, Kumi" <>
  • To: "Hyzer, Chris" <>
  • Cc: "" <>
  • Subject: Re: [grouper-users] groupSave WebService call and spaces in values
  • Date: Thu, 9 Mar 2017 20:44:54 +0000
  • Accept-language: en-US
  • Authentication-results: isc.upenn.edu; dkim=none (message not signed) header.d=none;isc.upenn.edu; dmarc=none action=none header.from=oregonstate.edu;
  • Ironport-phdr: 9a23:wlLPMB2NiBhZKdZDsmDT+DRfVm0co7zxezQtwd8ZsesWK/nxwZ3uMQTl6Ol3ixeRBMOAuq8C17Sd6vuwEUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQtFiT69bL9oIxi7rArdutQYjIZhN6081gbHrnxUdupM2GhmP0iTnxHy5sex+J5s7SFdsO8/+sBDTKv3Yb02QaRXAzo6PW814tbrtQTYQguU+nQcSGQWnQFWDAXD8Rr3Q43+sir+tup6xSmaIcj7Rq06VDi+86tmTgLjhSEaPDA77W7XkNR9gqJFrhy8uxxxzY3aYI+XO/p/YqzScsgXSnBdUsZUTSFNHp+wYokJAuEcPehYtY79p14WoBewBwejHuzvyj5Nhn/xwa061PwtGhzD0gw9GtIOsXrYp8jyOakXTOC1yajIwS/BYfxM1jf96Y3Ichc9ofGLRr9wdtDRxlcgFwPCiFWQspDlMCmJ1usTqWSU8fdvVf+2hmMhtgp/rD+vxsI2hYnIgIIY0lHE9SNlwIkrP924TlB0YcK6HJdKqS6VKpZ2T8U/SG9roCY30qMKtoSncCQXzZkr2gPTZ+GCfoiG7R/vSPqdLDJ2hH17d7+zmRO//E2ix+HiTMa4yEhGoytZntXRs30BygDc5tSCR/Zy/kqtxSqD2gXO5e1YIE04ia/WJp8iz7M+ipUetF7MEjP0lUj4iaKWeF4r9vWr5unifLrrpZyRO5JyhwrjKKohgNa/Dv49MgUWX2iU5+C81Lr78EPhXLhEieE6nrTAvJ3HJ8sXuLe1AwhO3Yk98Rq/CCqm0MgDknkAMVJFfg+Ig5LxO1HUJ/D4EemwjEiwkDdqwPDGOKftApLQLnjflLfherF9601GxAUvytBf4opYCrAHIP3tRk/8rMLUAQUlPwCpxuvrFchx2p4bVGKBDaKVLL/evFqG5u0xLOSAeooYtTP/JvQ7/fHilXo5lkUcfamt05sXcne4HvF+LkucfHrsh9YBHX0IsAUkQ+zqiViCUTlPZ3a1RK884Ss7B5ypDYfEQICtm6CB0z2nHpJIfGxJFE2DEWrwe4WeR/gMcD6SItNmkjEcWrihUYgh1Qy2tADk0bprN/fU+jYGupL5z9h4/OnTlRAp9TxoFMSRzXuBT2BynmMUWTA2xqZ/rlJhyludy6R3neFXFcEAr89OB00aJIzR1agyINDoWxmLNoOMQ1a3UNi8KTAqRZQs29IIZQBwF8j03T7Z2C//SZ8cmL2OA4Aztur/wn3wbY4p6GvD1e8BhlYnR8xTMkWhnKNw8A7IG4fVngOUm7v8JvdU5zLE6GrWlTnGh0pfSgMlCag=
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

Sorry, you’re right.   It was being massaged with the reader lib method.  I guess I just needed a second set of eyes…
Thanks!
Kumi

On Mar 9, 2017, at 12:17 PM, Hyzer, Chris <> wrote:

Works for me on the demo server (see below).  Was this a new group or an existing group?  Do you have any hooks configured that might be massaging “invalid” characters?
 
Thanks
Chris
 
 
[mchyzer@flash pennGroupsClient-test-2.3.0]$ java -jar grouperClient.jar --operation=groupSaveWs --name=test:testWs:pharm --description="College of Pharmacy Description" --displayExtension="College of Pharmacy" --debug=true
DEBUG: Reading resource: grouper.client.properties, from: /home/mchyzer/grouper/pennGroupsClient-test-2.3.0/grouper.client.properties
DEBUG: method: FailoverClient.instanceMapFromType, read failover state from file: /home/mchyzer/grouper/pennGroupsClient-test-2.3.0/grouperClientFailoverState.bin, success: true, failoverClient grouperWsReadOnly hash: 1e87719, failoverClient grouperWsReadOnly cache hash: e32802, failoverClient grouperWsReadOnly affinity: null, failoverClient grouperWsReadWrite hash: 157c2bd, failoverClient grouperWsReadWrite cache hash: b23210, failoverClient grouperWsReadWrite affinity: null
DEBUG: method: GrouperClientWs.configureFailoverClient, needsReconfigure: true, discoveryFile: not configured to use, needsReconfigureFile: true, affinitySeconds: 28800, extraTimeoutSeconds: 30, errorsForMinutes: 3, failoverStrategy: activeActive, preferReadWrite: true, timeoutSeconds: 60
DEBUG: WebService: connecting as user: 'test'
 
################ REQUEST START (indented) ###############
 
POST /grouper-ws_v2_3/servicesRest/v2_3_000/groups HTTP/1.1
Connection: close
Authorization: Basic xxxxxxxxxxxxxxxx
User-Agent: Jakarta Commons-HttpClient/3.1
Content-Length: 347
Content-Type: text/xml; charset=UTF-8
 
<WsRestGroupSaveRequest>
  <wsGroupToSaves>
    <WsGroupToSave>
      <wsGroupLookup>
        <groupName>test:testWs:pharm</groupName>
      </wsGroupLookup>
      <wsGroup>
        <displayExtension>College of Pharmacy</displayExtension>
        <description>College of Pharmacy Description</description>
        <name>test:testWs:pharm</name>
      </wsGroup>
    </WsGroupToSave>
  </wsGroupToSaves>
</WsRestGroupSaveRequest>
 
################ REQUEST END ###############
 
 
DEBUG: configObjectPropertyCount: 160
DEBUG: configObjectPropertyCount: 160
 
################ RESPONSE START (indented) ###############
 
HTTP/1.1 201 Created
Date: Thu, 09 Mar 2017 20:12:15 GMT
Set-Cookie: JSESSIONID=xxxxxxxxxxxx; Secure
X-Grouper-resultCode: SUCCESS
X-Grouper-success: T
X-Grouper-resultCode2: NONE
Content-Type: text/xml;charset=UTF-8
Connection: close
Transfer-Encoding: chunked
 
<WsGroupSaveResults>
  <results>
    <WsGroupSaveResult>
      <wsGroup>
        <extension>pharm</extension>
        <typeOfGroup>group</typeOfGroup>
        <displayExtension>College of Pharmacy</displayExtension>
        <description>College of Pharmacy Description</description>
        <displayName>test:testWs:College of Pharmacy</displayName>
        <name>test:testWs:pharm</name>
        <uuid>8bba87ae3d5b47cb96d7c11816fd0628</uuid>
        <idIndex>8475096</idIndex>
      </wsGroup>
      <resultMetadata>
        <resultCode>SUCCESS_INSERTED</resultCode>
        <success>T</success>
      </resultMetadata>
    </WsGroupSaveResult>
  </results>
  <resultMetadata>
    <resultCode>SUCCESS</resultCode>
    <resultMessage>Success for: clientVersion: 2.3.0, wsGroupToSaves: Array size: 1: [0]: WsGroupToSave[
  wsGroupLookup=WsGroupLookup[groupName=test:testWs:pharm],
  wsGroup=WsGroup[displayExtension=College of Pharmacy,description=College of Pharmacy Description,nam...
, actAsSubject: null, txType: NONE, paramNames: 
, params: null</resultMessage>
    <success>T</success>
  </resultMetadata>
  <responseMetadata>
    <resultWarnings></resultWarnings>
    <millis>17236</millis>
    <serverVersion>2.3.0</serverVersion>
  </responseMetadata>
</WsGroupSaveResults>
 
################ RESPONSE END ###############
 
 
DEBUG: method: FailoverClient.internal_failoverLogic, type: grouperWsReadWrite, connections: 1, Not load balancing: connection type: grouperWsReadWrite, name: https://grouperdemo.internet2.edu/grouper-ws_v2_3/servicesRest
DEBUG: Output template: Success: ${resultMetadata.success}: code: ${resultMetadata.resultCode}: ${wsGroup.name}, available variables: wsGroupSaveResults, grouperClientUtils, index, wsGroupSaveResult, resultMetadata
DEBUG: Subsituting EL: 'Success: ${resultMetadata.success}: code: ${resultMetadata.resultCode}: ${wsGroup.name}
', and with env vars: wsGroupSaveResults, grouperClientUtils, index, wsGroupSaveResult, resultMetadata, wsGroup, elUtils with result: 'Success: T: code: SUCCESS_INSERTED: test:testWs:pharm
'
Success: T: code: SUCCESS_INSERTED: test:testWs:pharm
DEBUG: Elapsed time: 19363ms
[mchyzer@flash pennGroupsClient-test-2.3.0]$
 
-----Original Message-----
From: [] On Behalf Of Kumi Hagimoto
Sent: Thursday, March 09, 2017 3:01 PM
To:
Subject: [grouper-users] groupSave WebService call and spaces in values
 
Hello,
 
I was just testing saving groups via a groupSave WS call and noticed that the
spaces in values get trimmed.  I don't see this via UI or GSH.  Is it possible
to update the code so WS also preserves spaces? (Unless I'm doing something
wrong... )  I've pasted my request and response JSON string below where you
can see "College of Pharmacy" becomes "CollegeofPharmacy"
 
Thanks,
Kumi
 
===  Request ===
{
  "WsRestGroupSaveRequest":{
    "wsGroupToSaves":[
      {
        "wsGroup":{
          "description":"College of Pharmacy Description",
          "displayExtension":"College of Pharmacy",
          "extension":"pharm",
          "name":"x:kumi:appgroups:cn:pharm"
        },
        "wsGroupLookup":{
          "groupName":"x:kumi:appgroups:cn:pharm"
        }
        
      }
    ]
  }
}
 
=== Response ===
{
  "WsGroupSaveResults": {
    "responseMetadata": {
      "millis": "495",
      "serverVersion": "2.3.0"
    },
    "resultMetadata": {
      "resultCode": "SUCCESS",
      "resultMessage": "Success for: clientVersion: 2.2.200, wsGroupToSaves:
Array size: 1: [0]: WsGroupToSave[\n 
wsGroupLookup=WsGroupLookup[pitGroups=[],groupName=x:kumi:appgroups:cn:pharm],
\n 
wsGroup=WsGroup[extension=pharm,displayExtension=CollegeofPharmacy,description
=...\n, actAsSubject: null, txType: NONE, paramNames: \n, params: null",
      "success": "T"
    },
    "results": [
      {
        "resultMetadata": {
          "resultCode": "SUCCESS_INSERTED",
          "success": "T"
        },
       "wsGroup": {
          "description": "CollegeofPharmacyDescription",
          "displayExtension": "CollegeofPharmacy",
          "displayName": "x:kumi:AppGroups:Community
Network:CollegeofPharmacy",
          "extension": "pharm",
          "idIndex": "10365",
          "name": "x:kumi:appgroups:cn:pharm",
          "typeOfGroup": "group",
          "uuid": "2b355b7f35ea4d35b6db9a6c35d4a266"
        }
      }
    ]
  }
}




Archive powered by MHonArc 2.6.19.

Top of Page