Weblogic - Creating a Web Service from a WSDL File

Card Puncher Data Processing


Creating a Web Service from an existing WSDL File, often referred to as the golden WSDL.

Based on this WSDL file to be able to deploy the web service, you generate with the help of an wsdlc Ant task the following artifacts:

  • JWS service endpoint interface (SEI) that implements the Web service described by the WSDL file.
  • JWS implementation file that contains a partial (stubbed-out) implementation of the generated JWS SEI. This file must be customized by the developer.
  • JAXB data binding artifacts.
  • Optional Javadocs for the generated JWS SEI.


  • you run the wsdlc Ant task one time to generate a JAR file that contains the generated JWS SEI file and data binding artifacts,
  • then code the generated JWS file that implements the interface, adding the business logic of your Web service to the methods that implement the Web service operations and add additional JWS annotations if needed

After you have coded the JWS implementation file, you run the jwsc Ant task to generate the deployable Web service, using the same steps as described in the preceding sections. The only difference is that you use the compiledWsdl attribute to specify the JAR file (containing the JWS SEI file and data binding artifacts) generated by the wsdlc Ant task.

Sample WSDL File

<?xml version="1.0"?>
   xmlns="http://schemas.xmlsoap.org/wsdl/" >
        <message name="getTempRequest">
                <part name="zip" type="xsd:string"/>
        <message name="getTempResponse">
                <part name="return" type="xsd:float"/>
        <portType name="TemperaturePortType">
                <operation name="getTemp">
                        <input message="tns:getTempRequest"/>
                        <output message="tns:getTempResponse"/>
        <binding name="TemperatureBinding" type="tns:TemperaturePortType">
                <soap:binding style="document" 
                <operation name="getTemp">
                        <soap:operation soapAction=""/>
                                <soap:body use="literal"
                                 namespace="urn:xmethods-Temperature" />
                                <soap:body use="literal"
                                 namespace="urn:xmethods-Temperature" />
        <service name="TemperatureService">
                Returns current temperature in a given U.S. zipcode
            <port name="TemperaturePort" binding="tns:TemperatureBinding">

Documentation / Reference

Creating a Web Service from a WSDL File

Share this page:
Follow us:
Task Runner