Web Services in WebLogic

WebLogic supports the following versions of Web Services components:

  • SOAP 1.1

  • WSDL 1.1

  • UDDI 2.0

In addition to these basic technology components of Web Services, WebLogic Server also supports the Java API for XML-based RPC a simpler way to develop Web Services applications.

Now, you will see what WebLogic Server 7.0 provides for each of these Web Services components.

WebLogic Server 7.0 and SOAP 1.1

The WebLogic Server 7.0 includes its own implementation of the SOAP 1.1 specifications and SOAP With Attachments specifications.

The SOAP messages follow the normal SOAP message structure defined earlier. Also, SOAP messages contain a set of encoding rules to define application-specific data types and represent remote procedure calls and responses. All this information is packaged in a MIME (Multipurpose Internet Mail Exchange a specification for formatting non-ASCII characters of a message to be sent over the Internet) encoded package and sent using the HTTP protocol.

The following is a code snippet for a SOAP request using the WebLogic Server. Consider the restaurant example that you worked on in the second week. Suppose that a new chef has been hired and has no idea how to make a Delhi Kebab. To request the recipe from a business offering such a service, you would send a request wrapped in an HTTP request of the following kind:

 POST /StockQuote HTTP/1.1  Host: www.samsrestaurant.com Content-Type: text/xml; charset="utf-8" Content-Length: nnnn SOAPAction: "Some-URI" <SOAP-ENV:Envelope    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"          SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">      <SOAP-ENV:Body>           <m:GetDelhiKebabRecipe xmlns:m="Some-URI">                <symbol>BEAS</symbol>           </m: GetDelhiKebabRecipe>      </SOAP-ENV:Body> </SOAP-ENV:Envelope> 

WebLogic Server 7.0 and WSDL 1.1

The WebLogic Server automatically creates the WSDL document when you develop your Web Services-based application on WebLogic Server 7.0. This WSDL document follows the same format that was described previously, that is, a WSDL document created by the WebLogic server contains the message, portType, binding, and service tags.

For the previous example about the SOAP message, the following is the code created by the WebLogic Server (assume the Web Service name used for this operation is ExoticDishesRecipeService):

 <?xml version="1.0"?>    <definitions name="ExoticDishesRecipe"             targetNamespace="http://samsrestaurant.com/exoticdishesrecipe.wsdl"                xmlns:tns="http://samsrestaurant.com/exoticdishesrecipe.wsdl"                xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"                xmlns:xsd1="http://samsrestaurant.com/exoticdishesrecipe.xsd"                xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"                xmlns="http://schemas.xmlsoap.org/wsdl/">       <message name="GetRecipeInput">           <part name="symbol" element="xsd:string"/>       </message>       <message name="GetRecipeOutput">           <part name="result" type="xsd:float"/>       </message>       <portType name="ExoticDishesRecipePortType">           <operation name="GetDelhiKebabsRecipe">              <input message="tns:GetRecipeInput"/>              <output message="tns:GetRecipeOutput"/>           </operation>       </portType>       <binding name="ExoticDishesRecipeBinding"               type="tns:ExoticDishesRecipePortType">           <soap:binding style="rpc"                         transport="http://schemas.xmlsoap.org/soap/http"/>           <operation name="GetDelhiKebabsRecipe">              <soap:operation soapAction=                      "http://samsrestaurant.com/GetDelhiKababsRecipe"/>              <input>                  <soap:body use="encoded" namespace=                          "http://samsrestaurant.com/exoticdishesrecipe"                            encodingStyle=                                    "http://schemas.xmlsoap.org/soap/encoding/"/>              </input>              <output>              <soap:body use="encoded" namespace=                      "http://samsrestaurant.com/exoticdishesrecipe"                            encodingStyle=                                    "http://schemas.xmlsoap.org/soap/encoding/"/>              </output>           </operation>>       </binding>       <service name="ExoticDishesRecipe">           <documentation>Delhi kababs recipe</documentation>           <port name="ExoticDishesRecipePort" binding=                   "tns:ExoticDishesRecipeBinding">              <soap:address location=                      "http://samsrestaurant.com/exoticdishesrecipe"/>           </port>       </service> <definitions> 

WebLogic Server 7.0 and UDDI 2.0

WebLogic Server follows the UDDI 2.0 specifications to describe, register, and discover Web Services.



Sams Teach Yourself BEA WebLogic Server 7. 0 in 21 Days
Sams Teach Yourself BEA WebLogic Server 7.0 in 21 Days
ISBN: 0672324334
EAN: 2147483647
Year: 2002
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net