[Beginners Corner] - First webservice
by Renani
Hi,
I'm trying to create a webservice. I followed the tutorials at http://www.javabeat.net/articles/40-creating-webservice-using-jboss-and-e....
The server would not run the war file created by following these steps. I've debugged all day but could not find the reason for it. What I figured out was that the WSDL file was not created. Strangely, the index.html, a static web page I've created for test would not run either.
In the book "JBoss in Action", chapter 9 I read that wsprovide is the program used to generate wsdls and it could be used manually. I attempted to do so and I think I figured out where it all fails. The message I got in Dos prompt is:
Error: Could not generate. (use --show-traces to see full traces)
| java.lang.StringIndexOutOfBoundsException: String index out of range: -1
| at java.lang.String.substring(String.java:1768)
| at org.jboss.wsf.common.JavaUtils.getPackageName(JavaUtils.java:533)
| at org.jboss.ws.metadata.wsdl.WSDLUtils.getTypeNamespace(WSDLUtils.java:
| 700)
| at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.pr
| ocessWebService(JAXWSWebServiceMetaDataBuilder.java:313)
| at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.bu
| ildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:107)
| at org.jboss.ws.tools.jaxws.impl.JBossWSProviderImpl.provide(JBossWSProv
| iderImpl.java:108)
| at org.jboss.ws.tools.jaxws.impl.JBossWSProviderImpl.provide(JBossWSProv
| iderImpl.java:124)
| at org.jboss.wsf.spi.tools.cmd.WSProvide.generate(WSProvide.java:183)
| at org.jboss.wsf.spi.tools.cmd.WSProvide.main(WSProvide.java:76)
The java code I'm trying to generate wsdl for is:
| import javax.jws.WebService;
| import javax.jws.WebMethod;
|
| @WebService
| public class Greeting
| {
| @WebMethod
| public String greetClient(String userName)
| {
| return "Greeting " + userName + "! Have a nice day...";
| }
| }
|
I'm certain that there is an error, not perhaps in the code it self but maybe with my configuration of eclipse (or is it JBoss)?
Would be grateful for any help!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225658#4225658
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225658
17 years
[Installation, Configuration & DEPLOYMENT] - Re: Multiple data sources when using MySQL
by jaikiran
anonymous wrote : 1) How important is it to have JBoss infrastructure use the DefaultDS while applications use something else? (Stated in another way, what advantage does this configuration provide?)
As Peter rightly mentioned, using just a single database to host everything (= server's data and your app's data) isn't the right thing since that data is not related to each other.
anonymous wrote : 2) Is this a supported (as in tried and tested, not as in paid support) configuration using MySQL and JBoss 5.0?
Yes MySQL datasource works against JBossAS-5.0
anonymous wrote :
| 3) Is there really a need to use XA data sources when one source is for JBoss infrastructure and the other is for my application?
You mentioned that you ran into Multiple 1PC exception. Can you post that entire exception stacktrace? And when do this happen? Does it happen in a transaction where you trying to use your app's datasource (to save something to DB) and in the same transaction, send a message JMS message to queue/topic? In that case you are involving 2 transaction aware resources - one is your app's datasource and one is the datasource of JMS (used for message persistence). If you don't want them to be part of the same transaction, probably you can break them into different transactions.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225657#4225657
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225657
17 years