Help on Axis2 Deployment Exception - axis2

I am currently working on Axis2 deployed on Resin 3.1.3. However, I got the below error during deployment:
org.apache.axis2.deployment.DeploymentException: The "Dispatch" phase is not found on the global "InFlow" phase of the axis2.xml file. Make sure the phase is within the axis2.xml file.
Any idea how to resolve this? Thanks in advance for your valuable help.
-Angel

Have a look at this page, underneath the "Phase Order" heading. That should let you know how you need to define the Dispatch phase in your axis2.xml.
It's also possible that the axis2.xml file can't be found or is missing. You haven't provided many details so it's hard to be more specific than that.
Edit:
Remember that Axis2 is a standalone web application that is deployed into a servlet container.
You indicated in your comments that you modified your web application's web.xml. You should not need to do that to get Axis2 to work properly, so you can remove those mappings and redeploy your applications.
Try this guide. Make sure that you can see the "Axis2 Happiness" page described in step 6.
Once you have that working, you can go back to your other web applications and start modifying them to call your web services.

Related

WSO2 ESB HTTP Endpoint does not get added to the Synapse configuration

I have built an ESB Project with an HTTP endpoint. But for some reasons. The Endpoint that I have defined and added to the ESB Solution does not seem to be reflected in the project and seem to be not reflecting when I deploy to the server. The endpoint is basically not being used. I have also tried to check the under the Defined Endpoints tab in the server Enterprise Integrator console, #
Home > Manage > Service Bus > Endpoints
but it isn't there. Numerous restarts have not helped neither has undeploying and redeploying the car file. Can someone point out where I might have gone wrong? As usual, thanks in advance.
Could be different things, to check:
Extract the .car file (it's just a .zip, so rename or use 7zip to
extract) and see if your endpoint is there.
Check if the serverrole in the pom file is correct (should be EnterpriseIntegrator it think)
Sometimes renaming artifacts causes problems as the file does not get renamed correctly or a reference is not updated in one of the
project files. Try removing the endpoint and use 'search in files' to
remove any lingering references in pom files.

WebSphere Liberty + Intellij Idea - JSP reload on fly

Can someone please answer, how to configure WebSphere Liberty under Intellij Idea to reload JSPs files by Ctrl + F10?
Currently classes are reloaded, but JSPs and resources not.
As far as I know, under Tomcat all is reloaded without extra configurations..
Now in my Idea Liberty server configuration are choosen following:
1. Under Deployment Tab: WAR exploaded (or EAR - no matter)
2. Under Server Tab: On frame deactivation and Update action: Update Classes And Resources
In server.xml are selected following features
<feature>webProfile-6.0</feature>
<feature>localConnector-1.0</feature>
<feature>jaxws-2.2</feature>
<feature>jaxb-2.2</feature>
<feature>jaxrs-1.1</feature>
<feature>ejbLite-3.1</feature>
<feature>cdi-1.0</feature>
<feature>appSecurity-2.0</feature>
<feature>jsp-2.2</feature>
<feature>servlet-3.0</feature>
As server is used WebSphere Liberty Profile 7-8.5.5.7 version
Thank you in advance.
In WebSphere Liberty, updating a JSP in an application does not trigger a server/application to refresh / reload similar to what servlet or class file does. The reload of the JSP occurs internally in the JSP Engine only when that particular JSP file is requested. It is then, it will check the timestamp of the JSP against the previously compiled .class file to see if they do not match and trigger a re-translate and re-compile. That is part of the JSP request lifecycle, therefore there is no sense doing anything on the server until that JSP is requested.
Thanks Jay for pointing me into correct direction.
It turns out that IntelliJ Idea correctly updates resources both with JSPs in corresponding modules by Ctrl+F10.
Liberty Server actually caches JSPs in its own folder, and does not even goes back to check if JSP has changed. On my machine on Windows this folder was under following path:
%YOUR_LIBERTY_SERVER_PATH%\workarea\org.eclipse.osgi\138\data\temp\default_node\SMF_WebContainer\%YOUR_EAR(WAR)_NAME%\jsp
My example Liberty Server path:
..\IBM\wlp-javaee7-8.5.5.7\wlp\usr\servers\defaultServer
It looks like the path may differ. So just look for some JSP name which was already accessed, under following folder:
%YOUR_LIBERTY_SERVER_PATH%\workarea
When found, remove 'jsp' folder, and enjoy =) Liberty goes back for fresh JSP.
If somebody knows, how to configure Liberty to always check for JSPs in corresponding module, please let me/us know.
Thank you.

Do I have to build the WCF Client for each machine its used on?

I've built and compiled my WCF client to run successfully. I've found that as long as these two files are together, my client will run anywhere on my computer:
Client.exe
Client.exe.config
When I move these files to another computer, there's an error:
System.InvalidOperationException: Could not find default endpoint element that
references contract 'Service.IService' in the ServiceModel client configuration
section. This might be because no configuration file was found for your
application, or because no endpoint element matching this contract could be
found in the client element.
I've already made sure that the service URL is accessible from the intended host of the computer.
After looking up the issue, seems like a solution is to copy the config retrieved from executing:
svcutil http://host/Service.svc
to the application configuration file. However, the config info is already in the App.config file when I built the project.
Do I need to recompile/build on every client machine that intends to use the WCF web service?
I seem to have resolved this by copying over the entire compiled folder:
Client.exe
Client.config.exe
Client.pdb
Client.vshost.exe
Client.vshost.exe.config
I don't have the time to go back and forth to see which subset of files are core or whether all these files are necessary, but hopefully someone can follow up with an answer to that.

How to remove Axis2 web service

Is there a way to remove an already deployed axis2 web service ?
I tried deactivating, but that does not remove the web service, it merely disables it till the system is restarted.
Thanks. Any help is appreciated.
remove the artifact from the services folder. you may have to set hot update true. Please see the axis2.xml.

Changing Web.Config in Production Environment

My client insists not to store prone-to-change configuration settings in the Web.Config file for our webservice (WCF). His reasoning is that he will have to deploy the application every time he wants to change this or that setting in the configuration file. He, then, told me to store this configuration information in the database because, he says, that way one can change it whenever one needs without re-deploying the whole application, and because it is a more central place if we ever need to have more than one instance of the service running.
Of course I find this argument and reasoning plainly wrong. However, I would like to provide him with clear evidence in that he his mistaken. Can anyone please point me out a source or two I may site to show him that changes in Web.Config are automatically propagated to the runtime and that he doesn't need to do any kind of re-deployment?
Straight from MSDN on ASP.NET Configuration.
ASP.NET Configuration Overview
ASP.NET detects any changes to the configuration files and then
automatically applies those changes to the affected applications,
restarting the applications in most cases.
See How to: Transform Web.config When Deploying a Web Application Project