Reputation: 13
I create a JAX-WS webservice and deployed it on weblogic 10.3.3. It is deployed succesfully and everything is working fine.
Now, we want to access webservice by hiding the WSDL. I try to hide the WSDL from weblogic admin console. Goto this location
Deployed application -> Webservice -> Configuration tab
In this tab, by putting "false" in the parameter "WSDL Publish File".
Saving this created a Plan.xml. The issue arises when I try to activate the changes in Weblogic. Following is the exception that I got:
An error occurred during activation of changes, please see the log for details.
Error encountered during prepare phase of deploying WebService module 'TB_DBLEGI_SIMULATOR-trunk.war'. Error encountered while deploying WebService module 'TB_DBLEGI_SIMULATOR-trunk.war'. Failed to publish wsdl java.io.IOException: Wsdl file should be placed at META-INF/wsdl, or WEB-INF/wsdl
Wsdl file should be placed at META-INF/wsdl, or WEB-INF/wsdl
In my war, the WSDL is placed inside the WEB-INF/wsdl folder. Also, I tried to place it at different places but I had no luck.
Upvotes: 1
Views: 3268
Reputation: 891
You can always write and register a Filter
to block access to a given resource.
For example:
public class BlockFilter implements Filter {
@Override
public void init(FilterConfig config) throws ServletException {}
@Override
public void destroy() {}
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
return;
}
}
And register the filter in the web.xml
:
<filter>
<filter-name>blockFilter</filter-name>
<filter-class>namespace.BlockFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>blockFilter</filter-name>
<url-pattern>*?wsdl</url-pattern>
</filter-mapping>
Upvotes: 4