When trying to use a SOAP client with JBOSS I found lot of problems. In particular, I was able to deploy some WSDL files inside the JBOSS server but, when I tried to use them creating a SOAP web service client, JBOSS comes out with lot of errors, each one that said
Exception in thread "main" java.lang.IllegalArgumentException: Cannot obtain wsdl service: {http://localhost:8080/ggServices/CalculatorBean}CalculatorService at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaDataInternal(JAXRPCClientMetaDataBuilder.java:171)at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:133)
at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:85)
at org.jboss.ws.core.jaxrpc.client.ServiceImpl.<init>(ServiceImpl.java:111)
at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
at org.bilgidata.kitapdemo.service.Client.main(Client.java:18
I found around the Web lot of stuff talking about this problem, and it seems that JBOSS have some problem with SOAP clients (especially for my JBOSS version 5.1.0.GA ).
For this I change from SOAP to REST and everything works!
Thursday, March 31, 2011
Saturday, March 26, 2011
[Java>JavaMail] java.lang.SecurityException: "Access to default session denied" occures.
I found lot of problems when trying to send an email through java.
The first time I recompiled and restarted my application everything seems to work fine.
At the first time my application was able to correctly send an email to the desired e-mail address. Once this email was sent, there was no hope to resend another email to another (or same) address.
The stack trace said:
[Java>JavaMail] java.lang.SecurityException: "Access to default session denied" occures.
And lot of error messages...The stack trace said that the error was at the line in which my application perform the call to the send mail code class.
Here is the problem.
This error is raised in the getDefaultInstance method in javax.mail.Session.java. According.It occurs when this session has been already initialized, used or recharged recompiling the whole application everything work...
HOW TO FIX THIS PROBLEM?
Well, it's very simple write a singleton class for the send mail code class and everything works perfectly!
The first time I recompiled and restarted my application everything seems to work fine.
At the first time my application was able to correctly send an email to the desired e-mail address. Once this email was sent, there was no hope to resend another email to another (or same) address.
The stack trace said:
[Java>JavaMail] java.lang.SecurityException: "Access to default session denied" occures.
And lot of error messages...The stack trace said that the error was at the line in which my application perform the call to the send mail code class.
Here is the problem.
This error is raised in the getDefaultInstance method in javax.mail.Session.java. According.It occurs when this session has been already initialized, used or recharged recompiling the whole application everything work...
HOW TO FIX THIS PROBLEM?
Well, it's very simple write a singleton class for the send mail code class and everything works perfectly!
Subscribe to:
Comments (Atom)