WSO2 Composite Application-unable to create .car file - eclipse

When i start with an ESB project and create the Endpoints, Sequences, proxy services and then try to do a Composite Application it will generated poml.xml file. But when i try to create the Archive(.car) it will not be generated. Can anyone please help me out with this? It would be grateful.
Eclipse : kepler
wso2esb-4.8.1

Related

EAR generated using ANT doesn't work on Websphere 8.5

The object is to build .ear by using ANT then deploy it on Websphere 8.5 with wsadmin.
Manually, the ear file is generated from a jar file and after deployment, the web application works very well.
But if I use the ear generated by ANT, after deployment (by hand or by wsadmin), I always have this error :
SRVE0255E: A WebGroup/Virtual Host to handle /WebApp$%7Blogout.url%7D has not been defined.
SRVE0255E: A WebGroup/Virtual Host to handle localhost:9080 has not been defined.
Someone knows which might invoke this problem. I met this message before while my colleague deploy on websphere with a war file directly from a Tomcat server.
Thanks in advance.
It looks like you have not defined web application bindings during deployment. There are several ways to do this, but before that I suggest that you read about Application bindings in WAS, especially the paragraph Virtual host bindings for web modules.
Required bindings can be provided either as parameters to install command of AdminApp or by including binding files directly inside WAR. In some cases WAS can generate default binding for you. For example, to install web application with default bindings you need to provide the following command to wsadmin (simplified):
AdminApp.install(path_to_your_war_file, [
'-appname', your_app_name,
'-CtxRootForWebMod', [
['.*', '.*', your_app_context_root]
],
'-usedefaultbindings'])
I also recommend deploying application once in WAS console to understand possible bindings.

WSO2 ESB use of Custom Mediator

I like to write a Custom Mediator for the WSO2 ESB.
I found some Tutorials for this, but I don't get it working in the WSO2 ESB. I think I maybe have an error in the path I need for the Class Mediator, but let me explain everything:
For writing this Mediator I use the WSO2 developer Studio for Eclipse Juno.
There I created a new ESB Mediator Project called "b64writer" with this content:
package org.wso2.carbon;
import org.apache.synapse.MessageContext;
import org.apache.synapse.mediators.AbstractMediator;
public class B64Mediator extends AbstractMediator {
public boolean mediate(MessageContext context) {
// TODO Implement your mediation logic here
String inhalt = context.getEnvelope().toString();
trace.trace("Message: " + inhalt);
return true;
}
}
In the next step I created a new Carbon Application Project, with the Mediator selected on "Dependencies". The config for this is:
Group ID: org.wso2.carbon.b64mediator
Artifact ID: b64mediator
Version: 1.0.0
I used the button on the right side to create an archive. This archive I copied to "C:\wso2esb\repository\carbonapps\0".
And now my question: How can I use this Mediator?
It should work like this:
<class name="org.wso2.carbon.B64Mediator" />
But it isn't. WSO2 ESB can't find the class. Where's my mistake?
Ok, I had the same issue as you, and I managed to add the mediator by using the WSO2 Developer Studio add-on for eclipse to make a mediation library. (Bring up the new wizard box, and select WSO2/Extensions/Project Types/Mediator Project)
Then create your mediator or put into the project, and export it as a jar file to the /repository/components/lib folder. You have to restart the ESB every time you update the jar or if you're running the ESB when you add the jar.
I hope this helps.
Place the archive inside repository/components/dropins or repository/components/lib (if you don't build it as an osgi bundle) directory.
you should deploy class mediators as java Library artifact and refer them from class Mediators. That is, deply the jar you craeted from dev studio and keep taht in repository/components/lib folder and restart the server.
Then refer like;
<class name="org.wso2.carbon.B64Mediator" />
from your sequence
I don't know if you have solved your problem. I had the same issue but I could solved it.
I created my mediator using the WSO2 Developer Studio "Mediator Project" in Eclipse Kepler. Next I exported to Java/JAR file right clicking in my project and selecting "export generated class files and resources" in the properties.
The JAR file you have to place into repository/components/lib folder and restart your ESB

liferay build-service

I encountered problem in Liferay. I want to create new service exactly the same service like the one that presented in the Liferay's developer documentation. However, after copy-pasting the XML to the portlet folder I try to build t using the command on my command prompt:
ant build-service
I get nothing. It only say on the console like this:
Buildfile: D:\Program\liferay-plugins-sdk-6.1.1\portlets\NewPortlet-portlet\build.xml
build-service:
It stayed like that for so damn long, and still. I don't know what's the problem, is it because the Ant? I use the latest version of apache ant(currently: Apache Ant(TM) version 1.8.4 compiled on May 22 2012)
Is it because of configuration in the build.xml in the portlet folder?
Anybody encountered the same problem? or is it just me?
Ant hanging during a build task is typically because there is a cluster config enabled in a properties file.
Remove/comment out the cluster configurations and that should clear the problem.

Eclipse plugin for spring

IDEA allow to find bean definition, declared in xml, right from Java code. For example if I've got interface SomeIntrfaceImpl IDEA allow me to find out instances of SomeIntrfaceImpl in .xml contextes files, pointing me to .xml file to line of code where bean is created
Is there any Eclipse plugin, that allow me to do the same ?
Yes there is different Eclipse provided by SpringFramework makers itself. They have extended the eclipse to provide easy development for Spring web application and other products like Spring ROO also.
Its is called SpringSourceToolSuit. You can download its latest version from here after providing some basic information about you asked in a form there.
Its the best IDE to develop Spring applications. I am currently using it.
Hope this helps you. Cheers.

WSDL Generation Tools

Can anyone recommend a good (preferably open source) tool for creating WSDL files for some soap web services?
I've tried playing around with some of the eclipse plug ins available and was less than impressed with what I found.
As mentioned above, probably the easiest thing to do is use Apache CXF or Apache Axis2 to automatically generate your WSDL for you.
If you have downloaded the Java EE version of Eclipse, you should be able to create a Dynamic Web Project with the Axis2 facets. If you create a simple Java class in the project, you should be able to right-click on it, and choose Web Services->Create Web Service. That should automatically create an Axis2 service for you.
WSDL would then be available from some URL like: http://localhost/axis/{yourservice}?WSDL
One of the more interesting tools for bypassing all the associated headaches with WSDL is the XSLT script created by Arjen Poutsma (the lead developer of Spring Web Services):
http://blog.springframework.com/arjen/archives/2006/07/27/xslt-that-transforms-from-xsd-to-wsdl/
Basically it allows you to develop simple schemas that correspond to your desired operations (i.e. <BuyItem> and <BuyItemResponse>) and then generate all the associated WSDL crap from the XSD. I highly recommend it if you are interested in 'contract-first' web-services but the idea of using a WSDL as the starting point for that contract makes you feel green.
I am tired of generating massive amounts of files on the filesystem just to transport over SOAP. Now I use Apache CXF for both WS producers and consumers and let it handle the WSDL/stubs generation dynamically.
Depends on which language you're working in, but if you're active in Java then I'd recommend looking at Apache CXF. It's a pretty solid framework for publishing java code as a SOAP web service. It also includes a tool for directly generating WSDL files: java2wsdl
Nice tool can be found as SAAS solution at www.cofiq.com. Its strong point is the datamodel repository from which WSDL and REST JSON can be generated and impact analysis on datamodel changes.