I am trying to access a soap webservice through spring tool suite and maven.
I have done this using the source code from https://spring.io/guides/gs/consuming-web-service/ This works fine .
Dependancy is
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-core</artifactId>
<version>1.5.8</version>
</dependency>
plugin is
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.12.3</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>Test3.wsdl</generatePackage>
<schemas>
<schema>
<url>http://wsf.cdyne.com/WeatherWS/Weather.asmx?wsdl</url>
</schema>
</schemas>
</configuration>
</plugin>
Now I have changed the url to a new link with https:
I can access the wsdl from my browser.
I am getting the error
"Execution default of goal
org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate failed.
(org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate:default:generate-sources)"
I searched a lot for an answer.but could not find a soultion. would really appreciate a help.
Thankyou and Regards,
This is an SSLClient related issue, now there's several ways to fix this. From the eclipse IDE configuration perspective please refer : https://db-blog.web.cern.ch/blog/luis-rodriguez-fernandez/2014-07-java-soap-client-certificate-authentication . Now the best approach would be to have maven configuration changes as part of the build. This can be done using the properties-maven-plugin , here's a thread which discusses the same: SSL client certificate in Maven
Related
So I have an AppEngine application that I'm working on migrating to the Java 11 runtime, and am using the appengine-simple-jetty-main artifact, as outlined in https://cloud.google.com/appengine/docs/standard/java-gen2/war-packaging, to replace the built-in Jetty server of the old Java 8 runtime.
Now if I use mvn jetty:run to bring up my application locally, everything works fine. But when I try to run the appengine-simple-jetty-main wrapper via mvn exec:java -Dexec.args="<my application directory>/target/<application>.war", I hit an issue.
The server starts up fine, and executes various ServletContextListeners that use outside dependencies declared in my pom.xml. I'm also able to navigate to static HTML. When I try to navigate to a JSP Servlet, however, I'm getting the error
HTTP ERROR 500 org.apache.jasper.JasperException: The absolute uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved in either web.xml or the jar files deployed with this application
And likewise, I get this same error when I actually deploy to AppEngine.
As mentioned before, this works just fine when I bypass appengine-simple-jetty-main wrapper using mvn jetty:run, and my pom.xml includes the dependency
<dependency>
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<version>2.0.0</version>
</dependency>
My build section looks like
<build>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>11.0.11</version>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<deploy.projectId>contra-program</deploy.projectId>
<deploy.version>GCLOUD_CONFIG</deploy.version>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>copy</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/appengine-staging</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
So I'm a bit flummoxed. Other maven dependencies seem to be getting brought in just fine. It's only the JSTL library that's having issues (so far, at least), and even then, only when I use the appengine-simple-jetty-main wrapper.
The nearest existing question I could find was cannot load JSTL taglib within embedded Jetty server, but I haven't had luck with the provided solutions (though I'm more than happy to admit the possibility that I'm just not applying one or more of them correctly).
Any pointers would be greatly appreciated :-)
IDE used ECLIPSE
I am trying to pull in a project which has AVRO schema compilation using IDL protocol.
I am getting below error by Maven.
Solutions tried :
Error when importing Maven-GWT project ("No marketplace entries found to handle gwt-maven-plugin") and thats not working for me.
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>${avro.version}</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>schema</goal>
<goal>protocol</goal>
<goal>idl-protocol</goal>
</goals>
<configuration>
<sourceDirectory>src/main/resources/avro</sourceDirectory>
</configuration>
</execution>
</executions>
</plugin>
It was my bad, i went through all setup videos and all were using IntelliJ . In eclipse you need to go to Run As -> Maven build and give compile. This will create the needed AVRO classes in suitable location as mentioned in pom.xml. Exception went after that
I'm using jax-ws maven plugin for generate obiekt from GenericTicketConnectorSOAP.wsdl every object generated without GenericTicketConnectorSOAP, service and port. My pom.xml is wrong or this wsdl isn't prepare to generate service and port ?
Thanks for help.
I cannot use wsdl to generate Java stub classes. I posted my solution here
BTW, the link to your pom does not work. Access denied.
Thanks for your solution. I found other. When I'm using axistools-maven-plugin plugin
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>axistools-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
<configuration>
<urls>
<url>file:/${project.basedir}/otrs/Service.wsdl</url>
</urls>
<packageSpace>my.package</packageSpace>
<testCases>false</testCases>
<serverSide>false</serverSide>
</configuration>
</plugin>
everything are generating by itself(port, service itp)
I am using Mvp4g on the gwt client side. I want to generate symbolMap that is used by RemoteLogging Servlet but when I try to generate symbol map using mvn clean install and specifying -extra folder_name property in gwt-maven-plugin configuration, I don't see the symbolMap files. It is not a plain gwt app but its gwt with mvp4g. I don't know whether its mvp4g that is causing the problem.
mvp4g generates Java code on the client side. This happens before the compiler translates the code to JavaScript. Check your settings. May be this post helps. How to generate symbol map in gwt using maven?
Update:
I use this maven configuration:
<gwt.output>myPathToTheProjectDirectory/output</gwt.output>
<gwt.gen>genSources</gwt.gen>
<gwt.extra>extra</gwt.extra>
And this for the maven-gwt-plugin:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.6.1</version>
<executions>
<execution>
<phase>compile</phase>
<id>bla</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<draftCompile>false</draftCompile>
<disableClassMetadata>true</disableClassMetadata>
<compileReport>true</compileReport>
<warSourceDirectory>${gwt.war}</warSourceDirectory>
<webappDirectory>${gwt.output}</webappDirectory>
<gen>${gwt.output}/${gwt.gen}</gen>
<extra>${gwt.output}/${gwt.extra}</extra>
<fragmentCount>8</fragmentCount>
<extraJvmArgs>-Xms1G -Xmx1G -Xss1024k -XX:MaxPermSize=1024m -Dgwt.persistentunitcache=false</extraJvmArgs>
<localWorkers>7</localWorkers>
</configuration>
</execution>
</executions>
</plugin>
In case I execute maven:compile, the symbolmaps are listed inside the folder myPathToTheProjectDirectory/output/extra/symbolmaps.
Try add this: <set-property name="compiler.useSourceMaps" value="true" />
It solves the problem for me.
We have a common set of XSDs (datatypes, vocabulary, etc.) we're generating with the jaxb2-maven-plugin in its own Maven project. In a second project, I need to refer to one or more of those XSDs at compile time but don't want them included in the resulting artifact. I've created a catalog file, which works fine except I get everything in it.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>${basedir}/src/main/java</outputDirectory>
<target>2.1</target>
<catalog>catalog.cat</catalog>
</configuration>
I've pored over the plugin docs, but they're woefully light on detail. Is there any way to get reuse out of common schemas without every project having to take a copy of them?
Thanks
This is something my maven-jaxb2-plugin can do:
Compiling schema from Maven Artifact
The documentation site is currently very unstable so here's snippets of the documentation.
<configuration>
<forceRegenerate>true</forceRegenerate>
<schemas>
<schema>
<dependencyResource>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin-tests-po</artifactId>
<!-- Can be defined in project dependencies or dependency management -->
<version>${project.version}</version>
<resource>purchaseorder.xsd</resource>
</dependencyResource>
</schema>
</schemas>
</configuration>
Here's a sample project.