Is it possible for wsimport to ignore "import" tags in wsdl that are http-linked to some XSD files and insted use XSD files provided next to the wsdl file?. I know svcutil is able to do so.
you can use an XML catalog to help tell wsimport how/where to resolve schema elements.
xmlcatalog ant docs
defines the xmlcatalog task for ant. you can reference the catalog via the "catalog" attribute of the wsimport ant task, or via the -catalog command line option of wsimport.
jaxws xml catalog docs
I hope this helps.
Related
We have lost our java code that implement a web service. Now we have only a wsdl file (and a WAR file) published in tomcat. We need to bring back the original java project so I have tried to generate java source code from WSDL file (and WAR file) and I succeeded -by using axis2 (WSDL2JAVA) plugin- but I think it generates only the java classes that should exist in the src package of the project.. no welcome pages or index.xml etc.. I Don't know what other things are missing and how to bring them back.
My question is: what to do after generating java classes from WSDL file? should I complete the other project parts in my own? Is there a way to bring back exactly the original project from WSDL or WAR file?
As per the Scenario you mentioned for WAR file you can use JAD tool to unpack the whole code but with certain limitations like you cannot edit or save the code and I am not sure about the copy feature because it was not working for previous version.
Here is the link below.
https://varaneckas.com/jad/
In the wsdl_first sample of Apache CXF the pom file puts the wsdl file in WEB-INF/. Also all the xml files and the wsdl file in src/main/resources ends up in WEB-INF/classes, because they are in src/main/resources.
I deploy the webapp in tomcat.
My question is: when I remove the wsdl file from WEB-INF and the xml files and the wsdl file from WEB-INF/classes (and restart Tomcat), the webapp still works. Why does the pom file put the wsdl file explicitly in WEB-INF? And why are the xml files and the wsdl file in WEB-INF/classes?
In src/main/webapp there are web.xml and cxf-servlet.xml. They end up in WEB-INF/. When I remove them, things go wrong.
So remember a WSDL is the official definition of a service interface. In other words if you want to create a client for a SOAP service you need a WSDL. You can use this WSDL to then generate code artifacts for the client. It is almost exactly similar to generating a server from a WSDL.
Now the WEB-INF folder is published and when the WSDL is in there it is published too. This will allow clients to get to the WSDL. However the WSDL is not needed for the service to run. Thus we can remove the WSDL.
You would typically remove the WSDL when you secure a service against public browsing. This will remove the ability for anyone just to get hold of the service definition.
Remember the WSDL is just a definition used to generate artefacts in various languages such as Java, .Net etc.
However it is not required for a SOAP server or client to run. Just for code generation.
I am using Spring Rest Doc and I am generating the HTML file of the documentation using the mvn:install.
Now I have been asked to generate this file without maven cause in our project we are not going to use it.
Is there any way to generate it without the maven install task?
Thank you
There's an Asciidoctor Ant task that can be used to generate HTML from Asciidoctor in an Ant build.
I am looking for a tool that reads the java file with swagger annotation and generates that API JSON spec file? Please do let me know if there is already one.
You can use swaggerdocgen Maven plugin to generate Swagger documents in the both JSON and YAML formats. This is assuming that you are able to use Maven for your application.
You can find more information about swaggerdocgen plugin here: https://github.com/WASdev/tool.swagger.docgen
Basically, you need to create a WAR Maven project and add your application files there. Then as part of running mvn package, the Swagger document will be generated in the 'Target' directory of your project.
This is not really an error but I'm trying to find out how to tell the GWT compiler to put the generated files in folder xx/yyinstead of the default ModuleName/ModulaName+Package that it currently puts them in
https://developers.google.com/web-toolkit/doc/latest/DevGuideCompilingAndDebugging#DevGuideCompilerOptions
is not really of any help as can't see how to add the configuration parameters.
The -war option allows you to specify were the output files are generated. The directory name of the generated files in this directory is by default the package + module name. You can specify another name by setting this in your module .gwt.xml file: <module rename-to="somename"> where somename will be the name of the directory. The first reference of ModuleName in ModuleName/ModulaName+Package is the deployment name. The name is the url set in the GWT tab of you devmode debug configuration.
Hilbrand, Thanks but the issue I was having was how to pass the parameters to the GWT compiler when running it in eclipse. I didn't really explain it properly in my question.
Anyways for anyones who stumble on this question here is the solution
http://turbomanage.wordpress.com/2010/04/14/gwt-compiler-options/
Its in the advanced option when you launch the GWT Compile command in eclipse.