Possible reasons may be caused by https when the application is not configured for security.

I am creating a web service

@WebService(serviceName = "DynamipsService2") @Stateless() public class DynamipsService2 { @WebMethod(operationName = "StartSession") public static String StartSession(@WebParam(name = "key") String key) { try { return "100-Session started"; } catch (Exception ex) { return null; } } } 

I want to check, but the page http: // localhost: 8080 / DynamipsService2 / DynamipsService2? Tester fails

Error creating artifacts for after WSDL http: // localhost: 8080 / DynamipsService2 / DynamipsService2? WSDL

Possible reasons may be caused by https when the application is not configured for security.

I created other web services in one assembly and it works.

+4
source share
7 answers

I had the same problem and reason why in the server log. I am using Glassfish 3.1 with netBeans 7. And the error I received on Glassfish output was: INFO: [ERROR] com.sun.tools.javac. A little unavailable in the classpath, requires Suns JDK version 5.0 or later.

I did a bit of work on Google, and it seems because the Glassfish server worked with openjdk, which came with ubuntu. If your problem is the same, I found a solution to remove openjdk jre, for example:

sudo apt-get remove openjdk-6-jre sudo apt-get autoremove

Hope this is helpful.

PS: I assigned / usr / lib / jvm / java -6-sun / bin / java to the java tab in the server configuration wizard in netBeans, but I don’t know if this was part of the solution (I'm afraid to change it back: p)

+1
source

I just experienced this problem. The solution for me was to use my hostname rather than localhost in the tester url.

So, in my case, the following: this is that the default NetBeans / Glassfish, when I clicked the test web service in the NetBeans interface, did not work:

 http://localhost:8080/Calculator/Calculator?Tester 

However, when I paste the following into the browser, it works:

 http://david-pc:8080/Calculator/Calculator?Tester 

I could not figure out how to change the host name that NetBeans uses for the built-in test dialog box (and I could not cut + paste the URL from the error dialog box). So I had to visually copy the URL from the error message to the browser, replacing the hostname in this path.

+2
source

I had the same problem with Glassfish

but it was more compiled due to NAT

I have GF in NAT - do MYDOMAIN, and the port is redirected to the internal machine

the problem in GF is that it tries to connect to itself by the domain name, which is redirected to the internal network again (does it work? wsdl)

I made the addition of a workaround to / etc / hosts (127.0.0.1 domainname)
keep in mind that this is only a temporary solution

try checking if you have "localhost" in your hosts file (in windows c: / windows / system32 / drivers / etc / hosts) and ping localhost

I will add GF log - maybe someone in the future will look for it google :) :) in addition, I looked at GF logs, there was something like →

 Connection timed out Failed to read the WSDL document: http://MYDOMAIN:8080/MYSERVICE?WSDL, because 1) could not find the document; /2) the document could not be read; 3) the root element of the document is not <wsdl:definitions>. failed.noservice=Could not find wsdl:service in the provided WSDL(s): At least one WSDL with at least one service definition needs to be provided. Failed to parse the WSDL. 
+1
source

Which web server are you using? If you use Glassfish, you can open the server administration page and select Configurations===>server-config===>Security

and enable Security Manager

0
source

Check your domains /{YOUR_DOMAIN►/config/domain.xml

If you install Glassfish using Eclipse, everything will be done for you automatically.

Now I am surprised if I started the domain from the command line, it gave me this error, but by starting Glassfish 4 from Eclipse it does not show any problems.

0
source

One of the reasons may be that you incorrectly configured the JAVA_HOME environment variable (with the correct path), and the JAVA_HOME / bin directory was added to the global PATH environment variable. For some processes, glass fish is looking for a way to the JDK class. I hope for this help.

0
source

I had the same problem, and that is because you have a static method that I realized after some debugging. Just remove the statics from the method and it should work.

 @WebMethod(operationName = "StartSession") public String StartSession(@WebParam(name = "key") String key) { try { return "100-Session started"; } catch (Exception ex) { return null; } } 
0
source

All Articles