WebService is not "visible" in WebLogic 10.3

I am currently trying to provide my application with a web service. The application uses spring and runs under an instance of Weblogic 10.3.

I built the web service on the principle of "contract first." So I basically have a generated WS-interface, my implementation of this interface is web.xml, which defines servlet bindings and sun-jaxws.xml, which defines the endpoint. (more or less like this: http://www.mkyong.com/webservices/jax-ws/deploy-jax-ws-web-services-on-tomcat/ ).

Now, after deploying my application to weblogic, everything is fine, really. I can enter the WebService URL into my browser, I see WSDL, I can call it methods. If it weren't a small cosmetic fact: In the WL deployment overview, when I click on the deployment, it shows me a list of WebServices ... which is empty. Therefore, my web service is NOT listed there.

So, can someone tell me what I have to do to make the web service appear there?

+4
source share
2 answers

Although it really is not important to have a web service descriptor for JAX-WS, Weblogic sometimes cannot identify WebServices (could not find the reason for this)

The following is what I did to get it working. Add the WebService implementation class as a servlet to web.xml

<?xml version='1.0' encoding='UTF-8'?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" id="WebApp_ID"> <display-name>MyWebService</display-name> <servlet> <servlet-name>serviceServlet</servlet-name> <servlet-class>com.aneesh.WebServiceImpl</servlet-class> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>serviceServlet</servlet-name> <url-pattern>/Service</url-pattern> </servlet-mapping> </web-app> 

and add the webservice descriptor (webservices.xml)

 <?xml version='1.0' encoding='UTF-8'?> <webservices xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1"> <webservice-description> <webservice-description-name>MyWebService</webservice-description-name> <port-component> <port-component-name>MyWebServiceSoapPort</port-component-name> <wsdl-port xmlns:an="http://www.aneesh.com/service">an:MyWebServiceSoapPort</wsdl-port> <service-endpoint-interface>com.aneesh.WebService</service-endpoint-interface> <service-impl-bean> <servlet-link>serviceServlet</servlet-link> </service-impl-bean> </port-component> </webservice-description> </webservices> 
+1
source

Depending on the developer who created the web service, deployment descriptors, such as webservices.xml and weblogic-webservices.xml were added to the application. Descriptors are used to configure, override default settings, and add metadata. For web services, this can be the endpoint, port configuration, binding of the web service to EJB components, etc. When deployed, the location of the Web Services WSDL is displayed in the WebLogic console, and the WSDL can be obtained at run time.

From the trenches 2 | OSB Patch and SOA Suite for PS5

See also:

0
source

All Articles