Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case Sensitivity of identifiers in REST API calls #57

Closed
jerouris opened this issue Oct 18, 2017 · 7 comments
Closed

Case Sensitivity of identifiers in REST API calls #57

jerouris opened this issue Oct 18, 2017 · 7 comments
Assignees

Comments

@jerouris
Copy link
Collaborator

It appears that when the identifier scheme of the participant is not the PEPPOL one, then the identifier value is treated as case sensitive.
There should be an option in the configuration (or some other means) to choose/configure how these identifiers are treated. In rest api calls.
Affects server, might affect also client in inverse: A .tolowercase() is applied in the identifiers before the ServiceGroup or ServiceMetadata Rest api calls.

@phax phax self-assigned this Oct 18, 2017
@wiecia
Copy link

wiecia commented Oct 30, 2018

We also have this problem - when creating serviceGroup from web UI which name has uppercase letters it is automatically converted to lowercase. In REST calls it is not ant throws exceptions

@phax
Copy link
Owner

phax commented Oct 30, 2018

What identifier scheme are you using? simple or oasis?

@wiecia
Copy link

wiecia commented Oct 30, 2018

peppol

phax added a commit that referenced this issue Oct 30, 2018
@phax
Copy link
Owner

phax commented Oct 30, 2018

Okay thanks - which REST API. I tried the "PUT" with the "serviceGroup" interface and it works fine.
So what 1.) HTTP verb on 2. )what path is not working with 3.) what payload?
Thanks for your effort.

@wiecia
Copy link

wiecia commented Oct 30, 2018

Ok, trying to call serviceGroup creation by PUT with curl with given paylod:

curl -n -X PUT -H 'Content-Type: application/xml;charset=UTF-8' -d '9945:idTEST' http://smptest/iso6523-actorid-upis%3A%3A9945%3AidTEST

I got response:

Not found: ServiceGroup Inconsistency. The URL points to iso6523-actorid-upis::9945:idtest whereas the ServiceGroup contains [ParticipantIdentifierType@0x3ef98a80: value=9945:idTEST; scheme=iso6523-actorid-upis] at http://smptest/iso6523-actorid-upis::9945:idTEST

Tomcat log:

[2018-10-30T15:28:07,681] [SMP-SERVER] [INFO ] [ajp-nio-8209-exec-1] [SMP REST API] PUT /iso6523-actorid-upis::9945:idTEST ==> [ServiceGroupType@0x7e3cf026: participantIdentifier=[ParticipantIdentifierType@0x1699348a: value=9945:idTEST; scheme=iso6523-actorid-upis]; serviceMetadataReferenceCollection=null; extension=null] -- com.helger.peppol.smpserver.restapi.SMPServerAPI.saveServiceGroup(SMPServerAPI.java:291)
[2018-10-30T15:28:07,682] [SMP-SERVER] [WARN ] [ajp-nio-8209-exec-1] [SMP REST API] Error in saveServiceGroup(iso6523-actorid-upis::9945:idTEST,[ServiceGroupType@0x7e3cf026: participantIdentifier=[ParticipantIdentifierType@0x1699348a: value=9945:idTEST; scheme=iso6523-actorid-upis]; serviceMetadataReferenceCollection=null; extension=null]) - SMPNotFoundException - Not found: ServiceGroup Inconsistency. The URL points to iso6523-actorid-upis::9945:idtest whereas the ServiceGroup contains [ParticipantIdentifierType@0x1699348a: value=9945:idTEST; scheme=iso6523-actorid-upis] at http://smptest/iso6523-actorid-upis::9945:idTEST -- com.helger.peppol.smpserver.restapi.SMPServerAPI.saveServiceGroup(SMPServerAPI.java:344)

@phax phax closed this as completed in 6a23963 Oct 30, 2018
@phax
Copy link
Owner

phax commented Oct 30, 2018

Thanks for the reminder. Is fixed in v5.0.8

@phax phax added bug and removed enhancement labels Oct 30, 2018
@phax
Copy link
Owner

phax commented Oct 30, 2018

I added myself some test scripts as well - https://github.com/phax/peppol-smp-server/tree/master/test-scripts/localhost_90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants