0

this is the code for java webservices and keep get the same error with soapUI and the same error for the xml, I'm working with jdk 8

I have issue with the endpoint of the java web services as it's show in the code but it's keep giving me this response as bellow:

Error loading[http://localhost:8096/ws/biller_customer_authentication]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Premature end of file.

@EnableWs
@Configuration
public class WSConfig extends WsConfigurerAdapter {

    @Bean
    public ServletRegistrationBean messageDispatcherServlet(ApplicationContext applicationContext) {
        MessageDispatcherServlet servlet = new MessageDispatcherServlet();
        servlet.setApplicationContext(applicationContext);
        servlet.setTransformWsdlLocations(true);
        return new ServletRegistrationBean(servlet, "/ws/*");
    }

    @Bean(name = "biller_customer_authentication")
    public DefaultWsdl11Definition billerCustomerAuthentication(XsdSchema billerCustomerAuthenticationSchema) {
        DefaultWsdl11Definition wsdl11Definition = new DefaultWsdl11Definition();
        wsdl11Definition.setPortTypeName("BillerCustomerAuthenticationPort");
        wsdl11Definition.setLocationUri("/ws");
        wsdl11Definition.setTargetNamespace("http://localhost:8096");
        wsdl11Definition.setSchema(billerCustomerAuthenticationSchema );
        return wsdl11Definition;
    }

    @Bean
    public XsdSchema billerCustomerAuthenticationSchema() {
        return new SimpleXsdSchema(new ClassPathResource("xsd/biller.xsd"));
    }
}

0 Answers0