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.htmlrgds
Jason
nickd wrote:
> 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
Jason.Baragry@...