You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by mjustin <mi...@gmx.net> on 2008/03/21 18:55:02 UTC

Starting point for JBI in the examples, query component WSDL

Dear all,

I managed to get the basic example to work and I am very happy that it works
really smooth now in the 3.2.2 snapshot.

Now I would like to climb to the next level, and if I understand it
correctly, everything in JBI is build around service providers and service
consumers. In the "JBI-Components-Theory" PDF article, I read that the
service providers provide a service description using WSDL. Is this also
true in the basic example, meaning that a WSDL description is available for
the client, using a special URL, which specifies the details of the
components of the basic example?

My hope is that it is possible to interact with ServiceMix using non-Java
(Delphi) clients so access to WSDL would be the perfect starting point for
the next steps.

Best Regards
Michael Justin
-- 
betasoft - Software for Delphi™ and for the Java™ platform
http://www.mikejustin.com/
http://www.betabeans.de/
-- 
View this message in context: http://www.nabble.com/Starting-point-for-JBI-in-the-examples%2C-query-component-WSDL-tp16203266s12049p16203266.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Starting point for JBI in the examples, query component WSDL

Posted by mjustin <mi...@gmx.net>.


bsnyder wrote:
> 
> WSDL is not required in ServiceMix when configuring the ServiceMix JBI
> components, but you can use WSDL for each endpoint if you prefer. WSDL
> is used in the wsdl-first example and the cxf-wsdl-first example.
> 

Ok, I understand that WSDL is optional so I will take a close look at these
examples. 

Regarding Delphi integration, my intention is to enable Delphi application
developers to use concepts like WSDL 2.0 spec's message exchange patterns
(MEPs) in Delphi just like it is possible in Java. 

So I am not actually trying to run or access Delphi web services (this would
be too easy) but for example to help building normalized messages in the
same way how it is done in Java. 

So I will implement some JBI parts with Delphi, like the normalized message
structure containing
* Content 
* Attachments 
* Security Subject 
* Properties

and some interfaces like 
* javax.jbi.messaging.MessageExchange;
* javax.jbi.messaging.NormalizedMessage;

It looks like a huge task for a single developer but I see it also as my
personal fitness training programme for enterprise software development :)
-- 
View this message in context: http://www.nabble.com/Starting-point-for-JBI-in-the-examples%2C-query-component-WSDL-tp16203266s12049p16325029.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Starting point for JBI in the examples, query component WSDL

Posted by Bruce Snyder <br...@gmail.com>.
On Fri, Mar 21, 2008 at 11:55 AM, mjustin <mi...@gmx.net> wrote:
>
>  Dear all,
>
>  I managed to get the basic example to work and I am very happy that it works
>  really smooth now in the 3.2.2 snapshot.
>
>  Now I would like to climb to the next level, and if I understand it
>  correctly, everything in JBI is build around service providers and service
>  consumers. In the "JBI-Components-Theory" PDF article, I read that the
>  service providers provide a service description using WSDL. Is this also
>  true in the basic example, meaning that a WSDL description is available for
>  the client, using a special URL, which specifies the details of the
>  components of the basic example?

WSDL is not required in ServiceMix when configuring the ServiceMix JBI
components, but you can use WSDL for each endpoint if you prefer. WSDL
is used in the wsdl-first example and the cxf-wsdl-first example.

>  My hope is that it is possible to interact with ServiceMix using non-Java
>  (Delphi) clients so access to WSDL would be the perfect starting point for
>  the next steps.

Please describe what you mean by interact? If you are thinking of
having ServiceMix invoke a remote web service written in Delphi this
would work just fine through the use of the servicemix-cxf-bc
component. If this is not what you mean, please provide some more
details.

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

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

RE: Camel JPA inserts null values

Posted by ra...@wipro.com.
Forgot to mention, I am using 3.3SNAPSHOT.

 
________________________________

From: rabi.mishra@wipro.com [mailto:rabi.mishra@wipro.com]
Sent: Sun 3/23/2008 3:11 PM
To: users@servicemix.apache.org
Subject: Camel JPA inserts null values



Hi All,

Camel etl example with the following Route works fine

from("file:inbox/data1?noop=true").convertBodyTo(PersonDocument.class)
        //  .intercept(transactionInterceptor())
            .to("jpa:org.apache.camel.example.etl.CustomerEntity");

When I change this use smx filepoller with the following route, this inserts null vaues in the customer table. Actually I am using a passthrough bean su.

  from("jbi:endpoint:http://camel.apache.org/example/etl/persist/person")
      .convertBodyTo(PersonDocument.class)
        //  .intercept(transactionInterceptor())
            .to("jpa:org.apache.camel.example.etl.CustomerEntity");

fillePoller su config..
-------------------------
<beans xmlns:file="http://servicemix.apache.org/file/1.0"
       xmlns:ls="http://servicemix.apache.org/samples/logging-sample">
<file:poller service="ls:filePoller"
                      endpoint="poller"
                      targetService="ls:beanRouter"
                      targetEndpoint="router"
                      file="inbox/data1">
</file:poller>
</beans>

Bean su
----------------

<beans xmlns:bean="http://servicemix.apache.org/bean/1.0"
      xmlns:ls="http://servicemix.apache.org/samples/logging-sample">
  <bean:endpoint service="ls:beanRouter" endpoint="router">
      <bean:bean>
          <bean class="org.apache.servicemix.samples.logging.BeanRouter" />
      </bean:bean>
  </bean:endpoint>
 
</beans>

Bean su code..
----------------------
 public void onMessageExchange(MessageExchange exchange) throws MessagingException {

    InOnly in = (InOnly) exchange;
        if (in.getStatus() == ExchangeStatus.DONE) {
            return;
        } else if (in.getStatus() == ExchangeStatus.ERROR) {
            return;
        }
        System.err.println(in.getService().getLocalPart() + " requested");
  try {
    NormalizedMessage message = exchange.getMessage("in");
    Source content = message.getContent();
    QName targetService = new QName("http://camel.apache.org/example/etl","persist");
    MessageExchangeFactory exchangeFact = channel.createExchangeFactoryForService(targetService);
    InOnly response = exchangeFact.createInOnlyExchange();
    NormalizedMessage jpaMessage = response.createMessage();
    jpaMessage.setContent(content);
    response.setInMessage(jpaMessage);
    channel.sendSync(response);
    exchange.setStatus(ExchangeStatus.DONE);
    channel.send(exchange);
    } catch (Exception e) {
            in.setError(e);
            channel.sendSync(in);
        }

    }

Has  somone encountered this problem earlier..

Regards,
Rabi Mishra



The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com


Camel JPA inserts null values

Posted by ra...@wipro.com.
Hi All,
 
Camel etl example with the following Route works fine
 
from("file:inbox/data1?noop=true").convertBodyTo(PersonDocument.class)
        //  .intercept(transactionInterceptor())
            .to("jpa:org.apache.camel.example.etl.CustomerEntity");

When I change this use smx filepoller with the following route, this inserts null vaues in the customer table. Actually I am using a passthrough bean su.
 
  from("jbi:endpoint:http://camel.apache.org/example/etl/persist/person")
      .convertBodyTo(PersonDocument.class)
        //  .intercept(transactionInterceptor())
            .to("jpa:org.apache.camel.example.etl.CustomerEntity");
 
fillePoller su config..
-------------------------
<beans xmlns:file="http://servicemix.apache.org/file/1.0"
       xmlns:ls="http://servicemix.apache.org/samples/logging-sample">
<file:poller service="ls:filePoller"
                      endpoint="poller"
                      targetService="ls:beanRouter"
                      targetEndpoint="router"
                      file="inbox/data1">
</file:poller>
</beans>
 
Bean su
----------------
 
<beans xmlns:bean="http://servicemix.apache.org/bean/1.0" 
      xmlns:ls="http://servicemix.apache.org/samples/logging-sample">
  <bean:endpoint service="ls:beanRouter" endpoint="router">
      <bean:bean>
          <bean class="org.apache.servicemix.samples.logging.BeanRouter" />
      </bean:bean>
  </bean:endpoint>
  
</beans>

Bean su code..
----------------------
 public void onMessageExchange(MessageExchange exchange) throws MessagingException {
 
    InOnly in = (InOnly) exchange;
        if (in.getStatus() == ExchangeStatus.DONE) {
            return;
        } else if (in.getStatus() == ExchangeStatus.ERROR) {
            return;
        }
        System.err.println(in.getService().getLocalPart() + " requested");
  try {
    NormalizedMessage message = exchange.getMessage("in");
    Source content = message.getContent();
    QName targetService = new QName("http://camel.apache.org/example/etl","persist");
    MessageExchangeFactory exchangeFact = channel.createExchangeFactoryForService(targetService);
    InOnly response = exchangeFact.createInOnlyExchange();
    NormalizedMessage jpaMessage = response.createMessage();
    jpaMessage.setContent(content);
    response.setInMessage(jpaMessage);
    channel.sendSync(response);
    exchange.setStatus(ExchangeStatus.DONE);
    channel.send(exchange);
    } catch (Exception e) {
            in.setError(e);
            channel.sendSync(in);
        }

    }
 
Has  somone encountered this problem earlier..
 
Regards, 
Rabi Mishra 
Wipro Technologies 
Hinjewadi, Pune 
Cell: +91(0)9765391877 
http://rabisblog.blogspot.com/ 

________________________________

From: mjustin [mailto:michael.justin@gmx.net]
Sent: Fri 3/21/2008 11:25 PM
To: users@servicemix.apache.org
Subject: Starting point for JBI in the examples, query component WSDL




Dear all,

I managed to get the basic example to work and I am very happy that it works
really smooth now in the 3.2.2 snapshot.

Now I would like to climb to the next level, and if I understand it
correctly, everything in JBI is build around service providers and service
consumers. In the "JBI-Components-Theory" PDF article, I read that the
service providers provide a service description using WSDL. Is this also
true in the basic example, meaning that a WSDL description is available for
the client, using a special URL, which specifies the details of the
components of the basic example?

My hope is that it is possible to interact with ServiceMix using non-Java
(Delphi) clients so access to WSDL would be the perfect starting point for
the next steps.

Best Regards
Michael Justin
--
betasoft - Software for Delphi(tm) and for the Java(tm) platform
http://www.mikejustin.com/
http://www.betabeans.de/
--
View this message in context: http://www.nabble.com/Starting-point-for-JBI-in-the-examples%2C-query-component-WSDL-tp16203266s12049p16203266.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.




The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com