NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

File Binding component for writing files
Goto page 1, 2  Next
 
Post new topic   Reply to topic    NetBeans Forums -> SOA Users
View previous topic :: View next topic  
Author Message
nickd



Joined: 15 Dec 2008
Posts: 7

PostPosted: Mon Dec 15, 2008 10:25 am    Post subject: File Binding component for writing files Reply with quote

Can anyone point me to an example how I can use NetBeans 6.5 to write files with the File Binding component. I have followed the Flight Plan File Binding tutorial which uses a File Binding component to read and write files but I have no idea how I can use the file binding component to simply write files.
Back to top
Jason.Baragry@sun.com
Posted via mailing list.





PostPosted: Mon Dec 15, 2008 10:32 am    Post subject: File Binding component for writing files Reply with quote

Hi Nick,

The netbeans enterprise pack used to contain a core set of the OpenESB
project tooling - including FileBC.
http://wiki.open-esb.java.net/
However, I'm not sure if that is still the case.

OpenESB tooling is still using NB6.1 and I'm not sure how stable the
openesb bits are if you deploy them to NB6.5

I recommend that you grab the OpenESB or GlassfishESB installer.
(GlassfishESB is the stable release of OpenESB).
https://open-esb.dev.java.net/Downloads.html

You can then use FileBC quite simply. Here's some docs including how to
write files:
http://wiki.open-esb.java.net/Wiki.jsp?page=CommonUserScenarios

If you have further questions you should probably ask on the openesb forum.
https://open-esb.dev.java.net/MailingLists.html

rgds
Jason

nickd wrote:
Quote:
Can anyone point me to an example how I can use NetBeans 6.5 to write files with the File Binding component. I have followed the Flight Plan File Binding tutorial which uses a File Binding component to read and write files but I have no idea how I can use the file binding component to simply write files.






--
Jason Baragry
Lead Architect, SOA / Business Integration.
Sun Microsystems, Central and Northern Europe
Mobile +47 4899 4603
Email address-removed
Back to top
nickd



Joined: 15 Dec 2008
Posts: 7

PostPosted: Mon Dec 15, 2008 11:11 am    Post subject: Confused about FileBinding Reply with quote

Hi Jason,
thanks for your quick reply.

I am a little confused about the relationship between OpenESB and NetBeansIDE 6.5.

I have downloaded and am using NetBeans 6.5 (with the bundled GlassFish) and have completed a few of the SOA Tutorials. I have, in this time, read several documents from OpenESB (including the one you point me to) which describe a similar but not identitical functionality in the area of File Binding.

Is OpenESB a subset of NetBeans 6.5? Does NetBeans 6.5 just 'use' a subset of FileBinding as specified by OpenESB? Can OpenESB be used with NetBeans 6.5? Boy, am I confused.


Ideally I would like to know how I can use the File Binding that comes with NetBeans 6.5 IDE to write files.
Back to top
Vitaly Bychkov
Posted via mailing list.





PostPosted: Mon Dec 15, 2008 11:27 am    Post subject: File Binding component for writing files Reply with quote

Hi Nick,

OpenESB design side is based on Netbeans 6.1
In general case you can't install Netbeans 6.1 modules into Netbeans 6.5
because they are binary incompatible.

Although You can use GlassFish ESB with the latest JBI runtime from the
Netbeans 6.5 you can't use the latest design side modules from OpenESB.
That is why it is better to use Netbeans 6.1 bundled with OpenESB.

More over File BC has both design and runtime parts.

Vitaly.

nickd wrote:
Quote:
Hi Jason,

thanks for your quick reply.



I am a little confused about the relationship between OpenESB and NetBeansIDE 6.5.



I have downloaded and am using NetBeans 6.5 (with the bundled GlassFish) and have completed a few of the SOA Tutorials. I have, in this time, read several documents from OpenESB (including the one you point me to) which describe a similar but not identitical functionality in the area of File Binding.



Is OpenESB a subset of NetBeans 6.5? Does NetBeans 6.5 just 'use' a subset of FileBinding as specified by OpenESB? Can OpenESB be used with NetBeans 6.5? Boy, am I confused.





Ideally I would like to know how I can use the File Binding that comes with NetBeans 6.5 IDE to write files.




Back to top
Jason.Baragry@sun.com
Posted via mailing list.





PostPosted: Mon Dec 15, 2008 11:45 am    Post subject: File Binding component for writing files Reply with quote

Hi Nick,

In addition to what Vitaly wrote.

OpenESB is a project which provides integration capabilities. It
includes run-time engines (e.g., bpel, XSLT) and bindings (e.g., file,
webservices, jms, email). These runtime pieces are (JBI) plugins for
Glassfish. For each of these service engines and bindings OpenESB also
includes design time components. Each of the design time pieces is a
plugin to netbeans - specifically netbeans 6.1.

So OpenESB is something that builds on the core netbeans and glassfish
platforms.

However, to make life a little confusing, if you simply download
netbeans or glassfish you often get a few small pieces of OpenESB
included by default. This seems to be what you have discovered.
Sometimes these few small pieces will just work. However, to be sure
that you have everything you need, I suggest using the GlassfishESB or
OpenESB installer. It includes Glassfish and NetBeans with all the
relevant runtime and designtime plugins.

The only issue is that, as Vitaly pointed out, OpenESB is still using
netbeans6.1 for its design time environment.

hth
Jason



nickd wrote:
Quote:
Hi Jason,

thanks for your quick reply.



I am a little confused about the relationship between OpenESB and NetBeansIDE 6.5.



I have downloaded and am using NetBeans 6.5 (with the bundled GlassFish) and have completed a few of the SOA Tutorials. I have, in this time, read several documents from OpenESB (including the one you point me to) which describe a similar but not identitical functionality in the area of File Binding.



Is OpenESB a subset of NetBeans 6.5? Does NetBeans 6.5 just 'use' a subset of FileBinding as specified by OpenESB? Can OpenESB be used with NetBeans 6.5? Boy, am I confused.





Ideally I would like to know how I can use the File Binding that comes with NetBeans 6.5 IDE to write files.






--
Jason Baragry
Lead Architect, SOA / Business Integration.
Sun Microsystems, Central and Northern Europe
Mobile +47 4899 4603
Email address-removed
Back to top
nickd



Joined: 15 Dec 2008
Posts: 7

PostPosted: Mon Dec 15, 2008 1:29 pm    Post subject: Reply with quote

Thanks very much for the 'smallprint' Vitaly and Jason.

I shall follow your suggestion and try NetBeans 6.1 with OpenESB.
Does this mean I just have to download NetBeans 6.1 and I automatically get the correct OpenESB?
Back to top
Jason.Baragry@sun.com
Posted via mailing list.





PostPosted: Mon Dec 15, 2008 1:44 pm    Post subject: File Binding component for writing files Reply with quote

No probs.

You should grab the glassfishesb RC1 installer from here:
https://open-esb.dev.java.net/Downloads.html

It includes netbeans, glassfish, and all the runtime and design time
plug-ins for openesb.

rgds
Jason

nickd wrote:
Quote:
Thanks very much for the 'smallprint' Vitaly and Jason.



I shall follow your suggestion and try NetBeans 6.1 with OpenESB.

Does this mean I just have to download NetBeans 6.1 and I automatically get the correct OpenESB?






--
Jason Baragry
Lead Architect, SOA / Business Integration.
Sun Microsystems, Central and Northern Europe
Mobile +47 4899 4603
Email address-removed
Back to top
nickd



Joined: 15 Dec 2008
Posts: 7

PostPosted: Mon Dec 15, 2008 3:14 pm    Post subject: Reply with quote

Case solved - isn't it quick getting somewhere if you start from the right place.

Now I'm just a little worried that I am going to need some functionality that is available in NetBeans 6.5 but is not available in 6.1. Still, with you guys here to help...

Many Thanks.
Back to top
nickd



Joined: 15 Dec 2008
Posts: 7

PostPosted: Thu Dec 18, 2008 9:31 am    Post subject: Reply with quote

I now have a problem when invoking a WebService from within a JBI Module.

I have a simple example whereby a File binding component reads a file containing plain text. This text is processed in my JBI Module by the 'poll' method. Up to now, everything is OK. The 'poll' method, however, calls an existing WebService that processes the string. This worked fine in NetBeans 6.5 - the Service Assembly of the Composite Apllication recognised that the JBI Component made a call to a Soap WSDL Port and connected the consumer port of the JBI Module with the correct provider port a Soap WSDL port.
In NetBeans 6.1 I the Service Assemly shows the consumer port of the JBI Module as unconnected and the Web Service does not exist.
In NetBeans 6.5 this all worked like a dream - I really was 'programming' by drag'n'drop. Is it also so simple in 6.1 or am I doing something wrong? Please advise.

Below is the code snippet of the poll process in 6.1 and attached is a screen dump of the Service Assemply design in 6.5 and 6.1





@WebService(serviceName = "FileInboundService", portName = "upperBindWSDL_InboundPort", endpointInterface = "org.netbeans.j2ee.wsdl.upperca.upperbindwsdl.FileInboundPortType", targetNamespace = "http://j2ee.netbeans.org/wsdl/upperCa/upperBindWSDL", wsdlLocation = "META-INF/wsdl/upperWebServiceFromWSDL/upperBindWSDL.wsdl")
@Stateless
public class upperWebServiceFromWSDL implements FileInboundPortType {

@WebServiceRef(wsdlLocation = "http://localhost:8080/upperServiceService/upperService?wsdl")
private UpperServiceService service;

public void poll(java.lang.String part1) {

try { // Call Web Service Operation
upper.UpperService port = service.getUpperServicePort();
// TODO initialize WS operation arguments here
java.lang.String parameter = part1;
// TODO process result here
java.lang.String result = port.upper(parameter);
System.out.println("Result = " + result);
} catch (Exception ex) {
// TODO handle custom exceptions here
}

}
}



ServiceAssembly.jpg
 Description:
 Filesize:  88.01 KB
 Viewed:  65514 Time(s)

ServiceAssembly.jpg


Back to top
Jason.Baragry@sun.com
Posted via mailing list.





PostPosted: Thu Dec 18, 2008 10:31 am    Post subject: File Binding component for writing files Reply with quote

Hi Nick,

Its not so easy to see what you are trying to do from the diagrams.

In the NB6.5 example you have joined the File BC to a local JavaEE EJB
Service. The EJB Service then calls the remote Webservice.
In the NB6.1 example there is no remote WebService.

Are you trying to join the FileBC directly to a remove webservice or
does it go through an intermediate EJB Service?

However, it should be very easy to do what you are trying with OpenESB
(Netbeans 6.1). So a step must have been left out. You simply:
- create the EJB service which communicates with the remote service
- add it to a composite application. When you build, you should see the
JavaEE service linked to an outgoing SOAP Binding.
- in the CASA editor, drag the File Binding onto the canvas and join it
to the EJB Service. A wizard will pop-up letting you configure the
properties of the File Binding.

I suggest you only use the OpenESB and GlassfishESB technology (which
comes bundled with NB6.1). There is no guarantee that NB6.5 will do what
you want - even if it seems to work this time. Also, I suggest you ask
subsequent questions on the OpenESB users mailing list. You will get
better response from that list
https://open-esb.dev.java.net/MailingLists.html

rgds
Jason


nickd wrote:
Quote:
I now have a problem when invoking a WebService from within a JBI Module.



I have a simple example whereby a File binding component reads a file containing plain text. This text is processed in my JBI Module by the 'poll' method. Up to now, everything is OK. The 'poll' method, however, calls an existing WebService that processes the string. This worked fine in NetBeans 6.5 - the Service Assembly of the Composite Apllication recognised that the JBI Component made a call to a Soap WSDL Port and connected the consumer port of the JBI Module with the correct provider port a Soap WSDL port.

In NetBeans 6.1 I the Service Assemly shows the consumer port of the JBI Module as unconnected and the Web Service does not exist.

In NetBeans 6.5 this all worked like a dream - I really was 'programming' by drag'n'drop. Is it also so simple in 6.1 or am I doing something wrong? Please advise.



Below is the code snippet of the poll process in 6.1 and attached is a screen dump of the Service Assemply design in 6.5 and 6.1











@WebService(serviceName = "FileInboundService", portName = "upperBindWSDL_InboundPort", endpointInterface = "org.netbeans.j2ee.wsdl.upperca.upperbindwsdl.FileInboundPortType", targetNamespace = "http://j2ee.netbeans.org/wsdl/upperCa/upperBindWSDL", wsdlLocation = "META-INF/wsdl/upperWebServiceFromWSDL/upperBindWSDL.wsdl")

@Stateless

public class upperWebServiceFromWSDL implements FileInboundPortType {



@WebServiceRef(wsdlLocation = "http://localhost:8080/upperServiceService/upperService?wsdl")

private UpperServiceService service;



public void poll(java.lang.String part1) {



try { // Call Web Service Operation

upper.UpperService port = service.getUpperServicePort();

// TODO initialize WS operation arguments here

java.lang.String parameter = part1;

// TODO process result here

java.lang.String result = port.upper(parameter);

System.out.println("Result = " + result);

} catch (Exception ex) {

// TODO handle custom exceptions here

}



}

}




Attachments:
http://forums.netbeans.org//files/serviceassembly_359.jpg



--
Jason Baragry
Lead Architect, SOA / Business Integration.
Sun Microsystems, Central and Northern Europe
Mobile +47 4899 4603
Email address-removed
Back to top
nickd



Joined: 15 Dec 2008
Posts: 7

PostPosted: Thu Dec 18, 2008 11:31 am    Post subject: Reply with quote

Hi Jason,
Thanks again for your prompt reply.

Quote:
- add it to a composite application. When you build, you should see the
JavaEE service linked to an outgoing SOAP Binding.


This is the step that does not work. I add it to the Composite Application and see the JavaEE service but it is not linked to an outgoing SOAP binding.

My even more simplified example no longer using file binding and is as follows. It is simply a Web Servive (EJBjbi) calling another Web Service (EJBapp):

Step 1. Create an EJB Project called EJBapp containing a WebService called "StringManipulation" with one operation "toUpper".

Step2. Create an EJB Project called EJBjbi containing a WebService called NewWebService with one operation "passThrough".

Step 3. Within EJBjbi Create a WebService Client from project EJBapp->StringManipulation.

Step 4. Extend the implementation of "passThrough" in EJBjbi to call "toUpper" (by dragging and dropping the toUpper from the Web Service references into the method).

Step 5. Build EJBapp and EJBjbi.

Step 6. Create a Composite App project and drop EJBjbi on the JBI Modules canvas. Build.

Result:
There is no Soap Binding and (therefore?) no link from the JavaEE Service.

Shall I post this to the newsgroup you recommend? - this one seems to give a pretty good response (< 30 minutes!)

Purely out of interest I have repeated the steps 1-6 on NetBeans 6.5 and it worked as expected. I am, however, heading your advice and currently going with OpenESB
Back to top
nickd



Joined: 15 Dec 2008
Posts: 7

PostPosted: Thu Dec 18, 2008 11:56 am    Post subject: Reply with quote

Here the 3 Projects - the naming does not exactly match the steps as described - EJB1 is EJBjbi and EJB2 is EJBapp.


JBIProblem.zip
 Description:

Download
 Filename:  JBIProblem.zip
 Filesize:  71.63 KB
 Downloaded:  758 Time(s)

Back to top
Sondwely



Joined: 11 Oct 2010
Posts: 3

PostPosted: Mon Oct 11, 2010 8:35 am    Post subject: Reply with quote

The balance tree (and skills, for that matter) lack synergy. It's a pretty broad statement, and one (RS Gold)that people have been arguing over for a fairly extended amount of time now. Before any(RuneScape Gold) real discussion over how the balance rotation can be improved at least improved(Final Fantasy Gil) via synergy the first thing that we must do is lay down some grounding for what "synergy" means within this conversation. We are also looking forward to receiving your order. If you have any problems with Buy WOW Gold, please come to our website, you will receive rapid relies to your(WOW Gold) enquiries.
Back to top
norrow5210



Joined: 14 Mar 2011
Posts: 3

PostPosted: Mon Mar 14, 2011 4:00 am    Post subject: Reply with quote

liu xing zui lou...
Back to top
tpsky



Joined: 23 Mar 2011
Posts: 3

PostPosted: Wed Mar 23, 2011 7:00 am    Post subject: Reply with quote

Hi Nick,

OpenESB design side is based on Netbeans 6.1
In general case you can't install Netbeans 6.1 modules into Netbeans 6.5
because they are binary incompatible.

Although You can use GlassFish ESB with the latest JBI runtime from the
Netbeans 6.5 you can't use the latest design side modules from OpenESB.
That is why it is better to use Netbeans 6.1 bundled with OpenESB.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> SOA Users All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo