Where i would write this code snippet and how to relate it?
please calrify it.

Adrian Co wrote:
> 
> 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.
> 
> chandra shekher gupta wrote:
>> No It is provider not consumer
>>
>> Adrian Co wrote:
>>   
>>> The xbean.xml says role="provider". I'm guessing you mean "consumer"?
>>>
>>> chandra shekher gupta wrote:
>>>     
>>>> 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
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> bsnyder wrote:
>>>>   
>>>>       
>>>>> On 5/8/07, chandra shekher gupta <[EMAIL PROTECTED]> wrote:
>>>>>     
>>>>>         
>>>>>> 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)[EMAIL PROTECTED]&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/
>>>>>
>>>>>
>>>>>     
>>>>>         
>>>>   
>>>>       
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
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.

Reply via email to