Showing posts with label SOAP. Show all posts
Showing posts with label SOAP. Show all posts

Sunday, September 4, 2016

View EndPoint is not Available on GlassFish

If you are writing a SOAP Webservice, then you may face the following situation once you deploy your project on GlassFishServer:

There is a "Launch" action available under the "Modules and Components" section but "View Endpoint" is not available.

In that case, you can solve this issue by changing the web.xml file (which is available under WEB-INF folder) of your project as follows:

<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.5"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
  <display-name>Archetype Created Web Application</display-name>
</web-app>

Then, redeploy your project and then you are good to go! Good Luck.

WebService Client Tester is not Working on GlassFish Server

If you are writing a SOAP Webservice, then you may face the following situation:

WSDL: (/YourProject/YourService?wsdl) is working fine but 
Tester (/YourProject/YourService?Tester) is not working 

Then, this can be solved using:
Create a new text file and rename it jaxp.properties (if it doesn't exist under /path/to/jdk1.8.0/jre/lib) and then write this line in it: javax.xml.accessExternalSchema = all

Then, restart the glassfish server and you are good to go! Good Luck.

There is another way to fix this if you are facing this problem when working on a Maven Web Project:
(Since the above solution perfectly worked for me, I didn't test this solution:)


If you are using the jaxws Maven plugin and you get the same error message, add the mentioned property to the plugin configuration:

...
<plugin>
  <groupId>org.jvnet.jax-ws-commons</groupId>
  <artifactId>jaxws-maven-plugin</artifactId>
  <version>2.3</version>
  <configuration>
    <!-- Needed with JAXP 1.5 -->
    <vmArgs>
        <vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
    </vmArgs>
  </configuration>
</plugin>

I found the above plugin configuration on StackOverflow.