grouper-users - RE: [grouper-users] groupSave WebService call and spaces in values
Subject: Grouper Users - Open Discussion List
List archive
- From: "Hyzer, Chris" <>
- To: Kumi Hagimoto <>, "" <>
- Subject: RE: [grouper-users] groupSave WebService call and spaces in values
- Date: Thu, 9 Mar 2017 20:17:55 +0000
- Accept-language: en-US
- Authentication-results: oregonstate.edu; dkim=none (message not signed) header.d=none;oregonstate.edu; dmarc=none action=none header.from=isc.upenn.edu;
- Ironport-phdr: 9a23:V/nu2h+NLEXqyv9uRHKM819IXTAuvvDOBiVQ1KB+0+kWIJqq85mqBkHD//Il1AaPBtSGra4awLON7ujJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fdbghMhDexe7x/IRS5oQnMuMQbgZZpJ7osxBfOvnZGYfldy3lyJVKUkRb858Ow84Bm/i9Npf8v9NNOXLvjcaggQrNWEDopM2Yu5M32rhbDVheA5mEdUmoNjBVFBRXO4QzgUZfwtiv6sfd92DWfMMbrQ704RSiu4qF2QxLzliwJKyA2/33WisxojaJUvhShpwBkw4XJZI2ZLedycr/Bcd8fQ2dKQ8RfWDFbAo6kb4UBEfcPPfpWoYf+qVsBrxq+ChWjC+700DBEmmP60Lcm3+g9Dw3L2hErEdIUsHTTqdX4LKkeX+K1zajJ0zrDdeta0irj5YjIaBAhoOqMUbxtesfWzEkgCwPFj1WRqIP7JTOYzeUNs3OH4OZ6SOKvk3Aoqwd3ojS12Mgjl5TJi5sTx1vZ+yt5x4M1Kse5SE59edOkEZ1Qtz2EOItsRMMtXX1otDggxrIYpJG7YS4Hw4kkyR7Hc/GLbZKH7g7+WOuUPDt0mW9pdbexhxu97USs1ujxW8uq31tFsiZIl9zBum4R2xHT8sSLV/Vw8lu71TuLygzf8P9ILV0wmKbBNpIswL89m5wOukrZBCD2gl/5jKqOe0Uk5Oeo7+Pnb63+qJKAMIF4lhzyPr0zlMKnHOg0Kw8OUHOF9uim073j4FH5T65Njv0rlKnWrYrWJdwBpq6+Hw9azJos6wq+Dzeh1tQUh34HLE9ZeBKDiIjpPFLOLOrkAve4hlSgiDZrx/bYMb39GpjBMGLMnKv8cbt49kJQ1Rc/wNVR559bFr0NPPf+V03vu9HXEhM0Ngm5z/j7BNh9zo8eXHiAAq6dMKPcq1+I4ecvLvGJZIAJuDb8K/kk6OD0jXIimF8dZrWm0YEKaHCgAPtmJUOZbWDyjdgcDGcGphA+Q/DyiF2eTT5TYG6/X60m5jE8FYKmFZnMRpq0jLycxye0AIdWZntdB1CIEHfobJmEW+wSZC6II89hlCAEWqa7S48nyx6uqBH2x6B5IeXJ5y1L/a7kgfto4uybtRg99DlzE8PVh2KQSmAynmoHRjoxwKdXplZwxVCFyrRxn/EeGNBOsbcBGAggMoPEwvY/Fsv/QBnpf9GVRUygT8n8Rzw9U5h5l9AUZFtlFs/nkwvOxTGCArkJmqaNCYButK/Qwi6iCdx6ziOM9LgzgkNiCuBPL2y9zOYr8gPTFpzEiW2YjK3saLwR2iiL+Wuemznd9HpEWRJ9BP2WFUsUYVHb+JGgvhvP
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
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' DEBUG: WebService: connecting to URL: 'https://grouperdemo.internet2.edu/grouper-ws_v2_3/servicesRest/v2_3_000/groups' ################ 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 Host: grouperdemo.internet2.edu:-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----- 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" } } ] } } |
- [grouper-users] groupSave WebService call and spaces in values, Kumi Hagimoto, 03/09/2017
- RE: [grouper-users] groupSave WebService call and spaces in values, Hyzer, Chris, 03/09/2017
- Re: [grouper-users] groupSave WebService call and spaces in values, Hagimoto, Kumi, 03/09/2017
- RE: [grouper-users] groupSave WebService call and spaces in values, Hyzer, Chris, 03/09/2017
Archive powered by MHonArc 2.6.19.