phax / ph-ubl

Java library for reading and writing UBL 2.0, 2.1, 2.2, 2.3 and 2.4 (CS01) documents

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

custom XSD schema

alkahtani opened this issue · comments

first of all i would like to thank you to make developers life easy , i have custom XSD , it is based on UBL2.1 and i would like to use this library to generate sources and start creating invoices based on it , i don't how to start , i cloned this repo and i replaced the XSD with our XSD , the sources generated successfully , i referenced the JAR file in in a new project but it seems i am doing something wrong , i have attached my custom UBL2.1 for your reference , i tried many plugins to generate the sources with no luck
would you please direct me how to start , thanks .

UBL2.1.zip

This is a bit difficult because you need to use the right Maven plugin, Catalog files etc.

I suggest you start looking at https://github.com/Finmatics/einvoice-transformer/tree/master/et-inbetween - this is exactly where I did what you want to do. I extended the UBL 2.1 Invoice format with custom fields but referencing the common stuff from ph-ubl.

Especially look at:

  • pom.xml
  • folder src/main/jaxb

hth

@phax many thanks for your help , will , what i have done right now , i replaced the XSD schema in your UBL2.1 with my own schema , the sources generated successfully , i don't know if i have to take care of anything or this is the right way , please if you have anything in mind that i should take care of let me know .

Thanks

Well, you still need to add ph-ub21 as a dependency to your code. Besides that, I think everything is good.
Try generateding example documents and marshal them - if that works, your good :) (of course all stated from an outsiders perspective)

@phax Many thanks , i really appreciate the time to reply , i will let you know what i came out with .

Super - always interesting :) Closing this issue for now