Where to place .erl & .hrl files in phoenix project? - soap

I have phoenix project and am going to use soap request. for that purpose I've generated stubs from wsdl as described here.
The question is where to put auto-generated .erl and .hrl client modules within phoenix project?

erl files should go in any directory present in the erlc_paths config, and hrl in the one in specified by erlc_include_path config. The default value of erlc_paths is ["src"] and of erlc_include_path is "include", so you can simply place the .erl file(s) in /src and .hrl file(s) in /include and they will be compiled by mix and available in your Elixir code.

Related

mybatis-generator: Create non-java files?

I am using the mybatis-generator in a maven project to generate the Java files for a few tables. At the end of the generation, I would like to generate a few non-java files like properties files and resources. However the default generator allows me to generate only XML and Java files. Is there any way to also get the generator to create sql files, SPI definitions and property files for example?
Looking inside the generator, it seems that the Generated java files and XML files go through some further process(formatting et al). Even if I write a custom plugin, I can generate an XML or an sql file only but not a properties files or an sql file. Even if I did, I cannot get the process to finish because the subsequent steps would fail.
Currently, I am getting over these by creating my own files and writing them thru a custom plugin. However, during the plugin execution, the folder target/generates-sources/mybatis-generator is not created yet. Therefore assuming that location to have already been created is ruled out. On the other hand, if I go ahead and create the folder and its internal META-INF/services folder, I am not sure if this will be overwritten at a later stage. In addition, my plugin does not (by virtue of the way the generator initiates plugins), have access to the project root folder. So that is not an option either.
I neither have access to the ShellCallBack, implying that postponing the file creation to a well defined time-point in the build process is also not possible.
So how do I go about creating the service definitions and the additional resource files?
The last resort is to hard-code the project folder or to pump the project folder through a property. This is coming to my rescue now. But clearly, the generated files are being detected by my git client and I have to clean up these files also despite their being dynamic.
Hints please?
Thanks in advance.
Rahul
The generator currently supports Java, Kotlin, and XML file generation. There is an open feature request to support other file types in plugins. You can follow it here: https://github.com/mybatis/generator/issues/752

Bring back the original project from a WSDL file or a WAR file

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/

How to configure output folder for ejb stubs in RSA "prepare for deployment"

I would like to configure the output folder for the generated EJB stubs for WAS 7.0 when doing a "prepare for deployment" in RSA 8.0.
Currently the sources of the generated stubs are generated to the normal source folder of the eclipse project. Because of that generated and manually edited code is mixed. That's why I can't easily create SVN ignores for these generated files. So I would like that these files are generated to another source folder ejbmodule-gen instead of the ejbmodule source folder that contains the manually edited sources.
In the preferences I'm able to set the output folder of an EJB Project under Java EE -> Project. However this does not have an effect.
I could also use some more elaborate patterns for SVN ignores. But I don't want to mess around with them as they are already repeated much too often in build files and other places in the project.
So how can I make sure that selecting Java EE -> Prepare for Deployment will put generated source files to another folder than the original source folder of the project?
I am afraid that for EJB 2.1 the following limitation holds on Rational version 8.0:
Multiple output folders are not supported for EJB projects
However if there is enough flexibility in the project I would recommend to manually use the createEJBStubs Websphere command to generate the EJB stubs or (better) to use an ANT (or whatever) build script to build the binaries per your preference.

My first GWT Module

I created a module to share code across a couple of projects.
I created a GWT project: Framework. I then created a module com.framework.Framework within the project. The Framework project contains both client code, in the com.framework.client packages, and server code in the com.framework.server packages.
I try to consume this by
- Adding the project to the Java Build Path
- Adding to the module's definition
When I run the consuming project, I get NoClassDefFoundErrors for Framework classes I use in the module's server code.
What am I missing?
If I jar up the Framework project's WEB-INF\classes contents and put it into the consuming project's WEB-INF\lib folder, as well as add it to the Build Path it seems to work, but I don't see a way to keep the framework classes up to date in the consuming project(s).
Please make sure that you create gwt.xml file via menu New->Module, and in this gwt.xml file, you must declare your entry point class.

what is the use of jbossall-client.jar?

i am wondering what is use of jbossall-client.jar ?
Up to JBoss version 4.2.3 these file contains client code for application.
But since JBoss 5.0 these file contains only dependences against other libraries from server client directory. If you want use it you must put also other jar file on in the same directory as jbossall-client.jar. These is excerpt from readme.txt file from jbossall file:
This jar file contains a classpath reference to various client jar files used by jboss client applications.
Each of the jar files in the following list must available in the same directory as the jbossall-client.jar, Otherwise they will not be found by the classloader.
In readme.txt you can also find the list jar files against which jbossall-client has dependencies.
It's a bundling of all JBoss client code into a single JAR, for those who don't want to bother with selecting the individual smaller JARs.