I have converted WSDL to Java classes, however, I needed to use binding file and suffix added to resolve conflicts. I received classes successfully however with slightly changed type names. When I try to create WebService using JaxWsProxyFactoryBean then I put URL of origin WSDL that has origin names and it gives errors like this:
ERROR 6792 --- [nio-5500-exec-1] o.a.c.w.s.f.ReflectionServiceFactoryBean : Schema element {http://tempuri.org/}SearchMagistratesCourtRequest references undefined type SearchMagistratesCourtRequest for service {http://tempuri.org/}WebServiceService.
And that it right because my generated class has the name "SearchMagistratesCourtRequestType"- with "Type" at the end.
So my binding file used the following customization:
<jaxb:bindings schemaLocation="../xsd/egrul.xsd">
<jaxb:schemaBindings>
<jaxb:package name="ru.spi2.javaee.custom.pravoru.classes.egrul"/>
<jaxb:nameXmlTransform>
<jaxb:typeName suffix="Type"/>
<jaxb:elementName suffix="Element"/> //this one is not needed actually
</jaxb:nameXmlTransform>
</jaxb:schemaBindings>
</jaxb:bindings>
Here was used the suffix.
I create my WebService like this:
JaxWsProxyFactoryBean portFactory = new JaxWsProxyFactoryBean();
portFactory.setAddress(WSDL_URL);
portFactory.setServiceClass(WebService.class);
webService = (WebService) portFactory.create();
Here I put origin WSDL_URL and receive the described errors.
How can I take into account here the binding customization that was used to generate Java classes? Or what might be a solution?