phax / phoss-smp

phoss SMP - a Peppol and OASIS BDXR SMP Server, CEF eDelivery compliant
125 stars 36 forks source link

Error log when registering in Peppol directory with RestAPI #257

Closed sakasaka19 closed 7 months ago

sakasaka19 commented 7 months ago

Hi Philip

Thanks for providing us with a great SMP.

When using PhossSMP's RestAPI to register Participant's information in PeppolDirectory, I get the following error log

"JAXB [fatal_error] @ (1:77) cvc-elt.1.a: Cannot find the declaration of element 'BusinessCard'. (org.xml.sax.SAXParseException: cvc-elt.1.a: Cannot find the declaration of element 'BusinessCard'.)" (com.helger.jaxb.validation.LoggingValidationEventHandler.onEvent(LoggingValidationEventHandler.java:54))

The registration itself succeeds, but I want to suppress the generation of error logs. Incidentally, the error log is not output when registering via GUI.

Best regards

phax commented 7 months ago

Hi @sakasaka19, Happy to hear that it works as expected :) May I ask where exactly you get that error message? Is it when you "demo click" the /businesscard API or does it happen when the Directory fetches the BusinessCard from you?

sakasaka19 commented 7 months ago

Thanks for the quick reply. I didn't understand what a "demo click" was, so I hope the following answer is ok?

PUT /businesscard/{ServiceGroupId}

PhossSMP is throwing an error message when I register using this API.

phax commented 7 months ago

Ah okay - got it. What happens is, that the SMP tries to detect the format of the Business Card to be used, because there are 3 different versions of the Business Card available. In the next update, the failed tries will not create error log messages anymore.

So please ignore this error - it works as designed.

P.S. With "demo click" I meant in the GUI via this icon: grafik But it is not affected.

sakasaka19 commented 7 months ago

I'm glad you found the cause of the problem. I look forward to your next update.

Thank you very much.

phax commented 7 months ago

The necessary change was implicitly part of https://github.com/phax/phoss-smp/commit/653c01ba48ef4c39e049f0731a0a5f98d538eb9c