0

I'm trying to deploy a SOAP based application on my Weblogic 12c but I'm having a lot of problems.

I have implemented SpringBootServletInitializer:

public class AppSoapService extends SpringBootServletInitializer implements WebApplicationInitializer {

    public static void main(String[] args) {
        SpringApplication.run(AppSoapService.class, args);
    }

    /**
     * Configure the application. Normally all you would need to do is to add sources
     * (e.g. config classes) because other settings have sensible defaults. You might
     * choose (for instance) to add default command line arguments, or set an active
     * Spring profile.
     *
     * @param builder a builder for the application context
     * @return the application builder
     * @see SpringApplicationBuilder
     */
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(AppSoapService.class, WebServiceConfig.class);
    }

}

Following How to Spring Boot app run on weblogic 12C? and Spring Boot exception: Could not open ServletContext resource [/WEB-INF/dispatcherServlet-servlet.xml], I have created dispatcherServlet-servlet.xml but now I'm getting the follow error:

org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/messageDispatcherServlet-servlet.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/messageDispatcherServlet-servlet.xml]

This is my weblogic.xml

<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app       http://xmlns.oracle.com/weblogic/weblogic-web-app/1.9/weblogic-web-app.xsd">
    <wls:context-root>as-soap</wls:context-root>
    <wls:container-descriptor>
        <wls:prefer-web-inf-classes>false</wls:prefer-web-inf-classes>
        <wls:prefer-application-packages>
            <wls:package-name>org.slf4j</wls:package-name>
            <wls:package-name>org.springframework</wls:package-name>
            <wls:package-name>org.apache</wls:package-name>
            <wls:package-name>org.springdoc</wls:package-name>
            <wls:package-name>wsdl4j</wls:package-name>
            <wls:package-name>org.mapstruct</wls:package-name>
            <wls:package-name>com.fasterxml</wls:package-name>
        </wls:prefer-application-packages>
    </wls:container-descriptor>

    <wls:library-ref>
        <wls:library-name>as-arch</wls:library-name>
        <wls:specification-version>1.2</wls:specification-version>
        <wls:implementation-version>1.2.0</wls:implementation-version>
    </wls:library-ref>
    <wls:library-ref>
        <wls:library-name>as-service</wls:library-name>
        <wls:specification-version>1.3</wls:specification-version>
        <wls:implementation-version>1.3.0</wls:implementation-version>
    </wls:library-ref>
</wls:weblogic-web-app>

Could someone help me?

Jose A. Matarán
  • 1,044
  • 3
  • 13
  • 33

1 Answers1

0

This is a bit old question. I found myself in the same situation. Looking further I found: https://jtuto.com/solved-exposing-soap-webservice-with-spring-boot-and-weblogic/

Then, combining both the documentation in Spring about deploying into Weblogic (link provided in the question), and the information in the previous link, the webservice deployed straighforward.

In my case, I needed to deploy to a WL 12.1.3 with JDK 1.7. So I had to go back to spring-boot 1.5 and specify version 2.5.0 for org.codehaus.mojo.jaxb2-maven-plugin. Otherwise, some dependencies required a higher version of JDK. In the case Java 8 is available for Weblogic, this would not apply.