Sample WSDL File Sample TemperaturePortType Java Implementation File
2-14 Getting Started With JAX-WS Web Services for Oracle WebLogic Server
– The type attribute of the jws element specifies the type of Web services
JAX-WS or JAX-RPC.
– The WLHttpTransport child element of the jws element of the jwsc
Ant task specifies the context path and service URI sections of the URL used to invoke the Web service over the HTTPS transport, as well as the name of the
port in the generated WSDL.
10.
Execute the build-service target to generate a deployable Web service: prompt ant build-service
You can re-run this target if you want to update and then re-build the JWS file.
11.
Start the WebLogic Server instance to which the Web service will be deployed.
12.
Deploy the Web service, packaged in an Enterprise Application, to WebLogic Server, using either the Administration Console or the wldeploy Ant task. In
either case, you deploy the wsdlcEar Enterprise application, located in the output
directory. To use the wldeploy Ant task, add the following target to the build.xml file:
taskdef name=wldeploy classname=weblogic.ant.taskdefs.management.WLDeploy
target name=deploy wldeploy action=deploy name=wsdlcEar
source=outputwsdlcEar user={wls.username} password={wls.password} verbose=true
adminurl=t3:{wls.hostname}:{wls.port} targets={wls.server.name}
target
Substitute the values for wls.username, wls.password, wls.hostname, wls.port
, and wls.server.name that correspond to your WebLogic Server instance.
Deploy the WAR file by executing the deploy target: prompt ant deploy
13.
Test that the Web service is deployed correctly by invoking its WSDL in your browser:
http:host:porttempTemperatureService?WSDL The context path and service URI section of the preceding URL are specified by the
original golden WSDL. Use the hostname and port relevant to your WebLogic Server instance. Note that the deployed and original WSDL files are the same,
except for the host and port of the endpoint address.
You can use the clean, build-service, undeploy, and deploy targets in the build.xml
file to iteratively update, rebuild, undeploy, and redeploy the Web service as part of your development process.
To run the Web service, you need to create a client that invokes it. See Section 2.4,
Invoking a Web Service from a Java SE Application for an example of creating a Java
client application that invokes a Web service.