SimpleMap.jws Sample
A sample showing simple use of a @jws:parameter-xml XML map to convert XML input to Java objects. Uses curly brace "{}" notation as implicit <xm:value> tags.
XML maps
This sample is located in the xmlmap folder of the samples WebLogic Workshop project. In the file system the location is:
BEA_HOME\weblogic700\samples\workshop\applications\samples\xmlmap\SimpleMap.jws
To run this web service:
Start WebLogic Server in the appropriate domain.
On Microsoft Windows systems, from the Start menu navigate to:
BEA WebLogic Platform 7.0->WebLogic Workshop->WebLogic Workshop Examples->Start Examples Server.
On Linux or Solaris systems, run:
BEA_HOME/weblogic700/samples/workshop/startWebLogic.sh
Launch the service either by opening it in WebLogic Workshop and selecting the Start operation or by entering http://localhost:7001/samples/xmlmap/SimpleMap.jws in the address bar of your browser. If WebLogic Server is running in the appropriate domain on this machine, you may click here to run the sample.
Navigate to the Test Form tab of Test View, if necessary.
The single method of the web service, acceptPerson, specifies an XML map for incoming data. The Test Form displays a map conforming to the expected schema.
Enter values for each of the XML tag values that start with Value_ (replace the entire text string with a new value).
Invoke the acceptPerson method.
acceptPerson extracts the data from the XML map into Java parameters to the method, formats a response string, then returns a single floating point value.
Note the use of the Java String class' trim method to remove extra whitespace from values extracted from XML.