Demonstrates the ability to modify a Web Service control's JCX file to change the Java signature of one or more methods while still adhering to the public contract of the called web service. QuoteServiceControl.jcx was originally generated form the QuoteService.jws web service. But one method in QuoteServiceControl.jcx has had a parameter removed and replaced with a hard-coded value in the accompanying XML map. Thus, the outgoing XML message is the same, but the Java signature visible to clients of the Web Service control is simplified.
Use of a Web Service control
Customization of a Web Service control
Declaration and use of a client callback
Use of Conversations
This sample is located in the service folder of the WebServices project in the SamplesApp sample application. In the file system the location is:
BEA_HOME\weblogic81\samples\workshop\SamplesApp\WebServices\service\QuoteClient.jws
To Run the Sample
BEA_HOME/weblogic81/samples/domains/workshop/startWebLogic.sh
Running this sample isn't the interesting aspect of it. If you examine QuoteService.jws, you will see that its getQuote method expects two parameters. But QuoteClient is calling the method with a single parameter. This is accomplished via an XML map on the QuoteServiceControl Web Service control.
QuoteServiceControl.jcx was originally generated from QuoteService.jws. It was then modified: the first parameter of getQuote was removed from the Java signature, meaning callers are no longer expected to pass it. An XML map was then added to getQuote, with the value of the <customerID> element hard-coded. This leaves the message shape as QuoteService expects it, with two parameters. The calling service passes one parameter, which the Web Service control combines with the hard-coded parameter to produce the two-parameter message the target service expects.
Using WebLogic Built-In Controls
Defining Java to XML Translation with XML Maps
Designing Conversational Web Services