4

I want to consume a SOAP web service using Spring Boot. For this purpose, I have been given one WSDL URL by the company. I have just changed the company name with test because I cannot expose the company name but URL is valid. When I am clicking this URL then WSDL file is generated on the browser.

https://uat.test.co.in/cordys/WSDLGateway.wcp?service=http://schemas.cordys.com/default/getIDV&organization=o=B2C,cn=cordys,cn=defaultInst106,o=mydomain.com

To convert WSDL to Java classes I am using maven-jaxb2-plugin and as we know this plugin automatically converts the WSDL into Java Binding classes if URL is live or valid.

This is my plugin

<plugin>
    <groupId>org.jvnet.jaxb2.maven2</groupId>
    <artifactId>maven-jaxb2-plugin</artifactId>
    <version>0.13.1</version>
    <executions>
        <execution>
            <goals>
                <goal>generate</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <schemaLanguage>WSDL</schemaLanguage>
        <generateDirectory>${project.basedir}/src/main/java</generateDirectory>
        <generatePackage>com.groupbima.consume</generatePackage>
        <schemas>
            <schema>
                <url>https://uat.bhartiaxaonline.co.in/cordys/WSDLGateway.wcp?service=http://schemas.cordys.com/default/getIDV&amp;organization=o=B2C,cn=cordys,cn=defaultInst106,o=mydomain.com</url>
            </schema>
        </schemas>
    </configuration>
</plugin>

If URL is not live or valid then it rise errors like this

Failed to compile input schema(s)!
Error messages should have been provided.
(org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.13.1:generate:default:generate-sources)

My URL is live and valid but still it is raising same error.

I have another WSDL URL which is created by me

http://localhost:8080/ws/employees.wsdl

When I am using the same plugin then automatically maven-jaxb2-plugin converts the WSDL into Java Binding classes.

But when I am using this https://uat.test.co.in/cordys/WSDLGateway.wcp?service=http://schemas.cordys.com/default/getIDV&organization=o=B2C,cn=cordys,cn=defaultInst106,o=mydomain.com URL then it is not generating any classes and I am facing this issue.

Failed to compile input schema(s)!
Error messages should have been provided.
(org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.13.1:generate:default:generate-sources)

How to resolve this issue?

Altaf Ansari
  • 726
  • 2
  • 7
  • 18
  • your localhost URL is `http` whereas your target url is `https`. Could you cross check whether there is any SSL certificate issue with the URL `https://uat.test.co.in....`. Please provide maven error logs if that's not sensitive. – snmaddula Nov 18 '18 at 13:58
  • **This is maven error log** Failed to compile input schema(s)Error messages should have been provided. (org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.13.1:generate:default:generate-sources) org.apache.maven.plugin.MojoExecutionException: Failed to compile input schema(s)! Error messages should have been provided. at org.jvnet.mjiip.v_2_2.XJC22Mojo.generateCode(XJC22Mojo.java:70) at org.jvnet.mjiip.v_2_2.XJC22Mojo.doExecute(XJC22Mojo.java:41) at org.jvnet.mjiip.v_2_2.XJC22Mojo.doExecute(XJC22Mojo.java:28) at org.jvnet.jaxb2.maven2.RawXJC2Mojo.doExecute(RawXJC2Mojo.java:505` – Altaf Ansari Nov 19 '18 at 04:28
  • You should provide the complete error log, not just the exception. – lexicore Nov 23 '18 at 21:02
  • How can I provide complete log even comment supports only 600 characters? – Altaf Ansari Nov 24 '18 at 03:46
  • Post your log on some other site like Pastebin, gist, etc. and give the link in a comment here, or edit your original post. – cdan Jan 24 '19 at 23:59

0 Answers0