'org.jvnet.jaxb2.maven xml xmlelement having dash or hyphen
We are using org.jvnet.jaxb2.maven xml plugin to generate DTOs or POJOs from our webservice WSDL(SOAP). We are using it to deserialize the JSON message that we receive in kafka topic and invoke the SOAP webservice(WSDL used for generating DTO). The issue is, we have a few XML elements that have a dash in their name and this is making our service fail. Below is the error:
2022-04-13 12:09:06.304 WARN 15692 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'odCsm72RtSvcApplication': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name '' defined in file messaging\consumer\.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name '' defined in class path resource [com/ikea/inter/itm/delis/od_csm_72_rt_svc/configuration/]: Unsatisfied dependency expressed through method '' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'marshaller' defined in class path resource [com/ikea/inter/itm/delis/od_csm_72_rt_svc/configuration/ConsignmentEvent72Configuration.class]: Invocation of init method failed; nested exception is org.springframework.oxm.UncategorizedMappingException: Unknown JAXB exception; nested exception is com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 5 counts of IllegalAnnotationExceptions
Property consignmentEvent72DefaultData is present but not specified in @XmlType.propOrder
this problem is related to the following location:
at protected com.ikea.inter.itm.delis.od_csm_72_rt_svc.dto.ConsignmentEvent72DefaultDataType com.ikea.inter.itm.delis.od_csm_72_rt_svc.dto.ConsignmentEvent72DataType.consignmentEvent72DefaultData
at com.ikea.inter.itm.delis.od_csm_72_rt_svc.dto.ConsignmentEvent72DataType
at public com.ikea.inter.itm.delis.od_csm_72_rt_svc.dto.ConsignmentEvent72DataType com.ikea.inter.itm.delis.od_csm_72_rt_svc.dto.ObjectFactory.createConsignmentEvent72DataType()
at com.ikea.inter.itm.delis.od_csm_72_rt_svc.dto.ObjectFactory
Property ConsignmentEvent72-DefaultServiceData appears in @XmlType.propOrder, but no such property exists. Maybe you meant consignmentEvent72DefaultData?
this problem is related to the following location:
at com.ikea.inter.itm.delis.od_csm_72_rt_svc.dto.ConsignmentEvent72DataType
Please let me know how do we overcome this.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
