Discussion:
Hello World Example Help
Benamin
2007-04-07 18:55:44 UTC
Permalink
I successfully ran the Hello World example. Now, I am trying to add some
custom functionality to the hello world se. The functionality involves
adding in a new class inside the MyEndpoint.java file. This new class uses
a few custom packages. I can compile this class in its own file just fine,
but when I try to add it to MyEndpoint.java, and run mvn install, it says
the packages do not exist. Any ideas what I need to do to get ServiceMix to
recognize these packages? Basically, what I have added is

import somepackage.*;
import anotherpackage.*;

class MyClass { }

And mvn install balks on the import of the packages saying the package does
not exist. The packages are in jars which I have added to my classpath env
var.
--
View this message in context: http://www.nabble.com/Hello-World-Example-Help-tf3541687s12049.html#a9886849
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Bruce Snyder
2007-04-07 20:12:32 UTC
Permalink
Post by Benamin
I successfully ran the Hello World example. Now, I am trying to add some
custom functionality to the hello world se. The functionality involves
adding in a new class inside the MyEndpoint.java file. This new class uses
a few custom packages. I can compile this class in its own file just fine,
but when I try to add it to MyEndpoint.java, and run mvn install, it says
the packages do not exist. Any ideas what I need to do to get ServiceMix to
recognize these packages? Basically, what I have added is
import somepackage.*;
import anotherpackage.*;
class MyClass { }
And mvn install balks on the import of the packages saying the package does
not exist. The packages are in jars which I have added to my classpath env
var.
You need to add the JARs to the pom.xml file in the dependencies
section. You will then have to places the JARs to the local Maven
repository so that Maven can locate them. Make sure that the JARs are
located in a directory that matches the groupId of the dependency.

Bruce
--
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
Benamin
2007-04-07 22:19:14 UTC
Permalink
Post by Bruce Snyder
You need to add the JARs to the pom.xml file in the dependencies
section. You will then have to places the JARs to the local Maven
repository so that Maven can locate them. Make sure that the JARs are
located in a directory that matches the groupId of the dependency.
Ok, this is a sample of what I have tried to add to the pom.xml:

<dependency>
<groupId>MyDir.MyJar</groupId>
<artifactId>MyJar</artifactId>
<version>1.1</version>
</dependency>

Then, in the maven repository, I have attempted to add the jar to the
following directory structure:
MyDir
- MyJar
- MyJar
- 1.1
MyJar-1.1.jar

For some reason, it still can't find the artifact. Any ideas? I tried
doing it like the junit dependency that was already in the pom.xml for the
helloworld se.
--
View this message in context: http://www.nabble.com/Hello-World-Example-Help-tf3541687s12049.html#a9888375
Sent from the ServiceMix - User mailing list archive at Nabble.com.
chandra shekher gupta
2007-05-08 13:03:58 UTC
Permalink
Hi Benamin,

Can you please describe the steps in brief how you build the hello world
sample application and deployed it?

I have followed the hello-world BC steps... but that is not completed doc.
any way there are more documents on servicemix like
http://incubator.apache.org/servicemix/what-is-a-jbi-su-and-how-do-i-create-one.html
and i have followed them...but not able to build and run properly. Please
can you post the idea in brief.

Many Regards
Chandra
Post by Benamin
Post by Bruce Snyder
You need to add the JARs to the pom.xml file in the dependencies
section. You will then have to places the JARs to the local Maven
repository so that Maven can locate them. Make sure that the JARs are
located in a directory that matches the groupId of the dependency.
<dependency>
<groupId>MyDir.MyJar</groupId>
<artifactId>MyJar</artifactId>
<version>1.1</version>
</dependency>
Then, in the maven repository, I have attempted to add the jar to the
MyDir
- MyJar
- MyJar
- 1.1
MyJar-1.1.jar
For some reason, it still can't find the artifact. Any ideas? I tried
doing it like the junit dependency that was already in the pom.xml for the
helloworld se.
--
View this message in context: http://www.nabble.com/Hello-World-Example-Help-tf3541687s12049.html#a10375421
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Bruce Snyder
2007-05-08 15:57:10 UTC
Permalink
Post by chandra shekher gupta
Hi Benamin,
Can you please describe the steps in brief how you build the hello world
sample application and deployed it?
I have followed the hello-world BC steps... but that is not completed doc.
any way there are more documents on servicemix like
http://incubator.apache.org/servicemix/what-is-a-jbi-su-and-how-do-i-create-one.html
and i have followed them...but not able to build and run properly. Please
can you post the idea in brief.
What do you mean that you're not able to build and run properly? Is
the build failing? Are you getting errors? Please provide some detail.

I also added a small paragraph about deploying the SA to ServiceMIx here:

http://cwiki.apache.org/confluence/pages/viewpage.action?pageId=50299

The changes should be pushed to the website soon.

Bruce
--
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
chandra shekher gupta
2007-05-09 04:59:37 UTC
Permalink
Well, As per the hello world BC instruction..

I created hello-world-smx as top folder.

inside that using maven, i created my-consumer-bc. it is provider.
aftre that i created my-consumer-su


this is xbean...


<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:consumer="http://servicemix.apache.org/consumer">

<http:endpoint service="consumer:service"
endpoint="soap"
role="provider"
locationURI="http://localhost:8192/example/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
soap="true" />

</beans>

and in last i created my-sa..

this is pom.xml

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>my-sa</artifactId>
<packaging>jbi-service-assembly</packaging>
<version>1.0-SNAPSHOT</version>
<name>A custom project</name>
<url>http://www.myorganization.org</url>
<pluginRepositories>
<pluginRepository>
<id>apache.incubating</id>
<name>Apache Incubating Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>apache.incubating</id>
<name>Apache Incubating Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository</url>
</repository>
</repositories>
<properties>
<servicemix-version>3.1-incubating</servicemix-version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mycompany</groupId>
<artifactId>my-consumer-su</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>

</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.servicemix.tooling</groupId>
<artifactId>jbi-maven-plugin</artifactId>
<version>${servicemix-version}</version>
<extensions>true</extensions>
<configuration>
<type>service-assembly</type>
</configuration>
</plugin>
</plugins>
</build>
</project>


finally i do compile and copy these files to smix deploy

my-sa-1.0-SNAPSHOT.jar
my-consumer-bc-1.0-SNAPSHOT-installer.zip

i start service mix and it does not fetch any error so i assume it deploy
it properly
but to access this service what should i do?

if i access that like this http://localhost:8192/example/ 404 error ic
oming..


please advice me

regards
chandra
Post by Bruce Snyder
Post by chandra shekher gupta
Hi Benamin,
Can you please describe the steps in brief how you build the hello world
sample application and deployed it?
I have followed the hello-world BC steps... but that is not completed doc.
any way there are more documents on servicemix like
http://incubator.apache.org/servicemix/what-is-a-jbi-su-and-how-do-i-create-one.html
and i have followed them...but not able to build and run properly. Please
can you post the idea in brief.
What do you mean that you're not able to build and run properly? Is
the build failing? Are you getting errors? Please provide some detail.
http://cwiki.apache.org/confluence/pages/viewpage.action?pageId=50299
The changes should be pushed to the website soon.
Bruce
--
perl -e 'print
);'
Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
--
View this message in context: http://www.nabble.com/Hello-World-Example-Help-tf3541687s12049.html#a10388503
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Adrian Co
2007-05-09 05:28:51 UTC
Permalink
The xbean.xml says role="provider". I'm guessing you mean "consumer"?
Post by chandra shekher gupta
Well, As per the hello world BC instruction..
I created hello-world-smx as top folder.
inside that using maven, i created my-consumer-bc. it is provider.
aftre that i created my-consumer-su
this is xbean...
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:consumer="http://servicemix.apache.org/consumer">
<http:endpoint service="consumer:service"
endpoint="soap"
role="provider"
locationURI="http://localhost:8192/example/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
soap="true" />
</beans>
and in last i created my-sa..
this is pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>my-sa</artifactId>
<packaging>jbi-service-assembly</packaging>
<version>1.0-SNAPSHOT</version>
<name>A custom project</name>
<url>http://www.myorganization.org</url>
<pluginRepositories>
<pluginRepository>
<id>apache.incubating</id>
<name>Apache Incubating Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>apache.incubating</id>
<name>Apache Incubating Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository</url>
</repository>
</repositories>
<properties>
<servicemix-version>3.1-incubating</servicemix-version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mycompany</groupId>
<artifactId>my-consumer-su</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.servicemix.tooling</groupId>
<artifactId>jbi-maven-plugin</artifactId>
<version>${servicemix-version}</version>
<extensions>true</extensions>
<configuration>
<type>service-assembly</type>
</configuration>
</plugin>
</plugins>
</build>
</project>
finally i do compile and copy these files to smix deploy
my-sa-1.0-SNAPSHOT.jar
my-consumer-bc-1.0-SNAPSHOT-installer.zip
i start service mix and it does not fetch any error so i assume it deploy
it properly
but to access this service what should i do?
if i access that like this http://localhost:8192/example/ 404 error ic
oming..
please advice me
regards
chandra
Post by Bruce Snyder
Post by chandra shekher gupta
Hi Benamin,
Can you please describe the steps in brief how you build the hello world
sample application and deployed it?
I have followed the hello-world BC steps... but that is not completed doc.
any way there are more documents on servicemix like
http://incubator.apache.org/servicemix/what-is-a-jbi-su-and-how-do-i-create-one.html
and i have followed them...but not able to build and run properly. Please
can you post the idea in brief.
What do you mean that you're not able to build and run properly? Is
the build failing? Are you getting errors? Please provide some detail.
http://cwiki.apache.org/confluence/pages/viewpage.action?pageId=50299
The changes should be pushed to the website soon.
Bruce
--
perl -e 'print
);'
Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
chandra shekher gupta
2007-05-09 05:36:48 UTC
Permalink
No It is provider not consumer
Post by Adrian Co
The xbean.xml says role="provider". I'm guessing you mean "consumer"?
Post by chandra shekher gupta
Well, As per the hello world BC instruction..
I created hello-world-smx as top folder.
inside that using maven, i created my-consumer-bc. it is provider.
aftre that i created my-consumer-su
this is xbean...
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:consumer="http://servicemix.apache.org/consumer">
<http:endpoint service="consumer:service"
endpoint="soap"
role="provider"
locationURI="http://localhost:8192/example/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
soap="true" />
</beans>
and in last i created my-sa..
this is pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>my-sa</artifactId>
<packaging>jbi-service-assembly</packaging>
<version>1.0-SNAPSHOT</version>
<name>A custom project</name>
<url>http://www.myorganization.org</url>
<pluginRepositories>
<pluginRepository>
<id>apache.incubating</id>
<name>Apache Incubating Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>apache.incubating</id>
<name>Apache Incubating Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository</url>
</repository>
</repositories>
<properties>
<servicemix-version>3.1-incubating</servicemix-version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mycompany</groupId>
<artifactId>my-consumer-su</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.servicemix.tooling</groupId>
<artifactId>jbi-maven-plugin</artifactId>
<version>${servicemix-version}</version>
<extensions>true</extensions>
<configuration>
<type>service-assembly</type>
</configuration>
</plugin>
</plugins>
</build>
</project>
finally i do compile and copy these files to smix deploy
my-sa-1.0-SNAPSHOT.jar
my-consumer-bc-1.0-SNAPSHOT-installer.zip
i start service mix and it does not fetch any error so i assume it deploy
it properly
but to access this service what should i do?
if i access that like this http://localhost:8192/example/ 404 error ic
oming..
please advice me
regards
chandra
Post by Bruce Snyder
Post by chandra shekher gupta
Hi Benamin,
Can you please describe the steps in brief how you build the hello world
sample application and deployed it?
I have followed the hello-world BC steps... but that is not completed doc.
any way there are more documents on servicemix like
http://incubator.apache.org/servicemix/what-is-a-jbi-su-and-how-do-i-create-one.html
and i have followed them...but not able to build and run properly. Please
can you post the idea in brief.
What do you mean that you're not able to build and run properly? Is
the build failing? Are you getting errors? Please provide some detail.
http://cwiki.apache.org/confluence/pages/viewpage.action?pageId=50299
The changes should be pushed to the website soon.
Bruce
--
perl -e 'print
);'
Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
--
View this message in context: http://www.nabble.com/Hello-World-Example-Help-tf3541687s12049.html#a10388719
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Adrian Co
2007-05-09 06:26:29 UTC
Permalink
Ok. I see.

If its a provider, it means that only jbi components can send exchanges
to it. You can't access it via http://localhost:8192/example. Its the
one sending soap messages to http://localhost:8192/example

If you want to access it in your service unit, you just need to specify
consumer:service:endpoint as the target of the message exchange.

Here's a simple snippet:

public void configureTarget(String serviceDesc, MessageExchange exchange, ComponentContext context,
QName _interface, QName service,
String endpoint, String uri) throws MessagingException {
if (_interface == null && service == null && uri == null) {
throw new MessagingException(serviceDesc + ": interface, service or uri should be specified");
}
if (uri != null) {
URIResolver.configureExchange(exchange, context, uri);
}
if (_interface != null) {
exchange.setInterfaceName(_interface);
}

if (service != null) {
exchange.setService(service);
if (endpoint != null) {
ServiceEndpoint se = context.getEndpoint(service, endpoint);
exchange.setEndpoint(se);
}
}
}

You might also want to include the http su in the sa.
Post by chandra shekher gupta
No It is provider not consumer
Post by Adrian Co
The xbean.xml says role="provider". I'm guessing you mean "consumer"?
Post by chandra shekher gupta
Well, As per the hello world BC instruction..
I created hello-world-smx as top folder.
inside that using maven, i created my-consumer-bc. it is provider.
aftre that i created my-consumer-su
this is xbean...
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:consumer="http://servicemix.apache.org/consumer">
<http:endpoint service="consumer:service"
endpoint="soap"
role="provider"
locationURI="http://localhost:8192/example/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
soap="true" />
</beans>
and in last i created my-sa..
this is pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>my-sa</artifactId>
<packaging>jbi-service-assembly</packaging>
<version>1.0-SNAPSHOT</version>
<name>A custom project</name>
<url>http://www.myorganization.org</url>
<pluginRepositories>
<pluginRepository>
<id>apache.incubating</id>
<name>Apache Incubating Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>apache.incubating</id>
<name>Apache Incubating Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository</url>
</repository>
</repositories>
<properties>
<servicemix-version>3.1-incubating</servicemix-version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mycompany</groupId>
<artifactId>my-consumer-su</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.servicemix.tooling</groupId>
<artifactId>jbi-maven-plugin</artifactId>
<version>${servicemix-version}</version>
<extensions>true</extensions>
<configuration>
<type>service-assembly</type>
</configuration>
</plugin>
</plugins>
</build>
</project>
finally i do compile and copy these files to smix deploy
my-sa-1.0-SNAPSHOT.jar
my-consumer-bc-1.0-SNAPSHOT-installer.zip
i start service mix and it does not fetch any error so i assume it deploy
it properly
but to access this service what should i do?
if i access that like this http://localhost:8192/example/ 404 error ic
oming..
please advice me
regards
chandra
Post by Bruce Snyder
Post by chandra shekher gupta
Hi Benamin,
Can you please describe the steps in brief how you build the hello world
sample application and deployed it?
I have followed the hello-world BC steps... but that is not completed doc.
any way there are more documents on servicemix like
http://incubator.apache.org/servicemix/what-is-a-jbi-su-and-how-do-i-create-one.html
and i have followed them...but not able to build and run properly. Please
can you post the idea in brief.
What do you mean that you're not able to build and run properly? Is
the build failing? Are you getting errors? Please provide some detail.
http://cwiki.apache.org/confluence/pages/viewpage.action?pageId=50299
The changes should be pushed to the website soon.
Bruce
--
perl -e 'print
);'
Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
chandra shekher gupta
2007-05-09 06:51:40 UTC
Permalink
Where i would write this code snippet and how to relate it?
please calrify it.
Post by Adrian Co
Ok. I see.
If its a provider, it means that only jbi components can send exchanges
to it. You can't access it via http://localhost:8192/example. Its the
one sending soap messages to http://localhost:8192/example
If you want to access it in your service unit, you just need to specify
consumer:service:endpoint as the target of the message exchange.
public void configureTarget(String serviceDesc, MessageExchange
exchange, ComponentContext context,
QName _interface, QName service,
String endpoint, String uri) throws MessagingException {
if (_interface == null && service == null && uri == null) {
throw new MessagingException(serviceDesc + ": interface,
service or uri should be specified");
}
if (uri != null) {
URIResolver.configureExchange(exchange, context, uri);
}
if (_interface != null) {
exchange.setInterfaceName(_interface);
}
if (service != null) {
exchange.setService(service);
if (endpoint != null) {
ServiceEndpoint se = context.getEndpoint(service, endpoint);
exchange.setEndpoint(se);
}
}
}
You might also want to include the http su in the sa.
Post by chandra shekher gupta
No It is provider not consumer
Post by Adrian Co
The xbean.xml says role="provider". I'm guessing you mean "consumer"?
Post by chandra shekher gupta
Well, As per the hello world BC instruction..
I created hello-world-smx as top folder.
inside that using maven, i created my-consumer-bc. it is provider.
aftre that i created my-consumer-su
this is xbean...
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:consumer="http://servicemix.apache.org/consumer">
<http:endpoint service="consumer:service"
endpoint="soap"
role="provider"
locationURI="http://localhost:8192/example/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
soap="true" />
</beans>
and in last i created my-sa..
this is pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>my-sa</artifactId>
<packaging>jbi-service-assembly</packaging>
<version>1.0-SNAPSHOT</version>
<name>A custom project</name>
<url>http://www.myorganization.org</url>
<pluginRepositories>
<pluginRepository>
<id>apache.incubating</id>
<name>Apache Incubating Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>apache.incubating</id>
<name>Apache Incubating Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository</url>
</repository>
</repositories>
<properties>
<servicemix-version>3.1-incubating</servicemix-version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mycompany</groupId>
<artifactId>my-consumer-su</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.servicemix.tooling</groupId>
<artifactId>jbi-maven-plugin</artifactId>
<version>${servicemix-version}</version>
<extensions>true</extensions>
<configuration>
<type>service-assembly</type>
</configuration>
</plugin>
</plugins>
</build>
</project>
finally i do compile and copy these files to smix deploy
my-sa-1.0-SNAPSHOT.jar
my-consumer-bc-1.0-SNAPSHOT-installer.zip
i start service mix and it does not fetch any error so i assume it deploy
it properly
but to access this service what should i do?
if i access that like this http://localhost:8192/example/ 404 error ic
oming..
please advice me
regards
chandra
Post by Bruce Snyder
Post by chandra shekher gupta
Hi Benamin,
Can you please describe the steps in brief how you build the hello world
sample application and deployed it?
I have followed the hello-world BC steps... but that is not completed doc.
any way there are more documents on servicemix like
http://incubator.apache.org/servicemix/what-is-a-jbi-su-and-how-do-i-create-one.html
and i have followed them...but not able to build and run properly. Please
can you post the idea in brief.
What do you mean that you're not able to build and run properly? Is
the build failing? Are you getting errors? Please provide some detail.
http://cwiki.apache.org/confluence/pages/viewpage.action?pageId=50299
The changes should be pushed to the website soon.
Bruce
--
perl -e 'print
);'
Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
--
View this message in context: http://www.nabble.com/Hello-World-Example-Help-tf3541687s12049.html#a10389286
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Adrian Co
2007-05-09 07:30:00 UTC
Permalink
Its just a sample snippet on how to specify the target service,
interface, and endpoint for an exchange. You would generally call this
in your custom service engine, before sending the exchange. I copied
this from one of the servicemix components. Can't remember which one
though...
Post by chandra shekher gupta
Where i would write this code snippet and how to relate it?
please calrify it.
Post by Adrian Co
Ok. I see.
If its a provider, it means that only jbi components can send exchanges
to it. You can't access it via http://localhost:8192/example. Its the
one sending soap messages to http://localhost:8192/example
If you want to access it in your service unit, you just need to specify
consumer:service:endpoint as the target of the message exchange.
public void configureTarget(String serviceDesc, MessageExchange
exchange, ComponentContext context,
QName _interface, QName service,
String endpoint, String uri) throws MessagingException {
if (_interface == null && service == null && uri == null) {
throw new MessagingException(serviceDesc + ": interface,
service or uri should be specified");
}
if (uri != null) {
URIResolver.configureExchange(exchange, context, uri);
}
if (_interface != null) {
exchange.setInterfaceName(_interface);
}
if (service != null) {
exchange.setService(service);
if (endpoint != null) {
ServiceEndpoint se = context.getEndpoint(service, endpoint);
exchange.setEndpoint(se);
}
}
}
You might also want to include the http su in the sa.
Post by chandra shekher gupta
No It is provider not consumer
Post by Adrian Co
The xbean.xml says role="provider". I'm guessing you mean "consumer"?
Post by chandra shekher gupta
Well, As per the hello world BC instruction..
I created hello-world-smx as top folder.
inside that using maven, i created my-consumer-bc. it is provider.
aftre that i created my-consumer-su
this is xbean...
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:consumer="http://servicemix.apache.org/consumer">
<http:endpoint service="consumer:service"
endpoint="soap"
role="provider"
locationURI="http://localhost:8192/example/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
soap="true" />
</beans>
and in last i created my-sa..
this is pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>my-sa</artifactId>
<packaging>jbi-service-assembly</packaging>
<version>1.0-SNAPSHOT</version>
<name>A custom project</name>
<url>http://www.myorganization.org</url>
<pluginRepositories>
<pluginRepository>
<id>apache.incubating</id>
<name>Apache Incubating Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>apache.incubating</id>
<name>Apache Incubating Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository</url>
</repository>
</repositories>
<properties>
<servicemix-version>3.1-incubating</servicemix-version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mycompany</groupId>
<artifactId>my-consumer-su</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.servicemix.tooling</groupId>
<artifactId>jbi-maven-plugin</artifactId>
<version>${servicemix-version}</version>
<extensions>true</extensions>
<configuration>
<type>service-assembly</type>
</configuration>
</plugin>
</plugins>
</build>
</project>
finally i do compile and copy these files to smix deploy
my-sa-1.0-SNAPSHOT.jar
my-consumer-bc-1.0-SNAPSHOT-installer.zip
i start service mix and it does not fetch any error so i assume it deploy
it properly
but to access this service what should i do?
if i access that like this http://localhost:8192/example/ 404 error ic
oming..
please advice me
regards
chandra
Post by Bruce Snyder
Post by chandra shekher gupta
Hi Benamin,
Can you please describe the steps in brief how you build the hello world
sample application and deployed it?
I have followed the hello-world BC steps... but that is not completed doc.
any way there are more documents on servicemix like
http://incubator.apache.org/servicemix/what-is-a-jbi-su-and-how-do-i-create-one.html
and i have followed them...but not able to build and run properly. Please
can you post the idea in brief.
What do you mean that you're not able to build and run properly? Is
the build failing? Are you getting errors? Please provide some detail.
http://cwiki.apache.org/confluence/pages/viewpage.action?pageId=50299
The changes should be pushed to the website soon.
Bruce
--
perl -e 'print
);'
Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
chandra shekher gupta
2007-05-09 07:58:18 UTC
Permalink
No I am not getting... I am confused actully..

what i am trying to do ...i am exploring service mix and try to build any
basic leven service mix component and i have not found anywhere step by step
instruction...
if anybody could provide me furthure i can explore..
Post by Adrian Co
Its just a sample snippet on how to specify the target service,
interface, and endpoint for an exchange. You would generally call this
in your custom service engine, before sending the exchange. I copied
this from one of the servicemix components. Can't remember which one
though...
Post by chandra shekher gupta
Where i would write this code snippet and how to relate it?
please calrify it.
Post by Adrian Co
Ok. I see.
If its a provider, it means that only jbi components can send exchanges
to it. You can't access it via http://localhost:8192/example. Its the
one sending soap messages to http://localhost:8192/example
If you want to access it in your service unit, you just need to specify
consumer:service:endpoint as the target of the message exchange.
public void configureTarget(String serviceDesc, MessageExchange
exchange, ComponentContext context,
QName _interface, QName service,
String endpoint, String uri) throws
MessagingException {
if (_interface == null && service == null && uri == null) {
throw new MessagingException(serviceDesc + ": interface,
service or uri should be specified");
}
if (uri != null) {
URIResolver.configureExchange(exchange, context, uri);
}
if (_interface != null) {
exchange.setInterfaceName(_interface);
}
if (service != null) {
exchange.setService(service);
if (endpoint != null) {
ServiceEndpoint se = context.getEndpoint(service, endpoint);
exchange.setEndpoint(se);
}
}
}
You might also want to include the http su in the sa.
Post by chandra shekher gupta
No It is provider not consumer
Post by Adrian Co
The xbean.xml says role="provider". I'm guessing you mean "consumer"?
Post by chandra shekher gupta
Well, As per the hello world BC instruction..
I created hello-world-smx as top folder.
inside that using maven, i created my-consumer-bc. it is provider.
aftre that i created my-consumer-su
this is xbean...
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:consumer="http://servicemix.apache.org/consumer">
<http:endpoint service="consumer:service"
endpoint="soap"
role="provider"
locationURI="http://localhost:8192/example/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
soap="true" />
</beans>
and in last i created my-sa..
this is pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>my-sa</artifactId>
<packaging>jbi-service-assembly</packaging>
<version>1.0-SNAPSHOT</version>
<name>A custom project</name>
<url>http://www.myorganization.org</url>
<pluginRepositories>
<pluginRepository>
<id>apache.incubating</id>
<name>Apache Incubating Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>apache.incubating</id>
<name>Apache Incubating Repository</name>
<url>http://people.apache.org/repo/m2-incubating-repository</url>
</repository>
</repositories>
<properties>
<servicemix-version>3.1-incubating</servicemix-version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mycompany</groupId>
<artifactId>my-consumer-su</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.servicemix.tooling</groupId>
<artifactId>jbi-maven-plugin</artifactId>
<version>${servicemix-version}</version>
<extensions>true</extensions>
<configuration>
<type>service-assembly</type>
</configuration>
</plugin>
</plugins>
</build>
</project>
finally i do compile and copy these files to smix deploy
my-sa-1.0-SNAPSHOT.jar
my-consumer-bc-1.0-SNAPSHOT-installer.zip
i start service mix and it does not fetch any error so i assume it deploy
it properly
but to access this service what should i do?
if i access that like this http://localhost:8192/example/ 404 error ic
oming..
please advice me
regards
chandra
Post by Bruce Snyder
Post by chandra shekher gupta
Hi Benamin,
Can you please describe the steps in brief how you build the hello world
sample application and deployed it?
I have followed the hello-world BC steps... but that is not
completed
doc.
any way there are more documents on servicemix like
http://incubator.apache.org/servicemix/what-is-a-jbi-su-and-how-do-i-create-one.html
and i have followed them...but not able to build and run properly. Please
can you post the idea in brief.
What do you mean that you're not able to build and run properly? Is
the build failing? Are you getting errors? Please provide some detail.
http://cwiki.apache.org/confluence/pages/viewpage.action?pageId=50299
The changes should be pushed to the website soon.
Bruce
--
perl -e 'print
);'
Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
--
View this message in context: http://www.nabble.com/Hello-World-Example-Help-tf3541687s12049.html#a10389918
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Gert Vanthienen
2007-05-09 12:18:12 UTC
Permalink
L.S.,

I'm a bit unfamiliar with the BC/SE examples on the website myself, but
I can help you in your exploration of ServiceMix if you want...
Can you describe to me the basic use case you're trying to implement as
your proof-of-concept?

Gert
Post by chandra shekher gupta
No I am not getting... I am confused actully..
what i am trying to do ...i am exploring service mix and try to build any
basic leven service mix component and i have not found anywhere step by step
instruction...
if anybody could provide me furthure i can explore..
chandra shekher gupta
2007-05-09 12:47:26 UTC
Permalink
well I am trying t make one POC in servicemix. let us say ( servicemix http)


I am making one POC and it should achieve following thing.

Http Web Browser client will send post/get to a component and that should
read the message and should return with "acceptance " to the client. that
is it.



regards
chandra
Post by Gert Vanthienen
L.S.,
I'm a bit unfamiliar with the BC/SE examples on the website myself, but
I can help you in your exploration of ServiceMix if you want...
Can you describe to me the basic use case you're trying to implement as
your proof-of-concept?
Gert
Post by chandra shekher gupta
No I am not getting... I am confused actully..
what i am trying to do ...i am exploring service mix and try to build any
basic leven service mix component and i have not found anywhere step by step
instruction...
if anybody could provide me furthure i can explore..
--
View this message in context: http://www.nabble.com/Hello-World-Example-Help-tf3541687s12049.html#a10393477
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Bruce Snyder
2007-05-09 18:13:49 UTC
Permalink
Post by chandra shekher gupta
well I am trying t make one POC in servicemix. let us say ( servicemix http)
I am making one POC and it should achieve following thing.
Http Web Browser client will send post/get to a component and that should
read the message and should return with "acceptance " to the client. that
is it.
If that's the use case you're trying to address, then you do not need
to create a JBI binding component. You will need to create a consumer
SU based on the servicemix-http component that is wrapped in a SA and
deployed to ServiceMix.

The HTTP consumer SU will need to forward any SOAP requests to some
other service that will handle the request and generate a response. So
the flow would look like this:

web browser -> consumer-http-su -> <some service> -> consumer-http-su
-> web browser

This is described in the FAQ entry, 'What is a JBI SU and how do I
create one?' here:

http://incubator.apache.org/servicemix/what-is-a-jbi-su-and-how-do-i-create-one.html

Notice in the diagram on that page that the servicemix-http consumer
SU passes messages to an Internal Service. This is what will handle
the request and generate a response and the thing that you need to
create and make available in the JBI container so that the
consumer-http-su can send messages to it. There are examples of this
in ServiceMix. The bridge example might be a good place to start:

http://incubator.apache.org/servicemix/creating-a-protocol-bridge.html

Once the consumer-http-su is completed, it will need to be wrapped in
a SA as described here:

http://incubator.apache.org/servicemix/what-is-a-jbi-sa-and-how-do-i-create-one.html

Bruce
--
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
chandra shekher gupta
2007-05-14 10:22:17 UTC
Permalink
Thanks everybody , The step explained in this series , is very helfull and
i followed that step by step and finally got it working...in Forum Some new
bie complains that there is no source code that they can run it
directly..that is why i have uploaded the code in zip and have attached
here.

Thanks to evreybody...
Chandra
Infoaxon Technology
India.
Post by Bruce Snyder
Post by chandra shekher gupta
well I am trying t make one POC in servicemix. let us say ( servicemix http)
I am making one POC and it should achieve following thing.
Http Web Browser client will send post/get to a component and that should
read the message and should return with "acceptance " to the client. that
is it.
If that's the use case you're trying to address, then you do not need
to create a JBI binding component. You will need to create a consumer
SU based on the servicemix-http component that is wrapped in a SA and
deployed to ServiceMix.
The HTTP consumer SU will need to forward any SOAP requests to some
other service that will handle the request and generate a response. So
web browser -> consumer-http-su -> <some service> -> consumer-http-su
-> web browser
This is described in the FAQ entry, 'What is a JBI SU and how do I
http://incubator.apache.org/servicemix/what-is-a-jbi-su-and-how-do-i-create-one.html
Notice in the diagram on that page that the servicemix-http consumer
SU passes messages to an Internal Service. This is what will handle
the request and generate a response and the thing that you need to
create and make available in the JBI container so that the
consumer-http-su can send messages to it. There are examples of this
http://incubator.apache.org/servicemix/creating-a-protocol-bridge.html
Once the consumer-http-su is completed, it will need to be wrapped in
http://incubator.apache.org/servicemix/what-is-a-jbi-sa-and-how-do-i-create-one.html
Bruce
--
perl -e 'print
);'
Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
http://www.nabble.com/file/8401/eval-smx.zip eval-smx.zip
--
View this message in context: http://www.nabble.com/Hello-World-Example-Help-tf3541687s12049.html#a10601156
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Benamin
2007-05-14 22:10:06 UTC
Permalink
Chandra,

I tried using your files that you uploaded, and everything compiles and I
can deploy your packages. The problem goes when I try to post something to
that URL (http://localhost:8192/chandra). I get a 404 error. Do you know
what could be the problem, or can you explain how you did this?

thanks
Thanks everybody , The steps explained in this series , is very helpfull
and i followed that step by step and finally got it working...in Forum
Some new bie complains that there is no source code that they can run it
directly..that is why i have uploaded the code in zip eval.smx.zip.
Thanks to evreybody...
Chandra
Infoaxon Technology
India.
Post by Bruce Snyder
Post by chandra shekher gupta
well I am trying t make one POC in servicemix. let us say ( servicemix http)
I am making one POC and it should achieve following thing.
Http Web Browser client will send post/get to a component and that should
read the message and should return with "acceptance " to the client. that
is it.
If that's the use case you're trying to address, then you do not need
to create a JBI binding component. You will need to create a consumer
SU based on the servicemix-http component that is wrapped in a SA and
deployed to ServiceMix.
The HTTP consumer SU will need to forward any SOAP requests to some
other service that will handle the request and generate a response. So
web browser -> consumer-http-su -> <some service> -> consumer-http-su
-> web browser
This is described in the FAQ entry, 'What is a JBI SU and how do I
http://incubator.apache.org/servicemix/what-is-a-jbi-su-and-how-do-i-create-one.html
Notice in the diagram on that page that the servicemix-http consumer
SU passes messages to an Internal Service. This is what will handle
the request and generate a response and the thing that you need to
create and make available in the JBI container so that the
consumer-http-su can send messages to it. There are examples of this
http://incubator.apache.org/servicemix/creating-a-protocol-bridge.html
Once the consumer-http-su is completed, it will need to be wrapped in
http://incubator.apache.org/servicemix/what-is-a-jbi-sa-and-how-do-i-create-one.html
Bruce
--
perl -e 'print
);'
Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
http://www.nabble.com/file/8401/eval-smx.zip eval-smx.zip
--
View this message in context: http://www.nabble.com/Hello-World-Example-Help-tf3541687s12049.html#a10613200
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Benamin
2007-05-15 03:30:41 UTC
Permalink
I figured it out. For some reason, localhost doesn't seem to work for me. I
use the real hostname, and it works. I don't understand why this is so
since I used a 0.0.0.0 address in my http SU, but I guess this will do.
Post by Benamin
Chandra,
I tried using your files that you uploaded, and everything compiles and I
can deploy your packages. The problem goes when I try to post something
to that URL (http://localhost:8192/chandra). I get a 404 error. Do you
know what could be the problem, or can you explain how you did this?
thanks
Thanks everybody , The steps explained in this series , is very helpfull
and i followed that step by step and finally got it working...in Forum
Some new bie complains that there is no source code that they can run it
directly..that is why i have uploaded the code in zip eval.smx.zip.
Thanks to evreybody...
Chandra
Infoaxon Technology
India.
Post by Bruce Snyder
Post by chandra shekher gupta
well I am trying t make one POC in servicemix. let us say ( servicemix http)
I am making one POC and it should achieve following thing.
Http Web Browser client will send post/get to a component and that should
read the message and should return with "acceptance " to the client. that
is it.
If that's the use case you're trying to address, then you do not need
to create a JBI binding component. You will need to create a consumer
SU based on the servicemix-http component that is wrapped in a SA and
deployed to ServiceMix.
The HTTP consumer SU will need to forward any SOAP requests to some
other service that will handle the request and generate a response. So
web browser -> consumer-http-su -> <some service> -> consumer-http-su
-> web browser
This is described in the FAQ entry, 'What is a JBI SU and how do I
http://incubator.apache.org/servicemix/what-is-a-jbi-su-and-how-do-i-create-one.html
Notice in the diagram on that page that the servicemix-http consumer
SU passes messages to an Internal Service. This is what will handle
the request and generate a response and the thing that you need to
create and make available in the JBI container so that the
consumer-http-su can send messages to it. There are examples of this
http://incubator.apache.org/servicemix/creating-a-protocol-bridge.html
Once the consumer-http-su is completed, it will need to be wrapped in
http://incubator.apache.org/servicemix/what-is-a-jbi-sa-and-how-do-i-create-one.html
Bruce
--
perl -e 'print
);'
Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
http://www.nabble.com/file/8401/eval-smx.zip eval-smx.zip
--
View this message in context: http://www.nabble.com/Hello-World-Example-Help-tf3541687s12049.html#a10616041
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Bruce Snyder
2007-05-16 03:55:53 UTC
Permalink
Post by Benamin
I figured it out. For some reason, localhost doesn't seem to work for me. I
use the real hostname, and it works. I don't understand why this is so
since I used a 0.0.0.0 address in my http SU, but I guess this will do.
This is dependent upon how the networking stack in the operating
system is configured and can be affected if there is more than one
active network interface defined. Typically using 0.0.0.0 instead of
localhost will work around the issue because it will match any network
interface on the machine vs. the only the network interface whose name
is localhost.

Bruce
--
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
Loading...