Integrating custom binding component
The answer to the question may be obvious, but here goes.
I have developed a custom binding component (integrates a legacy system with it's own proprietary binary wire protocol and session management). I'm using OpenESB 2.0 and have followed the provided samples. I can install my BC and it connects successfully to the legacy system. I can also intstall a test service engine that I created which echoes messages back to the legacy system through the BC.
What I'm struggling with is the correct way to integrate my BC with others that ship with the ESB. For example, I'd like to put together a simple scenario where the messages from the legacy system are dumped to a file. How do I connect the dots from my BC to the file BC? I can see how to use the file BC in a BPEL process via NetBeans (there are file BC WSDL extensions). Can I plug my own BC in this way? Is there an XML file that I can edit by hand?
Thanks!
[945 byte] By [
adwagsa] at [2007-11-27 4:42:46]

# 1
To develop a BPEL process in NetBeans with your BC, you'd have to develop NetBeans support for your BC (a NetBeans Plug-in).Our team has recently done this and one of our guys actually just blogged about it. Check it out here: http://gallemore.blogspot.com/ -Chad
# 2
Sweet, thanks for the tip! That's exactly what I was missing.- Adam
# 3
Interesting plugin info and informative blog atleast for me who skimmed through it. I thought the original question was two fold, design time and runtime.
I think the design time was answered by Chad. How about runtime? Will the Composite Application be able to generate the connections entries? Will the CASA editor (graphical editor for composing the applications connections) understand the new BC?
I do hope that plugin info as mentioned by Chad is all that we need. In the unlikely event it doesn't suffice, i am sure you know that the jbi.xml has the connection entries. Maybe for now you can manually enter the values in the jbi.xml connecting your BC to other components.
Keep us posted with your progress, I for sure am interested.
-Kiran.
# 4
As far as connection entries go, they will be correctly generated.
And for the CASA Editor ... i've never actually used it. We just create a BPEL Module, create a Composite Application, and add the BPEL Module to the Composite Application and deploy. (You can actually see me doing this here: https://sip-bc.dev.java.net/screencast/sipInbound.htm)
I did however just open up the CASA Editor for an existing Composite Application project. Our WSDL Bindings were listed in the palette and everything was correctly illustrated in the CASA Editor.
So, to answer your questions, yes and yes.
# 5
Hi,
We are currently working on the BC-BC support in the NetBeans tooling. This requires some changes be made in both CASA editor and the project system. If you can wait few weeks, this feature will be showing up in the next NetBeans milestone build (M10) around the end of Jun.
However, if you need to try this out sooner. You can manually create a connection between two BCs. The basic steps are:
- create a dummy bpel project using a wsdl from your BC
- add a File port and a connection using CASA
- generate the deployment SA zip file
- there will be two connections generated in SA jbi.xml
- replace the two connections with a BC-BC connection
- deploy the modified SA zip file using JBI manager
Let me know if you need more help on this.
Thanks,
--
Tientien Li
# 6
Chad,Great blogs.. We are currently documenting the wsdl extension plug-in infrastructure with samples and instructions. Hopefully this can be published within two weeks or so. Please help review the documentation and provide feedback.Thanks,--Tientien
# 7
Tientien,
Thanks for the info. I have a couple of additional questions.
I tried doing something similar to what Chad illustrated in the post just before yours. I developed a plug-in for my BC, and created a simple BPEL module that receives messages from my BC and writes them to files. Messages from my BC are making it to the BPEL module, but I'm getting an error that my WSDL 2.0 message isn't in the correct wrapped form. I'd like to get this worked out so my BC can integrate with BPELs correctly. Are you aware of an example illustrating how to do the wrapping? The WSDL 2.0 - 1.1 wrapping documentation in the JBI spec is a little less than I need to understand what is required.
Eventually, I would also like to do direct BC to BC connections as you mentioned. I'm just investigating at this point, so I can wait for NetBeans support. However, could you provide an example of what the BC-BC connection would look like? For example, say I want to use the file BC to poll a directory, reading files and then writing them out to another directory. Wouldn't I always need the BPEL in the middle so that the file BC knows what directories to read from write to, etc?
Thanks again,
Adam
# 8
Yeah we ran into the same problem when writing our BCs. First OpenESB doesn't support WSDL 2.0 yet, so you should be creating 1.1 WSDLs.
The wsdl-11-wrapper documentation in the spec is a little hard to understand. The following class has some decent documentation that I referenced along with the spec to gain an understanding: https://open-jbi-components.dev.java.net/source/browse/open-jbi-components/ojc-core/component-common/component/src/com/sun/jbi/nms/wsdl11wrapper/util/WrapperUtil.java?rev=1.2&view=markup
You might think about reusing this class. The jar is included in the sun-wsdl-library, which is a shared library that is installed with OpenESB. The wsdl11wrapper package has several useful classes.
Here is an example of the UDDI BC, https://uddi-bc.dev.java.net/, wsdl wrapper based off this WSDL example (https://uddi-bc.dev.java.net/extensions/uddi_wsdl_extensions.htm)
Request
<jbi:message xmlns:tns="http://j2ee.netbeans.org/wsdl/uddiWsdl" type="tns:searchUddiRequest" version="1.0" xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper">
<jbi:part>Microsoft</jbi:part>
<jbi:part>StockQuoteService</jbi:part>
</jbi:message>
Response
<jbi:message xmlns:tns="http://j2ee.netbeans.org/wsdl/uddiWsdl" type="tns:searchUddiReply" version="1.0" xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper">
<jbi:part>https://wtest33.redmond.corp.microsoft.com/certification/certification.asmx</jbi:part>
</jbi:message>
Take notice that the target namespace used in the wsdl must be used in the wrapper xml.
Also notice that the type attribute needs to reference the names of the message corresponding to the wsdl:input or wsdl:output. For example the Request content above states type="tns:searchUddiRequest"
which is the name in the WSDL
<message name="[b]searchUddiRequest[/b]">
<part name="businesspart" type="xsd:string"/>
<part name="servicepart" type="xsd:string"/>
</message>
Finally each part defined in the WSDL message needs to map to a jbi:part in the wrapper. For example the searchUddiRequest has two parts: businesspart and servicepart. This means in my wrapper I should have two jbi:part's.
I hope this helps. For another example you can see how the SMTP BC uses the wrapper in its SMTPDenormalizer and SMTPNormalizer: https://open-jbi-components.dev.java.net/source/browse/open-jbi-components/ojc-core/smtpbc/smtpbcimpl/src/com/sun/jbi/smtpbc/
# 9
Thanks! My BC is now talking to BPEL.- Adam