WebLogic Web Service Deployment Descriptor Elements

The following sections describe the web-services.xml file using different formats:

 


Overview of web-services.xml

The web-services.xml deployment descriptor file contains information that describes one or more WebLogic Web Services. This information includes details about the back-end components that implement the operations of a Web Service, the non-built-in data types used as parameters and return values, the SOAP message handlers that intercept SOAP messages, and so on. As is true for all deployment descriptors, web-services.xml is an XML file.

 


Graphical Representation

The following graphic describes the web-services.xml element hierarchy.

Figure 22-1 web-services.xml Element Hierarchy




 


Element Reference

The following sections, arranged alphabetically, describe each element in the web-services.xml file.

See Examining Different Types of web-services.xml Files for sample Web Services deployment descriptor files for a variety of different types of WebLogic Web Services.

 

clock-precision

Describes the accuracy of synchronization between the clock of a client application invoking a WebLogic Web Service and WebLogic Server's clock. WebLogic Server uses this value to account for a reasonable level of clock skew between two clocks.

The value is expressed in milliseconds. This means, for example, that if the clocks are accurate within a one minute of each other, the value of this element is 60000.

If the value of this element is greater than the expiration period of an incoming SOAP request, WebLogic Server rejects the request because it cannot accurately enforce the expiration. For example, if the clock precision value is 60000 milliseconds, and WebLogic Server receives a SOAP request that expires 30000 milliseconds after its creation time, it is possible that the message has lived for longer than 30000 seconds, due to the 60000 millisecond clock precision discrepancy, so WebLogic Server has no option but to reject the message. You can relax this strict enforcement by setting the <enforce-precision> element to false. For details, see enforce-precision.

This element must be specified in conjunction with <clocks-synchronized>.

The default value for this element is 60000.

This element does not have any attributes. This element is a child element of <timestamp>.

 

clocks-synchronized

Specifies whether WebLogic Server assumes that the clocks of the client application invoking a WebLogic Web Service and WebLogic Server are synchronized when dealing with timestamps in SOAP messages.

If the value of this element is true, WebLogic Server enforces, if it exists, the time expiration of the SOAP request from a client application that is invoking a WebLogic Web Service. This means that if the time stamp has expired, WebLogic Server does not invoke the Web Service operation. If the value of this element is false, WebLogic Server rejects all SOAP requests that contain a time expiration.

Valid values for this element are true and false. The default value is false.

This element does not have any attributes. This element is a child element of <timestamp>.

 

components

Defines the back-end components that implement the Web Service.

A WebLogic Web Service can be implemented using one or more of the following components:

This element has no attributes.

 

ejb-link

Identifies which EJB in an EJB JAR file is used to implement the stateless session EJB back-end component.

Attribute

Description

Datatype

Required?

path Name of the EJB in the form of:jar-name#ejb-namejar-name refers to the name of the JAR file, contained within the Web Service EAR file, that contains the stateless session EJB. The name should include pathnames relative to the top level of the EAR file.ejb-name refers to the name of the stateless session EJB, corresponding to the <ejb-name> element in the ejb-jar.xml deployment descriptor file in the EJB JAR file.Example: myapp.jar#StockQuoteBean String Yes

 

encryptionKey

Specifies the name and password of a key pair and certificate used when encrypting elements of the SOAP message. Specify the name using the <name> subelement; specify the password with the <password> subelement.

Note: Create the key and certificate pair in the WebLogic Server keystore with the Administration Console. For details, see Storing Private Keys, Digital Certificates, and Trusted CAs.

This element does not have any attributes.

 

enforce-precision

Specifies whether to enforce the clock precision time period.

If this element is set to false, WebLogic Server does not reject SOAP requests whose time expiration period is smaller than the clock precision time, specified with the <clock-precision> element. By default, WebLogic Server rejects these SOAP requests because it cannot accurately determine whether the message has expired, due to the discrepancy in clock precision between the client application and WebLogic Server.

Valid values for this element are true and false. The default value is true.

This element does not have any attributes. This element is a child element of <timestamp>.

 

fault

Specifies the SOAP fault that should be thrown if there is an error invoking this operation.

This element is not required.

Attribute

Description

Datatype

Required?

class-name Fully qualified Java class that implements the SOAP fault. String Yes
name Name of the fault. String Yes

 

generate-signature-timestamp

Specifies whether WebLogic Server includes a timestamp in the SOAP response to a client application that has invoked a WebLogic Web Service operation.

Valid values for this element are true and false. The default value is true.

This element does not have any attributes. This element is a child element of <timestamp>.

 

handler

Describes a SOAP message handler in a handler chain. A single handler chain can consist of one or more handlers.

If the Java class that implements the handler expects initialization parameters, specify them using the optional <init-params> child element of the <handler> element.

Attribute

Description

Datatype

Required?

class-name Fully qualified Java class that implements the SOAP message handler. String Yes

 

handler-chain

Lists the SOAP message handlers that make up a particular handler chain. A single WebLogic Web Service can define zero or more handler chains.

The order in which the handlers (defined by the <handler> child element) are listed is important. By default, the handleRequest() methods of the handlers execute in the order that they are listed as child elements of the <handler-chain> element. The handleResponse() methods of the handlers execute in the reverse order that they are listed.

Attribute

Description

Datatype

Required?

name Name of this handler chain. String Yes

 

handler-chains

Contains a list of <handler-chain> elements that describe the SOAP message handler chains used in the Web Service described by this web-services.xml file. A single WebLogic Web Service can define zero or more handler chains.

This element does not have any attributes.

 

inbound-expiry

Specifies, in milliseconds, WebLogic Server's expiration period for a SOAP request from a client application invoking a Web Service. WebLogic Server adds the value of this element to the creation date in the time stamp of the SOAP request, accounts for clock precision, then compares the result to the current time. If the result is greater than the current time, WebLogic Server rejects the invoke.

In addition to its own expiration period for SOAP requests, WebLogic Server also honors expirations in the SOAP request message itself, specified by the client application.

To specify no expiration, set this element to -1.

The default value of this element is -1.

If you set this element to a value, be sure you also specify that the clocks between WebLogic Server and client applications are synchronized by setting the <clocks-synchronized> element to true.

 

init-param

Specifies a name-value pair that represents one of the initialization parameters of a handler.

Attribute

Description

Datatype

Required?

name Name of the parameter. String Yes
value Value of the parameter. String Yes

 

init-params

Contains the list of initialization parameters that are passed to the Java class that implements a handler.

This element does not have any attributes.

 

java-class

Describes the Java class component that implements one or more operations of a Web Service.

Attribute

Description

Datatype

Required

class-name Fully qualified name of the Java class that implements this component. String Yes
name Name of this component. String Yes

 

jms-receive-queue

Specifies that one of the operations in the Web Service is mapped to a JMS queue. Use this element to describe a Web Service operation that receives data from a JMS queue.

Typically, a message producer puts a message on the specified JMS queue, and a client invoking this Web Service operation polls and receives the message.

Attribute

Description

Datatype

Required?

connection-factory JNDI name of the JMS Connection factory that WebLogic Server uses to create a JMS Connection object. String Yes
initial-context-factory Context factory for a non-WebLogic Server JMS implementation. String No
name Name of this component. String Yes
provider-url URL used to connect to a non-WebLogic Server JMS implementation. String No

 

jms-send-destination

Specifies that one of the operations in the Web Service is mapped to a JMS queue. Use this element to describe a Web Service operation that sends data to the JMS queue.

Typically, a message consumer (such as a message-driven bean) consumes the message after it is sent to the JMS destination.

Attribute

Description

Datatype

Required?

connection-factory JNDI name of the JMS Connection factory that WebLogic Server uses to create a JMS Connection object. String Yes
initial-context-factory Context factory for a non-WebLogic Server JMS implementation. String No
name Name of this component. String Yes
provider-url URL used to connect to a non-WebLogic Server JMS implementation. String No

 

jndi-name

Specifies a reference to an object bound into a JNDI tree. The reference can be to a stateless session EJB or to a JMS destination.

Attribute

Description

Datatype

Required?

path Path name to the object from the JNDI context root. String Yes

 

name

Depending on the parent element, the <name> element specifies:

  • The username used in the username token in the SOAP response message. (Parent element is <user>.)
  • The name of the key pair and certificate, stored in WebLogic Server's keystore, used to encrypt part of the SOAP message. (Parent element is <encryptionKey>.)
  • The name of the key pair and certificate, stored in WebLogic Server's keystore, used to digitally sign part of the SOAP message. (Parent element is <signatureKey>.)

This element does not have any attributes.

 

operation

Configures a single operation of a Web Service. Depending on the value and combination of attributes for this element, you can configure the following types of operations:

  • An invoke of a method of a stateless session EJB or Java class. Specify this type of operation by setting the component attribute to the name of the stateless session EJB or Java class component and the method attribute to the name of the method.
  • An invoke of a JMS back-end component. Specify this type of operation by setting the component attribute to the name of the JMS component.
  • The sequential invoke of the SOAP message handlers on a handler chain together with the invoke of a back-end component. Specify this type of operation by setting the component attribute to the name of the component, and the handler-chain attribute to the name of the handler chain you want to invoke.
  • The sequential invoke of the SOAP message handlers on a handler chain, but with no back-end component. Specify this type of operation by just setting the handler-chain attribute to the name of the handler chain you want to invoke and not setting the component and method attributes.

Use the <params> child element to explicitly specify the parameters and return values of the operation.

Attribute

Description

Datatype

Required?

component Name of the component that implements this operation. The value of this attribute corresponds to the name attribute of the appropriate <component> element. String No
handler-chain Name of the SOAP message handler chain that implements the operation. If you specify this attribute along with the component and method attributes, then the operation is implement with both the method and the handler chain. If, however, you do not specify the component and method attributes, but rather specify handler-chain on its own, then the operation is implemented with just a SOAP message handler chain.The value of this attribute corresponds to the name attribute of the appropriate <handler-chain> element. String No
in-security-spec Specifies the name of the security specification that describes the message-level security of the client application's SOAP request when it invokes the operation. The security specification describes what part of the SOAP request should be encrypted or digitally signed. If you do not specify this attribute, the default security specification, if it exists, is applied to the SOAP request. If there is no default security specification, then no message-level security is applied to the SOAP request.The value of this attribute corresponds to the Id attribute of the appropriate <spec:SecuritySpec> element. String No.
invocation-style Specifies whether the operation both receives a SOAP request and sends a SOAP response, or whether the operation only receives a SOAP request but does not send back a SOAP response. This attribute accepts only two values: request-response (default value) or one-way.

Note: If the back-end component that implements this operation is a method of a stateless session EJB or Java class and you set this attribute to one-way, the method must return void.

String No
method Name of the method of the EJB or Java class that implements the operation if you specify with the component attribute that the operation is implemented with a stateless session EJB or Java class.You can specify all the methods with the asterisk (*) character.If your EJB or Java class does not overload the method, you need only specify the name of the method, such as:
method="sell"
If, however, the EJB or Java class overloads the method, then specify the full signature, such as:
method="sell(int)"
String No
name Name of the operation that will be used in the generated WSDL.If you do not specify this attribute, the name of the operation defaults to either the name of the method or the name of the SOAP message handler chain. String No
out-security-spec Specifies the name of the security specification that describes the message-level security of WebLogic Server's SOAP response after a client application has invoked the operation. The security specification describes what part of the SOAP response should be encrypted or digitally signed. If you do not specify this attribute, the default security specification, if it exists, is applied to the SOAP response. If there is no default security specification, then no message-level security is applied to the SOAP response.The value of this attribute corresponds to the Id attribute of the appropriate <spec:SecuritySpec> element. String No.
portTypeName Port type in the WSDL file to which this operation belongs. You can include this operation in multiple port types by specifying a comma-separated list of port types. When the WSDL for this Web Service is generated, a separate <portType> element is created for each specified port type.The default value is the value of the portType attribute of the <web-service> element. String No

 

operations

The <operations> element groups together the explicitly declared operations of this Web Service.

This element does not have any attributes.

 

outbound-expiry

Specifies, in milliseconds, the expiration period that WebLogic Server adds to the timestamp header of the SOAP response.

To specify no expiration, set this element to -1.

The default value of this element is -1.

 

param

The <param> element specifies a single parameter of an operation.

You must list the parameters in the same order in which they are defined in the method that implements the operation. The number of <param> elements must match the number of parameters of the method.

Attribute

Description

Datatype

Required?

class-name Java class name of the Java representation of the data type of the parameter.If you do not specify this attribute, WebLogic Server introspects the back-end component that implements the operation for the Java class of the parameter.You are required to specify this attribute only if you want the mapping between the XML and Java representations of the parameter to be different than the default. For example, xsd:int maps to the Java primitive int type by default, so use this attribute to map it to java.lang.Integer instead. NMTOKEN Maybe. See the description of the attribute.
location Part of the request SOAP message (either the header, the body, or the attachment) that contains the value of the input parameter.Valid values for this attribute are Body, Header, or attachment. The default value is Body.If you specify Body, the value of the parameter is extracted from the SOAP Body, according to regular SOAP rules for RPC operation invocation. If you specify Header, the value is extracted from a SOAP Header element whose name is the value of the type attribute.If you specify attachment, the value of the parameter is extracted from the SOAP Attachment rather than the SOAP envelope. As specified by the JAX-RPC specification, only the following Java data types can be extracted from the SOAP Attachment:

  • java.awt.Image

  • java.lang.String

  • javax.mail.internet.MimeMultiport

  • javax.xml.transform.Source

String No.
name Name of the input parameter that will be used in the generated WSDL.The default value is the name of the parameter in the method's signature. String No.
style Style of the input parameter, either a standard input parameter, an out parameter used as a return value, or an in-out parameter for both inputting and outputting values.Valid values for this attribute are in, out, and in-out.If you specify a parameter as out or in-out, the Java class of the parameter in the back-end component's method must implement the javax.xml.rpc.holders.Holder interface. String Yes.
type XML Schema data type of the parameter. NMTOKEN Yes.

 

params

The <params> element groups together the explicitly declared parameters and return values of an operation.

You do not have to explicitly list the parameters or return values of an operation. If an <operation> element does not have a <params> child element, WebLogic Server introspects the back-end component that implements the operation to determine its parameters and return values. When generating the WSDL file of the Web Service, WebLogic Server uses the names of the corresponding method's parameters and return value.

You explicitly list an operation's parameters and return values when you want:

  • The name of the parameters and return values in the generated WSDL to be different from those of the method that implements the operation.
  • To map a parameter to a name in the SOAP header request or response.
  • To use out or in-out parameters.

Use the <param> child element to specify the parameters of the operation.

Use the <return-param> child element to specify the return value of the operation.

The <params> element does not have any attributes.

 

password

Depending on the parent element, the <password> element specifies:

  • The password used in the username token in the SOAP response message. (Parent element is <user>.)
  • The password of the key pair and certificate, stored in WebLogic Server's keystore, used to encrypt part of the SOAP message. (Parent element is <encryptionKey>.)
  • The password of the key pair and certificate, stored in WebLogic Server's keystore, used to digitally sign part of the SOAP message. (Parent element is <signatureKey>.)

This element does not have any attributes.

 

reliable-delivery

The <reliable-delivery> element specifies that the operation can be invoked asynchronously using reliable SOAP messaging. This means that the application that invokes the Web Service has a guaranteed that the SOAP message was delivered to the Web Service operation, or it receives an explicit exception saying that the delivery did not happen.

You can specify only one <reliable-delivery> element for a given operation.

Attribute

Description

Datatype

Required?

duplicate-elimination Specifies whether the WebLogic Web Service should ignore duplicate invokes from the same client application. If this attribute is set to True, the Web Service persists the message IDs from client applications that invoke the Web Service so that it can eliminate any duplicate invokes. If this values is set to False, the Web Service does not keep track of duplicate invokes, which means that if a client retries an invoke, both invokes could return values.Valid values for this attribute are True and False. The default value is True. Boolean No.
persist-duration The default minimum number of seconds that the Web Service should persist the history of a reliable SOAP message (received from the sender that invoked the Web Service) in its storage. The Web Service, after recovering from a WebLogic Server crash, does not dispatch persisted messages that have expired.The value of this attribute, if you set it, should be greater than the product of the retry interval and the retry count of the sender.The default value of this attribute is 60,000. Integer No.

 

require-signature-timestamp

Specifies whether WebLogic Server requires that the SOAP request from a client application that invokes a WebLogic Server include a timestamp. If this element is set to true, and a SOAP request does not contain a timestamp, WebLogic Server rejects the request.

Valid values for this element are true and false. The default value is true.

This element does not have any attributes. This element is a child element of <timestamp>.

 

return-param

The <return-param> element specifies the return value of the Web Service operation.

You can specify only one <return-param> element for a given operation.

Attribute

Description

Datatype

Required?

class-name Java class name of the Java representation of the data type of the return parameter.If you do not specify this attribute, WebLogic Server introspects the back-end component that implements the operation for the Java class of the return parameter.You are required to specify this attribute if:

  • The back-end component that implements the operation is <jms-receive-queue>.

  • The mapping between the XML and Java representations of the return parameter is ambiguous, such as mapping xsd:int to either the int Java primitive type or java.lang.Integer.
NMTOKEN Maybe. See the description of the attribute.
location Part of the response SOAP message (either the header, the body, or the attachment) that contains the value of the return parameter. Valid values for this attribute are Body, Header, or attachment. The default value is Body.If you specify Body, the value of the return parameter is added to the SOAP Body. If you specify Header, the value is added as a SOAP Header element whose name is the value of the type attribute.If you specify attachment, the value of the parameter is added to the SOAP Attachment rather than the SOAP envelope. As specified by the JAX-RPC specification, only the following Java data types can be added to the SOAP Attachment:

  • java.awt.Image

  • java.lang.String

  • javax.mail.internet.MimeMultiport

  • javax.xml.transform.Source

String No.
name Name of the return parameter that will be used in the generated WSDL file.If you do not specify this attribute, the return parameter is called result. String No.
type XML Schema data type of the return parameter. NMTOKEN Yes.

 

security

Element that contains all the security configuration information about a particular Web Service. This information includes:

  • The username and password used in the SOAP response username token (<user> child element).
  • The name of the key pairs in WebLogic Server's keystore used for data encryption and digital signatures (<encryptionKey> and <signatureKey> child elements).
  • What parts of the SOAP message should be encrypted and digitally signed (<spec:SecuritySpec> child element).

Attribute

Description

Datatype

Required?

Name The name of this security element. String Yes.

 

signatureKey

Specifies the name and password of a key pair and certificate used when digitally signing elements of the SOAP message. Specify the name using the <name> subelement; specify the password with the <password> subelement.

Note: Create the key pair and certificate in the WebLogic Server keystore with the Administration Console. For details, see Storing Private Keys, Digital Certificates, and Trusted CAs.

This element does not have any attributes.

 

spec:BinarySecurityTokenSpec

Specifies the (binary) non-XML-based security tokens included in the SOAP messages.

Note: You must include the following namespace declaration with this element:

xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext"

and the value of each attribute of this element should be qualified with the wsse namespace.

Attribute

Description

Datatype

Required?

EncodingType Specifies the encoding format of the binary data.Only one valid value: wsse:Base64Binary String Yes
ValueType Specifies the value type and space of the encoded binary data. Only one valid value: wsse:X509v3 (for X.509 certificates) String Yes

 

spec:ElementIdentifier

Identifies a particular element in the SOAP message (either the header or the body) that you want to digitally sign or encrypt. You uniquely identify an element in the SOAP message by its local name and its namespace.

Specify this element as the child of either <spec:SignatureSpec> or <spec:EncryptionSpec>.

Attribute

Description

Datatype

Required?

LocalPart The local name of the element. Do not specify the namespace with this attribute. String Yes.
Namespace The namespace in which the element is defined. String Yes.
Restriction Specifies whether to restrict the identification of the element to the SOAP header or body. Valid values are header or body. If this attribute is not specified, the entire SOAP message is searched when identifying the element.

Note: If you specify a value for this optional attribute, only the top-level elements in the relevant SOAP message part (header or body) are searched. If you do not specify this attribute, then all elements, no matter how deeply nested, are searched.

String No.

 

spec:EncryptionSpec

Specifies the elements in the SOAP message that are encrypted and how they are encrypted.

You can specify that the entire SOAP body be encrypted by setting the attribute EncryptBody="True". You can also use the <spec:ElementIdentifier> child element to specify particular elements of the SOAP message that are to be encrypted.

Warning: Do not specify both EncryptBody="True" and one or more elements with the <spec:ElementIdentifier> child element, but rather, use just one way to specify the elements of the SOAP message that should be encrypted.

Use the EncryptionMethod attribute to specify how to encrypt the SOAP message elements.

Attribute

Description

Data type

Required?

EncryptBody Specifies whether to encrypt the entire SOAP body.

Note: Do not specify both EncryptBody="True" and one or more elements with the <spec:ElementIdentifier> child element, but rather, use just one way to specify the elements of the SOAP message that should be encrypted.Valid values are True and False.

String Yes.
EncryptionMethod Specifies the algorithm used to encrypt the specified elements of the SOAP message.Valid values are:http://www.w3.org/2001/04/xmlenc#tripledes-cbc
http://www.w3.org/2001/04/xmlenc#kw-tripledes

Default value is http://www.w3.org/2001/04/xmlenc#tripledes-cbc.

String No.
KeyWrappingMethod Specifies the algorithm used to encrypt the message encryption key.Valid values are: http://www.w3.org/2001/04/xmlenc#rsa-1_5 (to specify the REQUIRED RSA-v1.5 algorithm)http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p (to specify the REQUIRED RSA-OAEP algorithm)When using this attribute, set the value to the URI, such as:KeyWrappingMethod="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"Default value is http://www.w3.org/2001/04/xmlenc#rsa-1_5. String No.

 

spec:SecuritySpec

Specifies the set of security-related information associated with this Web Service.

The information in this element can include:

  • A security token that specifies the username and password of the client invoking the Web Service. (<spec:UsernameTokenSpec> child element)
  • A binary security token that specify non-XML-based security tokens, such as X.509 certificates. (<spec:BinarySecurityTokenSpec> child element)
  • A specification for the parts of the SOAP message that are digitally signed. (<spec:SignatureSpec> child element)
  • A specification of the parts of the SOAP message that are encrypted. (<spec:EncryptionSpec> child element.)

The information in the <spec:SecuritySpec> element appears in the generated WSDL of the Web Service so that client applications that invoke the Web Service know how to create the SOAP request to comply with all the security specifications.

WebLogic Server also uses the information in this element to verify that a SOAP request to invoke a particular Web Service contains all the necessary security information in the header. For example, if the <spec:SecuritySpec> element requires that a portion of the SOAP message be digitally signed, then WebLogic Server knows to check for this when it receives the SOAP request. WebLogic Server then uses the same information to create the security information in the SOAP response message.

You can create many security specifications for a single Web Service, and specify that different operations use different security specifications. For example, you can configure one operation so that the SOAP messages (both request and response) are only digitally signed, and configure a different operation such that only the SOAP request is both digitally signed and encrypted. You do this by associating operations with different security specifications.

Note: You must include the following namespace declaration with this element:

xmlns:spec="http://www.openuri.org/2002/11/wsse/spec"

and all child elements of the <spec:SecuritySpec> element must be qualified with the spec namespace.

Attribute

Description

Datatype

Required?

Id Name used to identity this security specification. This id can be later associated with an operation.If you do not specify this attribute, this security specification becomes the default for the Web Service. This means that operations that do not explicitly associate with a security specification use this one by default. String No.
Namespace The namespace in which this security specification is defined. String Yes.

 

spec:SignatureSpec

Specifies the elements in the SOAP message that are digitally signed and how they are signed.

Digital signatures are a way to determine whether a message was altered in transit and to verify that a message was really sent by the possessor of a particular security token.

You can specify that the entire SOAP body be digitally signed by setting the attribute SignBody="True". Use the <spec:ElementIdentifier> child element to specify additional particular elements of the SOAP message that are to be signed.

Use the CanonicalizationMethod and SignatureMethod attributes to specify how to digitally sign the SOAP message elements.

Attribute

Description

Data type

Required?

CanonicalizationMethod Specifies the algorithm used to canonicalize the SOAP message elements being signed.Only one valid value:http://www.w3.org/2001/10/xml-exc-cl4n# String Yes.
SignatureMethod Specifies the cryptographic algorithm used to compute the signature.

Note: Be sure that you specify an algorithm that is compatible with the certificates you are using in your enterprise.Valid values are:http://www.w3.org/2000/09/xmldsig#rsa-sha1
http://www.w3.org/2000/09/xmldsig#dsa-sha1

String Yes.
SignBody Specifies whether to digitally sign the entire SOAP body, in addition to the any specific elements identified with the optional <spec:ElementIdentifier> child elements.Valid values are True and False. String Yes.

 

spec:UsernameTokenSpec

Specifies that the SOAP response after an invoke of this Web Service must include a username token.

WebLogic Server uses the information in the <user> child element of the <security> element when creating the security information in a SOAP response message.

Note: You must include the following namespace declaration with this element:

xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext"

and the value of each attribute of this element should be qualified with the wsse namespace.

Attribute

Description

Datatype

Required?

PasswordType Specifies how to include the password in the SOAP message.Only valid value is wsse:PasswordText (actual password for the username.) String Yes.

 

stateless-ejb

Describes the stateless session EJB component that implements one or more operations of a Web Service.

Attribute

Description

Datatype

Required?

name Name of the stateless EJB component.

Note: The name is internal to the web-services.xml file; it does not refer to the name of the EJB in the ejb-jar.xml file.

String Yes.

 

timestamp

The <timestamp> element groups together the elements used to configure timestamp behavior of WebLogic Server. WebLogic Server adds or requires timestamps only in SOAP messages that are encrypted or digitally signed.

If the web-services.xml deployment descriptor does not include a <timestamp> child element of the <security> element, and the Web Service has been configured for message-level security (encryption and digital signatures), WebLogic Server:

  • Requires that SOAP requests include a timestamp and rejects any that do not.
  • Assumes that its clock and the client application's clock are not synchronized. This means that if the SOAP request from a client application includes a timestamp with an expiration, WebLogic Server rejects the message because it cannot ensure that the message has not already expired.

Adds a timestamp to the SOAP response. The timestamp contains only the creation date of the SOAP response.

This element has no attributes. This element has the following child elements:

 

type-mapping

The <type-mapping> element contains the list of mappings between the XML data types defined in the <types> element and their Java representations.

For each data type in the <types> element, there is a corresponding <type-mapping-entry> element that lists the Java class that implements the data type, how to serialize and deserialize the data, and so on.

This element has no attributes.

 

type-mapping-entry

Describes the mapping between a single XML data type in the <types> element and its Java representation.

Attribute

Description

Datatype

Required?

class-name Fully qualified name of the Java class that maps to its corresponding XML data type. String Yes.
deserializer Fully qualified name of the Java class that converts the data from XML to Java. String Only required if the data type is not one of the built-in data dates supported by the WebLogic Web Services runtime, listed in Supported Built-In Data Types.
element Name of the XML data type that maps to the Java data type. Specify only if the XML Schema definition of the data type uses the <element> element. NMTOKEN One, but not both, of either element or type is required.
serializer Fully qualified name of the Java class that converts the data from Java to XML. String Only required if the data type is not one of the built-in data dates supported by the WebLogic Web Services runtime, listed in Supported Built-In Data Types.
type Name of the XML data type that maps to the Java data type. Specify only if the XML Schema definition of the data type uses the <type> element. NMTOKEN One, but not both, of either element or type is required.

 

types

Describes, using XML Schema notation, the non-built-in data types used as parameters or return types of the Web Service operations.

For details on using XML Schema to describe the XML representation of a non-built-in data type, see http://www.w3.org/TR/xmlschema-0/.

The following example shows an XML Schema declaration of a data type called TradeResult that contains two elements: stockSymbol, a string data type, and numberTraded, an integer.

<types>


<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 


            xmlns:stns="java:examples.webservices"


            attributeFormDefault="qualified" 


            elementFormDefault="qualified" 


            targetNamespace="java:examples.webservices">


    <xsd:complexType name="TradeResult">


        <xsd:sequence>


            <xsd:element maxOccurs="1" 


                         name="stockSymbol" 


                         type="xsd:string" minOccurs="1">


            </xsd:element>


            <xsd:element maxOccurs="1" 


                         name="numberTraded" 


                         type="xsd:int" 


                         minOccurs="1">


            </xsd:element>


        </xsd:sequence>


    </xsd:complexType>


</xsd:schema>



</types>

 

user

Specifies the username and password to be used in the SOAP response message.

This element has two child elements:

  • <name>
  • <password>

This element has no attributes.

 

web-service

Defines a single Web Service.

The Web Service is defined by the following:

  • Back-end components that implement an operation, such as a stateless session EJB, a Java class, or a JMS consumer or producer.
  • An optional set of data type declarations for non-built-in data types used as parameters or return values to the Web Service operations.
  • An optional set of XML to Java data type mappings that specify the serialization class and Java classes for the non-built-in data types.
  • A declaration of the operations supported by the Web Service.

Attribute

Description

Datatype

Required?

charset Specifies the character set that the Web Service uses in its response to an invocation. Examples of character sets include US-ASCII, UTF-8, and Shift_JIS.The default value is US-ASCII.

Note: Although US-ASCII is the default value for this attribute, this does not mean that the US-ASCII character set will always be used in the response of a WebLogic Web Service invocation if you have not explicitly set the attribute in the web-service.xml file of the Web Service. See Order of Precedence of Character Set Configuration Used By WebLogic Server for more details.

String No.
exposeHomePage Specifies whether to publicly expose the Home Page of the Web Service. Valid values for this attribute are True and False. The default value is True. This means that by default the Home Page is publicly accessible. Boolean No.
exposeWSDL Specifies whether to publicly expose the automatically generated WSDL of the Web Service. Valid values for this attribute are True and False. The default value is True. This means that by default the WSDL is publicly accessible. Boolean No.
jmsUri Specifies that client applications can use the JMS transport to invoke the Web Service, in addition to the default HTTP/S transport. The form of this attribute is:connection_factory_name/queue_namewhere connection_factory_name is the JNDI name of the JMS connection factory and queue_name is the JNDI name of the JMS queue that you have configured for the JMS transport. For example:jmsURI="JMSTransFactory/JMSTransQueue"If this attribute is set, the generated WSDL of the Web Service contains an additional port that uses a JMS binding. The clientgen Ant task, when generating the stubs used to invoke this Web Service, generates a getServicePortJMS() method, in addition to the default getServicePort() method, used for JMS and HTTP/S respectively. String. No.
name Name of the Web Service. String Yes.
portName Name of the <port> child element of the <service> element of the dynamically generated WSDL of this Web Service.The default value is the name attribute of this element with Port appended. For example, if the name of this Web Service is TraderService, the port name will be TraderServicePort. String No
portTypeName Name of the default <portType> element in the dynamically generated WSDL of this Web Service.The default value is the name attribute of this element with Port appended. For example, if the name of this Web Service is TraderService, the portType name will be TraderServicePort. String No.
protocol Protocol over which the service is invoked. Valid values are http or https. Default is http. String No.
style Specifies whether the Web Service has RPC-oriented or document-oriented operations. RPC-oriented WebLogic Web Service operations use SOAP encoding. Document-oriented WebLogic Web Service operations use literal encoding.The following two values specify document-oriented Web Service operations: document and documentwrapped. If you specify document for this attribute, the resulting Web Service operations take only one parameter. This means that the methods that implement the operations must also have only one parameter. If you specify documentwrapped, the resulting Web Service operations can take any number of parameters, although the parameter values will be wrapped into one complex data type in the SOAP messages. If two or more methods of your stateless session EJB or Java class that implement the Web Service have the same number and data type of parameters, and you want the operations to be document-oriented, specify documentwrapped for this attribute rather than document.Valid values are rpc, documentwrapped, and document. Default value is rpc.

Note: Because the style attribute applies to an entire Web Service, all operations specified in a single <web-service> element must be either RPC-oriented or documented-oriented; WebLogic Server does not support mixing the two styles within the same Web Service.

String No.
targetNamespace Namespace of this Web Service. String Yes.
uri URI of the Web Service, used subsequently in the URL that invokes the Web Service.

Note: Be sure to specify the leading "/", such as /TraderService.

String Yes.
useSOAP12 Specifies whether to use SOAP 1.2 as the message format protocol. By default, WebLogic Web Services use SOAP 1.1.If you specify useSOAP12="True", the generated WSDL of the deployed WebLogic Web Service includes two ports: the standard port that specifies a binding for SOAP 1.1 as the message format protocol, and a second port that uses SOAP 1.2. Client applications, when invoking the Web Service, can use the second port if they want to use SOAP 1.2 as their message format protocol.Valid values for this attribute are True and False. The default value is False. Boolean No.

 

web-services

The root element of the web-services.xml deployment descriptor.

This element does not have any attributes.

Skip navigation bar  Back to Top Previous Next