Receiving a JMS BytesMessage using the JMS BC

12 messages Options
Embed this post
Permalink
alexndr

Receiving a JMS BytesMessage using the JMS BC

Reply Threaded More More options
Print post
Permalink
I have generated a JMS BC WSDL to receive a bytesmessage from a JMS - queue.

I have then created an EJB with the web service from the WSDL and a void jmsInOperation(byte[] part1) - method gets generated in the EJB.

After deploying and testing the EJB I can see that it gets executed when I place a BytesMessage on the queue however the length of byte[] part1 is zero eventhough I'm sure I have a valid payload in the message body.

Looking at the documentation for the JMS BC I'm not even sure that BytesMessages are supported yet (http://wiki.open-esb.java.net/Wiki.jsp?page=JMSBC_WSDLXtensibility)? Valid values seems to be TextMessage and MapMessage, however BytesMessage is an option when creating the WSDL.

Suggestion?

/Alex
SujitBiswas

Re: Receiving a JMS BytesMessage using the JMS BC

Reply Threaded More More options
Print post
Permalink
Hi Alex,

ByteMessage is supported in jmsbc, the following are the option during
normalization while using byte message

1. forward as attachment (is true), in this case the bytes are forwarded
as attachment
2. else, the bytes are base64 encoded and sent as a text node

Can you please elaborate on the usecase, where you are trying to use
byteMessage.

-Sujit


alexndr wrote:

> I have generated a JMS BC WSDL to receive a bytesmessage from a JMS - queue.
>
> I have then created an EJB with the web service from the WSDL and a void
> jmsInOperation(byte[] part1) - method gets generated in the EJB.
>
> After deploying and testing the EJB I can see that it gets executed when I
> place a BytesMessage on the queue however the length of byte[] part1 is zero
> eventhough I'm sure I have a valid payload in the message body.
>
> Looking at the documentation for the JMS BC I'm not even sure that
> BytesMessages are supported yet
> (http://wiki.open-esb.java.net/Wiki.jsp?page=JMSBC_WSDLXtensibility)? Valid
> values seems to be TextMessage and MapMessage, however BytesMessage is an
> option when creating the WSDL.
>
> Suggestion?
>
> /Alex
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

alexndr

Re: Receiving a JMS BytesMessage using the JMS BC

Reply Threaded More More options
Print post
Permalink
Hi Sujit,

I'm not sure how to elaborate more.

I can tell you that the queue is located on a Weblogic 9.2 server and we use Sun Java system Application Server 9.1_02 as execution environment for the EJB.

The generated JMS BC WSDL looks like follows:

<definitions name="ReceiveBinaryMessage" targetNamespace="http://j2ee.netbeans.org/wsdl/ejbHanteraBinarImpuls/ReceiveBinaryMessage"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:jms="http://schemas.sun.com/jbi/wsdl-extensions/jms/" xmlns:tns="http://j2ee.netbeans.org/wsdl/ejbHanteraBinarImpuls/ReceiveBinaryMessage" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
    <types/>  
    <message name="JMSInputMessage">
        <part name="part1" type="xsd:base64Binary"/>
    </message>    
    <portType name="JMSInPortType">
        <operation name="JMSInOperation">
            <input name="input1" message="tns:JMSInputMessage"/>
        </operation>
    </portType>
    <binding name="JMSInBinding" type="tns:JMSInPortType">
        <jms:binding/>
        <operation name="JMSInOperation">
            <jms:operation destination="ReceiveBinaryMessageQueue" destinationType="Queue" transaction="NoTransaction" concurrencyMode="cc" maxConcurrentConsumers="1" redeliveryHandling="1:move(queue:ReceiveBinaryMessageCorruptQueue)"/>
            <input name="input1">
                <jms:message messageType="BytesMessage" bytesPart="part1"/>
            </input>
        </operation>
    </binding>
    <service name="JMSInService">
        <port name="ReceiveBinaryMessage_InPort" binding="tns:JMSInBinding">
            <jms:address connectionURL="lookup://jms/tx/wls1"/>
        </port>
    </service>
    <plnk:partnerLinkType name="ReceiveBinaryMessage">
        <!-- A partner link type is automatically generated when a new port type is added. Partner link types are used by BPEL processes.
In a BPEL process, a partner link represents the interaction between the BPEL process and a partner service. Each partner link is associated with a partner link type.
A partner link type characterizes the conversational relationship between two services. The partner link type can have one or two roles.-->
        <plnk:role name="JMSInPortTypeRole" portType="tns:JMSInPortType"/>
    </plnk:partnerLinkType>
</definitions>

I have tried using both forwardAsAttachment="true" and forwardAsAttachment="false" without success. The received byte[] is still of length 0.

I have also tried to receive the Binary JMS message as a TextMessage with attachments. I then get this contradictive error message:

"Received a JMS Message of type com.stc.jmsjca.core.WBytesMessageIn but the JMS binding specifies that the message has to be forwarded as attachment so valid types are TextNessage and BytesMessage."

Thanks

/Alex

SujitBiswas wrote:
Hi Alex,

ByteMessage is supported in jmsbc, the following are the option during
normalization while using byte message

1. forward as attachment (is true), in this case the bytes are forwarded
as attachment
2. else, the bytes are base64 encoded and sent as a text node

Can you please elaborate on the usecase, where you are trying to use
byteMessage.

-Sujit
SujitBiswas

Re: Receiving a JMS BytesMessage using the JMS BC

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Hi Alex,

Can you please attach the composite application also

-Sujit

alexndr wrote:
Hi Sujit,

I'm not sure how to elaborate more. 

I can tell you that the queue is located on a Weblogic 9.2 server and we use
Sun Java system Application Server 9.1_02 as execution environment for the
EJB. 

The generated JMS BC WSDL looks like follows: 

<definitions name="ReceiveBinaryMessage"
targetNamespace="http://j2ee.netbeans.org/wsdl/ejbHanteraBinarImpuls/ReceiveBinaryMessage"
    xmlns="http://schemas.xmlsoap.org/wsdl/" 
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:jms="http://schemas.sun.com/jbi/wsdl-extensions/jms/"
xmlns:tns="http://j2ee.netbeans.org/wsdl/ejbHanteraBinarImpuls/ReceiveBinaryMessage"
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
    <types/>   
    <message name="JMSInputMessage"> 
        <part name="part1" type="xsd:base64Binary"/> 
    </message>    
    <portType name="JMSInPortType"> 
        <operation name="JMSInOperation"> 
            <input name="input1" message="tns:JMSInputMessage"/> 
        </operation> 
    </portType> 
    <binding name="JMSInBinding" type="tns:JMSInPortType"> 
        <jms:binding/> 
        <operation name="JMSInOperation"> 
            <jms:operation destination="ReceiveBinaryMessageQueue"
destinationType="Queue" transaction="NoTransaction" concurrencyMode="cc"
maxConcurrentConsumers="1"
redeliveryHandling="1:move(queue:ReceiveBinaryMessageCorruptQueue)"/>
            <input name="input1"> 
                <jms:message messageType="BytesMessage" bytesPart="part1"/> 
            </input> 
        </operation> 
    </binding> 
    <service name="JMSInService"> 
        <port name="ReceiveBinaryMessage_InPort" binding="tns:JMSInBinding"> 
            <jms:address connectionURL="lookup://jms/tx/wls1"/> 
        </port> 
    </service> 
    <plnk:partnerLinkType name="ReceiveBinaryMessage"> 
        <!-- A partner link type is automatically generated when a new port
type is added. Partner link types are used by BPEL processes. 
In a BPEL process, a partner link represents the interaction between the
BPEL process and a partner service. Each partner link is associated with a
partner link type.
A partner link type characterizes the conversational relationship between
two services. The partner link type can have one or two roles.-->
        <plnk:role name="JMSInPortTypeRole" portType="tns:JMSInPortType"/> 
    </plnk:partnerLinkType> 
</definitions> 

I have tried using both forwardAsAttachment="true" and
forwardAsAttachment="false" without success. The received byte[] is still of
length 0. 

I have also tried to receive the Binary JMS message as a TextMessage with
attachments. I then get this contradictive error message: 

"Received a JMS Message of type com.stc.jmsjca.core.WBytesMessageIn but the
JMS binding specifies that the message has to be forwarded as attachment so
valid types are TextNessage and BytesMessage."

Thanks

/Alex


SujitBiswas wrote:
  
Hi Alex,

ByteMessage is supported in jmsbc, the following are the option during 
normalization while using byte message

1. forward as attachment (is true), in this case the bytes are forwarded 
as attachment
2. else, the bytes are base64 encoded and sent as a text node

Can you please elaborate on the usecase, where you are trying to use 
byteMessage.

-Sujit


    

  

alexndr

Re: Receiving a JMS BytesMessage using the JMS BC

Reply Threaded More More options
Print post
Permalink
Projects are attached.

ReceiveBytesMessage.zip

The output of execution in my runtime environment is: +++ Length: 0, text: .

Thanks
Alex


SujitBiswas wrote:
Hi Alex,

Can you please attach the composite application also

-Sujit
SujitBiswas

Re: Receiving a JMS BytesMessage using the JMS BC

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Hi Alex,

I tested the application with Sun Java MQ ( not weblogic)  and see the expected results.

[#|2009-10-29T11:36:05.724-0700|INFO|sun-appserver2.1|receivebytesmessage.ReceiveBytesMessage|_ThreadID=52;_ThreadName=p: thread-pool-1; w: 6;|+++ Length: 5, text: hello.|#]


Not sure why it does not work in your environment, Can you test with a standalone receiver and see that it works, before trying the composite app.

Thanks,
Sujit



alexndr wrote:
Projects are attached.

http://n2.nabble.com/file/n3910804/ReceiveBytesMessage.zip
ReceiveBytesMessage.zip 

The output of execution in my runtime environment is: +++ Length: 0, text: .

Thanks
Alex



SujitBiswas wrote:
  
Hi Alex,

Can you please attach the composite application also

-Sujit


    

  

alexndr

Re: Receiving a JMS BytesMessage using the JMS BC

Reply Threaded More More options
Print post
Permalink
I have tried utilizing JMS JCA in the same scenario with success. The problem must be related to the JMS BC somehow? We're using the JMS BC that comes with JCAPS6U1 which is probably not the most recent one?

/Alex

SujitBiswas wrote:
Hi Alex,

I tested the application with Sun Java MQ ( not weblogic)  and see the
expected results.

> [#|2009-10-29T11:36:05.724-0700|INFO|sun-appserver2.1|receivebytesmessage.ReceiveBytesMessage|_ThreadID=52;_ThreadName=p:
> thread-pool-1; w: 6;|+++ Length: 5, text: hello.|#]
>

Not sure why it does not work in your environment, Can you test with a
standalone receiver and see that it works, before trying the composite app.

Thanks,
Sujit
SOLDEVILA Fabien

File On Demand Read - fileNameIsRegex="true"

Reply Threaded More More options
Print post
Permalink
Hello,

I use the last nightly build of the File BC.
I want to use a File BC On Demand Read with a Regular Expression ([0-9]*.xml for exemple).
I'm unable to do, the BPEL don't read my file. I have try it using fileNameIsRegex="true".
With a File BC Pool, it's run.

Is it possible ?

Thanks and regards,

Fabien Soldevila

***************************
Fabien Soldevila

Expert technique
Département Edition / Intégration - Pôle Intégration Agence de Mutualisation des Universités et Etablissements (Amue)
 
E-mail : [hidden email]
Web : http://www.amue.fr
Tel : 04 99 77 30 56
***************************

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Jim Fu

Re: File On Demand Read - fileNameIsRegex="true"

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Hi,

the original implementation of file on demand read does not support file name as regex, see file binding extensibility elements reference wiki page : http://wiki.open-esb.java.net/Wiki.jsp?page=PageFileBindingExtensibilityElements
the open esb issue: https://open-esb.dev.java.net/issues/show_bug.cgi?id=1982  is filed for the RFE.
so if you are using nightly build from ojc-trunk, it does not contain the RFE, for now, it is only available in GFESBv2.2

regards
Jim

SOLDEVILA Fabien wrote:
Hello,

I use the last nightly build of the File BC.
I want to use a File BC On Demand Read with a Regular Expression ([0-9]*.xml for exemple).
I'm unable to do, the BPEL don't read my file. I have try it using fileNameIsRegex="true".
With a File BC Pool, it's run.

Is it possible ? 

Thanks and regards,

Fabien Soldevila

***************************
Fabien Soldevila

Expert technique
Département Edition / Intégration - Pôle Intégration Agence de Mutualisation des Universités et Etablissements (Amue)
 
E-mail : [hidden email]
Web : http://www.amue.fr
Tel : 04 99 77 30 56
*************************** 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

  

SujitBiswas

Re: Receiving a JMS BytesMessage using the JMS BC

Reply Threaded More More options
Print post
Permalink
In reply to this post by alexndr
Some javascript/style in this post has been disabled (why?)
Hi Alex,
yes that may be possible, please communicate with sun support for the fix/patch.

Thanks,
Sujit

alexndr wrote:
I have tried utilizing JMS JCA in the same scenario with success. The problem
must be related to the JMS BC somehow? We're using the JMS BC that comes
with JCAPS6U1 which is probably not the most recent one?

/Alex


SujitBiswas wrote:
  
Hi Alex,

I tested the application with Sun Java MQ ( not weblogic)  and see the 
expected results.

    
[#|2009-10-29T11:36:05.724-0700|INFO|sun-appserver2.1|receivebytesmessage.ReceiveBytesMessage|_ThreadID=52;_ThreadName=p: 
thread-pool-1; w: 6;|+++ Length: 5, text: hello.|#]

      
Not sure why it does not work in your environment, Can you test with a 
standalone receiver and see that it works, before trying the composite
app.

Thanks,
Sujit


    

  

SOLDEVILA Fabien

RE : Re: File On Demand Read - fileNameIsRegex="true"

Reply Threaded More More options
Print post
Permalink
In reply to this post by Jim Fu
Some javascript/style in this post has been disabled (why?)
Hello Jim,
 
Thanks for your answer last week ... I have forgotten to check the mailing list.
 
I just read your links, it's clear for me.
What is not really clear is GFESBv2.2. I can't see this GFESB version on the download page of openESB web site. Where can I download this version ? Is it a version stable (almost) ?
I can see OpenESB v3, the latest version of OpenESB. On the web site I can read that it will be stable released in 2010. Have you got an idea of the month ?
 
Thanks again for your answer.
 
Best regards
 
Fabien
 
***************************
Fabien Soldevila

Expert technique
Département Edition / Intégration - Pôle Intégration Agence de Mutualisation des Universités et Etablissements (Amue)

E-mail : [hidden email]
Web : http://www.amue.fr
Tel : 04 99 77 30 56
***************************
 


De: Jim Fu [mailto:[hidden email]]
Date: ven. 30/10/2009 18:00
À: [hidden email]
Objet : Re: File On Demand Read - fileNameIsRegex="true"

Hi,

the original implementation of file on demand read does not support file name as regex, see file binding extensibility elements reference wiki page : http://wiki.open-esb.java.net/Wiki.jsp?page=PageFileBindingExtensibilityElements
the open esb issue: https://open-esb.dev.java.net/issues/show_bug.cgi?id=1982  is filed for the RFE.
so if you are using nightly build from ojc-trunk, it does not contain the RFE, for now, it is only available in GFESBv2.2

regards
Jim

SOLDEVILA Fabien wrote:
Hello,

I use the last nightly build of the File BC.
I want to use a File BC On Demand Read with a Regular Expression ([0-9]*.xml for exemple).
I'm unable to do, the BPEL don't read my file. I have try it using fileNameIsRegex="true".
With a File BC Pool, it's run.

Is it possible ? 

Thanks and regards,

Fabien Soldevila

***************************
Fabien Soldevila

Expert technique
Département Edition / Intégration - Pôle Intégration Agence de Mutualisation des Universités et Etablissements (Amue)
 
E-mail : [hidden email]
Web : http://www.amue.fr
Tel : 04 99 77 30 56
*************************** 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

  

Jim Fu

Re: RE : Re: File On Demand Read - fileNameIsRegex="true"

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Hi, SOLDEVILA,

these are very legitimates questions, however, my responsibility are limited to resolve open esb components issues from the community, information regarding product lines and dates will be released through the regular channel to the open esb community where I also look up to for the official info, as developers working on these projects, there are dates but they might not be the same as the externally published...hopefully those info will be coming out soon.

regards
--Jim

SOLDEVILA Fabien wrote:
Hello Jim,
 
Thanks for your answer last week ... I have forgotten to check the mailing list.
 
I just read your links, it's clear for me.
What is not really clear is GFESBv2.2. I can't see this GFESB version on the download page of openESB web site. Where can I download this version ? Is it a version stable (almost) ?
I can see OpenESB v3, the latest version of OpenESB. On the web site I can read that it will be stable released in 2010. Have you got an idea of the month ?
 
Thanks again for your answer.
 
Best regards
 
Fabien
 
***************************
Fabien Soldevila

Expert technique
Département Edition / Intégration - Pôle Intégration Agence de Mutualisation des Universités et Etablissements (Amue)

E-mail : [hidden email]
Web : http://www.amue.fr
Tel : 04 99 77 30 56
***************************
 


De: Jim Fu [[hidden email]]
Date: ven. 30/10/2009 18:00
À: [hidden email]
Objet : Re: File On Demand Read - fileNameIsRegex="true"

Hi,

the original implementation of file on demand read does not support file name as regex, see file binding extensibility elements reference wiki page : http://wiki.open-esb.java.net/Wiki.jsp?page=PageFileBindingExtensibilityElements
the open esb issue: https://open-esb.dev.java.net/issues/show_bug.cgi?id=1982  is filed for the RFE.
so if you are using nightly build from ojc-trunk, it does not contain the RFE, for now, it is only available in GFESBv2.2

regards
Jim

SOLDEVILA Fabien wrote:
Hello,

I use the last nightly build of the File BC.
I want to use a File BC On Demand Read with a Regular Expression ([0-9]*.xml for exemple).
I'm unable to do, the BPEL don't read my file. I have try it using fileNameIsRegex="true".
With a File BC Pool, it's run.

Is it possible ? 

Thanks and regards,

Fabien Soldevila

***************************
Fabien Soldevila

Expert technique
Département Edition / Intégration - Pôle Intégration Agence de Mutualisation des Universités et Etablissements (Amue)
 
E-mail : [hidden email]
Web : http://www.amue.fr
Tel : 04 99 77 30 56
*************************** 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]