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

Supported versions of business card data model #62

Closed
tmhide opened this issue Apr 12, 2022 · 7 comments
Closed

Supported versions of business card data model #62

tmhide opened this issue Apr 12, 2022 · 7 comments
Assignees
Labels

Comments

@tmhide
Copy link

tmhide commented Apr 12, 2022

There is a business card data model v3, but I don't think phoss-smp and Peppol Directory support this.
Is the version that phoss-smp and Peppol Directory support v2?
https://github.com/phax/phoss-directory/tree/master/phoss-directory-businesscard/src/main/resources/schemas

@tmhide
Copy link
Author

tmhide commented Apr 12, 2022

Uh, phoss-smp and Peppol Directory support v1?
What are v2 and v3 for?

@phax phax self-assigned this Apr 12, 2022
@phax phax added the question label Apr 12, 2022
@phax
Copy link
Owner

phax commented Apr 12, 2022

The version numbers are "artificially" assigned to the available XSDs.
v3 corresponds to peppol-directory-business-card-20180621.xsd
In the end it doesn't matter what the SMP creates - the Directory is able to deal with all three versions, but we recommend to Service Providers to only use the latest and greatest version.

phoss SMP uses the V3 format to create its BusinessCards as you can see in https://github.com/phax/phoss-smp/blob/master/phoss-smp-webapp/src/main/java/com/helger/phoss/smp/rest/APIExecutorBusinessCardGet.java#L59

hth

@tmhide
Copy link
Author

tmhide commented Apr 12, 2022

Thank you for your response.
I have another question about BusinessCard.

In v3, the type of businessCard.businessEntity.name is MultilingualNameType.
https://github.com/phax/phoss-directory/blob/master/phoss-directory-businesscard/src/main/resources/schemas/peppol-directory-business-card-20180621.xsd#L87

Does phoss SMP and Peppol Directory support MultilingualNameType?
Checking the REST API and registration page of phoss SMP, I don't think it supports MultilingualNameType.
I tried calling the following REST API, but the language attribute was ignored.
PUT /businesscard/{ServiceGroupId}

<BusinessCard xmlns="http://www.peppol.eu/schema/pd/businesscard/20180621/">
  <ParticipantIdentifier scheme="iso6523-actorid-upis">9876:participantid</ParticipantIdentifier>
  <BusinessEntity>
    <Name language="en">Test entity</Name>
    <CountryCode>AT</CountryCode>
    <Identifier scheme="iso6523-actorid-upis">12345678912</Identifier>
  </BusinessEntity>
</BusinessCard>

@phax
Copy link
Owner

phax commented Apr 13, 2022

Well phoss SMP does support Business Card v3, but on the GUI it does not allow you to provide a language.
So if you import the Business Card via the API including a Name with a lanaguege that should (I have not tested it) be persisted and provided when queried.

@tmhide
Copy link
Author

tmhide commented Apr 22, 2022

I tried PUT /businesscard/{participantIdentifier}, but the language attribute did not register.
According to the following implementation, phoss-smp does not support Business Card v3 via the API.

https://github.com/phax/phoss-smp/blob/7ceec53f9cecef3f012af5150de46ff5c57848f7/phoss-smp-backend-sql/src/main/java/com/helger/phoss/smp/backend/sql/mgr/SMPBusinessCardManagerJDBC.java#L212

I tried the following update query, but GET /businesscard/{participantIdentifier} did not output in Business Card v3 format.

update smp_bce set  name = '[{"name":"test","language":"en"}]' where id = 'idxxx'

I would like to see support for MultilingualNameType even if it is only for the REST API (GET/PUT), do you have any plans?

@phax
Copy link
Owner

phax commented Apr 22, 2022

@tmhide sure, that should work. May I ask you to copy the content of your last request to a ticket at https://github.com/phax/phoss-smp/issues - thanks.

@phax
Copy link
Owner

phax commented Apr 22, 2022

Thank for this. Closing this ticket here.

@phax phax closed this as completed Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants