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