[JBoss Web Services] - message driven bean exposed as a web service
by reza g
reza g [http://community.jboss.org/people/rezaghp] created the discussion
"message driven bean exposed as a web service"
To view the discussion, visit: http://community.jboss.org/message/552432#552432
--------------------------------------------------------------
Hi,
Trying to expose an mdb as a ws :
@WebService(name="Calculator2",
targetNamespace = "http://org.jboss.ws/samples",
serviceName="Calculator2")
@WebContext(contextRoot="/jboss-ejb3-tutorial-webservice")
@SOAPBinding(style = SOAPBinding.Style.RPC)
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/tutorial")
},
messageListenerInterface = javax.jms.MessageListener.class)
public class CalculatorMDB extends JMSTransportSupportEJB3 {
@WebMethod(operationName = "add")
public int add(int x, int y)
{
return x * y;
}
}
public interface Calculator2 extends Remote
{
int add(int x, int y);
}
I get the following error:
java.lang.RuntimeException: Unable to choose messagingType interface for MDB CalculatorBean from []
Has anyone done this before?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/552432#552432]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 12 months
Re: [jboss-user] [JBoss Tools] - Driver Definition/JDBC driver
by Brian Fitzpatrick
Brian Fitzpatrick [http://community.jboss.org/people/bfitzpat] replied to the discussion
"Driver Definition/JDBC driver"
To view the discussion, visit: http://community.jboss.org/message/552417#552417
--------------------------------------------------------------
Easiest way to get the particular values you're looking for is to look at the enablement plug-ins for those databases...
For MySQL, look at org.eclipse.datatools.enablement.mysql in the plugin.xml for the "org.eclipse.datatools.connectivity.driverExtension" extension point. You'll see there are actually multiple driver definitions listed... one per version... 4.0, 4.1, 5.0, 5.1.
In the 5.1 case, the "special sauce" you're looking for is the driver template ID - org.eclipse.datatools.enablement.mysql.5_1.driverTemplate. The rest stays the same like the Derby case.
For MS SQL, look at the org.eclipse.datatools.enablement.msft.sqlserver plug-in.
For postgres, look at org.eclipse.datatools.enablement.postgresql...
And so on.
You'll have to override all the templates you're interested in (including the various vendor/version combinations) to include appropriate jars where they're needed.
Hope that helps!
--Fitz
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/552417#552417]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 12 months
[JBoss Tools] - Updates to the WS Tester for the next milestone...
by Brian Fitzpatrick
Brian Fitzpatrick [http://community.jboss.org/people/bfitzpat] modified the blog post:
"Updates to the WS Tester for the next milestone..."
To view the blog post, visit: http://community.jboss.org/community/jbosstools/blog/2010/07/13/updates-t...
--------------------------------------------------------------
Yes, I'm back again... And this time, it's a bit of a beautification process we've put the Web Service Tester through...
We did some spring (well, summer now) cleaning to wipe away the ugly gray backgrounds and dreary boxes. In their place, we have the gleaming white controls and clean lines available using the Eclipse Forms Toolkit.
Here's an example after invoking a JAX-WS service.
http://community.jboss.org/servlet/JiveServlet/showImage/38-1872-4264/ws_... http://community.jboss.org/servlet/JiveServlet/downloadImage/38-1872-4264...
You'll notice we've pared down a few things.
1. We got rid of the Action URL, since usually you won't need that if you're testing from a WSDL (which is one of our two primary use cases).
2. We combined the two combo boxes into one - so if you're doing a JAX-WS invocation, you select "JAX-WS" in the list and if you're doing a JAX-RS call, you specify the operation - GET, POST, PUT, and DELETE.
3. Instead of big textual buttons, we went with smaller toolbar-style buttons with icons and tooltips. The two in the top right are for selecting a WSDL and invoking the service. The four in the Response Body section are: Save to File, Open in Editor (XML or Text), Show Raw Text, and Show in Web Browser. The last is handy if your web service (specifically some RESTful services) return formatted HTML.
4. And instead of tabs, we went with collapsible sections.
5. Like before, we have a resizable sash between the Request and Response sections of the view. However, I'm debating adding another sash on the right side between the Request Headers and Request Body areas to aid in resizing that a bit more.
6. We got rid of the connection to the TCP/IP Monitor simply because it was redundant. If you have a call for that functionality, we can look at adding it back in, but we thought it was a bit of overkill. at this point.
Here's an example after executing a JAX-RS service's GET call with the response body opened in an editor above it:
http://community.jboss.org/servlet/JiveServlet/showImage/38-1872-4265/ws_... http://community.jboss.org/servlet/JiveServlet/downloadImage/38-1872-4265...
So all in all, I'm quite pleased with the results of this "facelift". It should start appearing in builds for the JBoss Tools 3.2 M2 milestone soon, so let me know what you think when you play with it.
Thanks!
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/community/jbosstools/blog/2010/07/13/updates-t...]
13 years, 12 months
Re: [jboss-user] [JBoss Tools] - Driver Definition/JDBC driver
by Brian Fitzpatrick
Brian Fitzpatrick [http://community.jboss.org/people/bfitzpat] replied to the discussion
"Driver Definition/JDBC driver"
To view the discussion, visit: http://community.jboss.org/message/552406#552406
--------------------------------------------------------------
That's certainly part of the equation - making sure that the driver jar is available on the Eclipse classpath.
But there's another step... Once you have your jar wrapped in a plug-in, you have to tell the driver template where to find it. You can do that with a driver template override...
For example, if I've exposed my derby.jar for a Derby database JDBC driver in plug-in org.eclipse.datatools.derby.wrapper... I can override the jar list of that driver so that it automatically picks it up.
<plugin>
<extension
point="org.eclipse.datatools.connectivity.driverExtension">
<driverTemplateOverride
jarList="[org.eclipse.datatools.derby.wrapper]/lib/derby.jar"
priority="1"
targetId="org.eclipse.datatools.connectivity.db.derby102.genericDriverTemplate">
</driverTemplateOverride>
</extension>
</plugin>
If you want it to automatically add the driver instance the first time the DriverManager is fired up (i.e. whenever you fire up the Data Source Explorer it'll check to see if the default driver instance has been created), you just add createDefault = true like this:
<extension
point="org.eclipse.datatools.connectivity.driverExtension">
<driverTemplateOverride
createDefault="true"
jarList="[org.eclipse.datatools.derby.wrapper]/lib/derby.jar"
priority="1"
targetId="org.eclipse.datatools.connectivity.db.derby102.genericDriverTemplate">
</driverTemplateOverride>
</extension>
Hope that helps!
--Fitz
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/552406#552406]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 12 months