Integration of SOAP Technology and B2B Application (4)

zhaozj2021-02-17  58

Integration of SOAP Technology and B2B Application (4)

Sample / value in the SOAP message and examples

This article was originally published by the IBM DeveloperWorks China website, its URL is http://www.ibm.com/developerworks/cn/

In the previous article SOAP system and data coding rules, we can understand that SOAP's type and data encoding is based on a simple type system, this simple type system is based on programming language, database, and semi-structured data. The system is a generalization of the public characteristics of the type system in the program language, database, and semi-structural data. In this simple type system, a type is either a simple (quantified) type or a composite type, which consists of multiple parts, each of which is a type (including simple type or composite type). Then, this paper details the type and value of the type and value in detail, respectively, respectively, respectively, and it is desirable to give readers to clearly understand and master by detailed examples.

XML Schema provides a high flexibility and a definition description of the type of a type with good scalability. The SOAP specification mainly uses XML Schema as the definition language of its type mode. Of course, since SOAP is open, flexible, you can use other mode-defined XML Application to develop types and values ​​of specific applications. Description.

Simple type

For simple types, SOAP has all types defined in "XML Schema Part 2: DataTypes", including values ​​and vocabulary spaces. Examples include:

TYPE EXAMPLE INT 58502 FLOAT 314159265358979E 1 NegativeInteger -32768 String Louis "Satchmo" Armstrong

The data type declared in the XML Schema specification can be used directly in element mode. The type of these types can also be used. Below is an example of a pattern fragment and a corresponding type of element data:

45 5.9 -450 Blue

Whether the simple value type is defined in the "XML Schema Part 2: DataTypes" specification, or based on the type definition mechanism provided by the XML Schema specification must be encoded as an element.

If a simple value is encoded as an independent element or a heterogeneity element, this means there is an element declaration corresponding to the data type. Because the "XML Schema Part 2: DataTypes" specification contains type definition, it is not included in the declaration of the corresponding element, and the SOAP-ENC mode and the namespace declare an element for each simple data type. These definitions can be used. 45

String

"String" Data Type is defined in "XML Schema Part 2: DataTypes". It is worth noting that in many databases or programming languages, the "string" type is not consistent. In some special languages, only some characters may appear in "String". (These values ​​may need to represent some data types other than XSD: String)

A string can be encoded as a single reference or multi-reference value.

Elements containing the string value can have a "id" attribute. Additional access identification elements can have the "href" property that matches it.

For example, if there are two access identities to the same String, it can be manifested as:

USD $ 5000

In any case, there is no essential difference between a String (or String Subtyprise Subtyprise), two references to two references to two single reference values:

Hello hello

The mode description for these examples may be:

(In this example, the SOAP-ENC: String type for describing the element type is a way to use, using such a definition to describe the type of element is "XSD: String", and it can come with "ID" and "HREF" attribute. You can see SOAP ENCODING Schema to get the exact definition. Instance mode can also use declarations in these SOAP Encoding mode, but this is not necessary.)

enumerate

The "XML Schema Part 2: DataTypes" specification defines a mechanism called "Rapid Enumeration". The SOAP data model uses this mechanism. However, due to some subtle differences in the definition, there are some subtle differences in the definition, we describe more detailed concepts and describe how to encode one of the values ​​that become a list of Raised lists. Specifically, it encodes the name of this value.

In concept, "Rapu" expressed a group of different names. A concrete rose is a specific list of different values ​​that meet the basic type. For example, a collection of color names ("Green", "BLUE", "brown") can be defined as a rose, value ("1", "3", "5") based on built-in String type, may be one Based on Integer's Rapu, and so on. "XML Schema Part 2: DataTypes" specification supports all simple types of simple types outside Boolean. The "XML Schema Part 2: Structure" specification language can be used to define the type of rose. If a mode is generated from another symbol system without a specific basic type, then "String" is used. In the following mode example, "EyColor" is defined as a String's rising, which may include "Green", "Blue", "brown", while instance data is also given. < ENUMERATION value = "brown" /> jaguar x-type 240000.00 brown

BYTE array

A Byte array can be encoded as a single reference or multi-reference value. The coding rule of the Byte array is similar to string.

Special, elements containing a Byte array value can have a "id" attribute. Additional access identification elements can have a "href" attribute for matching.

Recommended representation of an opaque BYTE array is to use the "Base64" encoding method defined in the XML Schema specification, and the specific encoding algorithm is defined in RFC 2045. However, the data line length of Base64 encoded data in MIME will not exist in SOAP. The "SOAP-ENC: Base64" subtype should be used in SOAP to define Base64 encoding.

AG93IG5VDYBICM73BIBJB3CNCG ==

Polymorphism

Many languages ​​allow access identities to be a polymorphically accessible number of values, each type can be used at runtime. A polymorphic access identification instance must contain a "XSI: Type" property to describe the actual value of the type.

For example, a polymorphic access identifier named "COST" with a value of "XSD: float" can be encoded as:

29.95

The relative to it is a value type unchanged COST access ID.

29.95

The specific representation of the polymorphism will only appear in the example, but the definition of the polymorphism is in the mode, that is, in the mode, any specified type should not be bound.

Compound type

SOAP defines composite types in accordance with the following structural patterns that often see in the program language:

structure

"STRUCT Structure" is a composite type value, and its member's access identification name is the unique flag of mutual distinction, and should be different from each other.

Array

"Array Array" is a composite type value, and its membership position is the unique sign of mutual distinguishes.

References of composite values, structures and values

Members of the composite value are encoded to access identification elements. The access identifier is distinguished by their name (eg, in Struct), and the element name is to access the identification name. The access identity name is part, the scope is included in their type, with an unmodified element name, while others have a complete modifier.

Here is an example of a "book" structure:

Chai xiaolu prefatory text this is a book.

The following is a mode segment describing the structure:

Below is an example of a type containing a simple type member also contains a composite type member. It shows two layers of references. Note that the "HREF" attribute of "Author" access identification element is referenced to the value corresponding to the "ID" value. The situation in "Address" is also similar.

Interop Stack Technology </ title> <author href = # Person-1 "/> </ E: Book> <E: Person ID =" Person-1 "> <name> Chai Xiaolu </ Name> <address href = "# address-2" /> </ E: Person> <E: address id = "address-2"> <email> mailto: fennivel@dealeasy.com </ email> <web > http://fennivel.xmlprobe.com </ Web> </ E: Address></p> <p>The above description is appropriate when "Person" and "Address" is needed. If you use single to describe, it should be embedded, as follows:</p> <p><E: Book> <Title> Interop Stack Technology </ Title> <Author> <name> chai xiaolu </ name> <address> <email> mailto: fennive@dealeasy.com </ email> <web> http: / / fefennivel.xmlprobe.com </ Web> </ address> </ author> </ e: book></p> <p>If there is a limit here: two people are not allowed in a given instance, and the address can be a street-address, or an electronic address (Electronic-Address). A book with two authors can be encoded as: <E: Book> <title> interop stack technology </ title> <firstauthor href = "# Person-1" /> <secondauThor href = "# Person-2" / > </ E: Book> <E: Person ID = "Person-1"> <name> chai xiaolu </ name> <address xsi: type = "m: electronic-address"> <email> mailto: fennivel @ dealeasy .com </ email> <web> http://fennivel.xmlprobe.com </ web> </ address> </ E: Person> <E: Person ID = "Person-2"> <name> fennivel </ Name> <address xsi: type = "n: street-address"> <street> Fennix 2000 </ street> <city> smanghai </ city> <state> smanghai </ state> </ address> </ e: person ></p> <p>The order can also contain some references that are not in the same resource:</p> <p><e: book> <title> paradise lost </ title> <firstauthor href = "http://www.dartmouth.edu/~milton/" /> </ e: book></p> <p>Simultaneously below is a mode description fragment of the above structure:</p> <p><element name = "book" type = "TNS: BOOK" /> <complexType name = "book"> <! - Either the stocking group must occur or else the Href Attribute Must Appear, But Not Both. -> < SEQUENCE Minoccurs = "0" Maxoccurs = "1"> <element name = "title" type = "xsd: string" /> <element name = "firstauthor" type = "tns: person" /> <element name = SECONDAUTHOR "type =" tns: person "/> </ sequence> <attribute name =" href "type =" urireference "/> <attribute name =" id "type =" id "/> <anyttribute namespace =" ## 中er "/> </ complextype> <element name =" Person "Base =" tns: person "/> <complexType name =" Person> <! - Either the following group must occrur or else the href attribute must Appear, But NOT Both. -> <sequence minoccurs = "0" maxoccurs = "1"> <element name = "name" type = "xsd: string" /> <element name = "address" type = "tns: address" / > </ Sequence> <attribute name = "href" type = "urireference" /> <attribute name = "id" type = "id" /> <anyttribute namespace = "## ot" /> </ complexType> <ELEMENT Name = " Address "base =" tns: address "/> <complextype name =" address> <! - Either the fol y href Attribute Must Appear, But not Both. -> <sequence minoccurs =</p> <p>"0" maxoccurs = "1"> <element name = "street" type = "xsd: string" /> <element name = "city" type = "xsd: string" /> <element name = "state" type = "XSD: String" /> </ sequence> <attribute name = "href" type = "urireference" /> <attribute name = "id" type = "id" /> <anyttribute namespace = "## ot" /> </ complexType> array</p> <p>The SOAP array is defined as the type "soap-enc: array" or type originated from "soap-enc: array" [see Rule 8]. An array is expressed as an element value that is not particularly constrained for an element containing its elements (the value of elements generally does not constrain the name).</p> <p>An array can contain any type of element, including a nested array. New types established by SOAP-ENC: Array can also be created and indicated, for example, arrays can be limited to arrays of integers or some user custom rose types.</p> <p>The representation of the array value is an ordered sequence that consists of an elemental sequence of elements. As a value of an array, the element name is not important for distinguishing access identification. Elements can have any name. In fact, the naming of these elements will be determined by the recommendations declared in the mode or by their type. As usual in the composite type, if the value of the entries in the array is single-quoted value, the entry will contain its value. Otherwise, the entry references its value through the "href" attribute.</p> <p>Below is a plurality of segments and an array containing Integer members:</p> <p><element name = "myfavoritenumbers" type = "soap-enc: array" /> <myfavoritenumbers soap-enc: arraytype = "xsd: int [2]> <number> 3 </ number> <number> 4 </ number > </ myfavoritenumbers></p> <p>In this example, "MyFavoritenumber" contains several members, and the type of each member is SOAP-ENC: INT. The type is determined by the soap-enc: arraytype attribute. Note that SOAP-ENC: The type of Array allows uncommon unmodified element names. These names only transmit non-type information, so when they are used, there is an XSI: Type property, either containing its elements to include a SOAP-ENC: ArrayType property. Naturally, the type of SOAP-ENC: Array can declare a local element with type information.</p> <p>As previously pointed, the SOAP-ENC mode contains some of the declarations of the element name, and these names correspond to each of the "XML Schema Part 2: DataTypes" specification. This also includes a statement of "array". Using these definitions, we may be able to reverse the previous description to rewrite as:</p> <p><Soap-enc: array soap-enc: arraytype = "xsd: int [2]> <soap-enc: int> 3 </ soap-enc: int> <soap-enc: int> 4 </ soap-enc : int> </ soap-enc: array> array can contain an instance of a subtype of arbitrating ArrayType. That is, the type of member can be any alternative type described in the ArrayType property, which will be in accordance with the alternative rules represented in the mode. Thus, for example, an integer array may include any value derived from the type of Integer (eg, "int" or any user-defined type). Similarly, a "address" array can contain a strict or extended type, such as "InternationalAddress". Because the SOAP-ENC: Array type allows for any type or type of mixed member, unless there is a particular limit to the ArrayType property.</p> <p>Member Element Type You can use XSI: TYPE in an example, or declare in member element mode, as shown in the following two arrays.</p> <p><Soap-enc: array soap-enc: arraytype = "xSD: UR-TYPE [4]> <Thing XSI: type =" xsd: int "> 12345 </ thing> <think:: type =" xsd: Decimal > 6.789 </ thing> <Thing XSI: Type = "xsd: string"> of manfirst Disobedience, and the fruit of this forbidden Tree, Whose Mortal Tast BROUGHT DEATH INTO THE World, And All Our Woe, </ Thing> <Thing XSI: Type = "xsd: Urireference"> http://fennivel.xmlprobe.com/collection/ </ thing> </ soap-enc: array></p> <p><Soap-enc: array soap-enc: arraytype = "xsd: UR-TYPE [4]> <soap-enc: int> 12345 </ soap-enc: int> <soap-enc: Decimal> 6.789 </ soap -ENC: DECIMAL> <xsd: String> of Mans First Disobedience, And The Fruit of That Forbidden Tree, Whose Mortal Tast Brought Death Into The World, And All Our Woe, </ XSD: String> <soap-enc: Urireference> http://fennivel.xmlprobe.com/collection/ </ soap-enc: urireference> </ soap-enc: array></p> <p>The array value can be a structure or other composite value. For example an array of "xyz: order" structure:</p> <p><Soap-enc: array soap-enc: arraytype = "xyz: ORDER [2]> <Order> <product> Apple </ product> <price> 1.56 </ price> </ order> <order> <product> PEACH </ product> <price> 1.48 </ price> </ order> </ soap-enc: array> arrays can also have some member values ​​to be arrays. Below is an example of an array of two arrays, and that two arrays are String arrays:</p> <p><Soap-enc: array soap-enc: arraytype = "xsd: string [] [2]"> <item href = "# array-1" /> <item href = "# array-2" /> </ soap -Enc: array> <soap-enc: array id = "array-1" soap-enc: arraytype = "xsd: string [2]> <item> R1C1 </ item> <item> R1C2 </ item> < Item> R1C3 </ item> <soap-enc: array> <soap-enc: array id = "array-2" soap-enc: arraytype = "xsd: string [2]> <item> R2C1 </ ITEM > <Item> R2C2 </ item> </ soap-enc: array></p> <p>Elements containing an array value do not need to be named "soap-enc: array". It can have any name, and the type provided is either SOAP-ENC: Array or is restricted by SOAP-ENC: Array. For example, the following is a mode segment and an array of instances with which.</p> <p><SimpleType name = "phoneNumber" base = "string" /> <element name = "ArrayOfPhoneNumbers"> <complexType base = "SOAP-ENC: Array"> <element name = "phoneNumber" type = "tns: phoneNumber" maxOccurs = "unbounded" /> </ complextype> <anyttribute /> </ element></p> <p><xyz: arrayofphonenumbers soap-enc: arraytype = "xyz: phonenumber [2]> <phonenumber> 206-555-1212 </ phonenumber> <phonenumber> 1-888-123-4567 </ phonenumber> </ xyz: arrayofphonumbers ></p> <p>The array can be multi-dimensional. In this case, there will be a number of values ​​that describe dimensional size appear in the Asize section of the ArrayType property. <Soap-enc: array soap-enc: arraytype = "xsd: string [2,3]> <item> R1C1 </ item> <item> R1C2 </ item> <item> R1c3 </ item> <item> R2C1 </ item> <item> R2C2 </ item> <Item> R2C3 </ item> </ soap-enc: array></p> <p>The above example shows how an array is encoded as an independent element, and the array value can appear in a nested manner, if and they are single, it is recommended to appear in nested.</p> <p>Below is an example of a pattern fragment and a telephone number array in accordance with the mode in the "Person" structure, which can be accessed from the access identifier "Phone-NumBers".</p> <p><SimpleType name = "phoneNumber" base = "string" /> <element name = "ArrayOfPhoneNumbers"> <complexType base = "SOAP-ENC: Array"> <element name = "phoneNumber" type = "tns: phoneNumber" maxOccurs = "unbounded" /> </ complexType> <anyattribute /> </ element> <element name = "person"> <complexTyPE> <element name = "name" type = "string" /> <element name = "phonenumbers" TYPE = "TNS: arrayofphonenumbers" /> </ complextype> </ element></p> <p><XYZ: Person> <name> John Hancock </ name> <phonenumbers soap-enc: arraytype = "xyz: phonenumber [2]> <phonenumber> 206-555-1212 </ phonenumber> <phonenumber> 1-888- 123-4567 </ phonenumber> </ phonenumbers> </ xyz: Person></p> <p>Below is another example of a single array value, the array value is encoded as an embedded element, which includes an element name as an access identifier.</p> <p><XYZ: PurchaseOrder> <Customername> Henry Ford </ Customername> <Shipto> <Street> 5th Ave </ street> <city> new York </ city> <state> NY </ state> <zip> 10010 </ zip > </ Shipto> <purchaselineitems soap-enc: arraytype = "Order [2]> <order> <product> apple </ produter <price> 1.56 </ price> </ order> <order> <product> peach </ Produter> <price> 1.48 </ price> </ order> </ purchaselineItems> </ xyz: purchaseorder> section pass array</p> <p>SOAP provides support for partial delivery arrays, which is like "variable long" arrays called in some cases. A partial transfer number should use the "SOAP-ENC: Offset" attribute identifier, which is started with the displacement of the first element. If this property is omitted, the displacement is 0.</p> <p>Below is an array of size 5, while only passing the third and fourth elements at the time of delivery:</p> <p><Soap-enc: array soap-enc: arraytype = "xsd: string [5]" soap-enc: offset = "[2]> <item> the third element </ item> <item> The four Element </ Item> </ soap-enc: array></p> <p>Sparse array</p> <p>SOAP provides support for sparse arrays. Each element represents a member value contains a "soap-enc: position" property to indicate that it is in an array. Below is an example of a sparse array of two-dimensional character array. His size is 4, but only position 2 is used:</p> <p><Soap-enc: array soap-enc: arraytype = "xsd: string [,] [4]"> <soap-enc: array href = "# array-1" soap-enc: position = "[2]" / > </ Soap-enc: array> <soap-enc: array id = "array-1" soap-enc: arraytype = "xsd: string [10,10]> <item soap-enc: position =" [2 , 2]> Third Row, Third Col </ item> <item soap-enc: position = "[7,2]> Eighth Row, third col </ item> </ soap-enc: array></p> <p>If there is only one reference to Array-1 in the above array, the above example can be encoded as:</p> <p><Soap-enc: array soap-enc: arraytype = "xsd: string [,] [4]"> <soap-enc: array soap-enc: position = "[2]" soap-enc: arraytype = "xsd: String [10,10]> <item soap-enc: position = "[2, 2]> third row, third col </ item> <item soap-enc: position =" [7, 2]> Eighth Row , third col </ item> </ soap-enc: array> </ soap-enc: array> 泛泛 rules for composite types</p> <p>The encoding rules referenced above are not limited to those who know the access identity in advance. If the access identification name is only when the appearance of the value is determined during the encoding process, the same rule can also be applied, that is, an access identifier is encoded as the same name, and the access identity either contains either Value. The access identity containing those types that cannot be pre-determined must include a suitable XSI: Type property to give the value of the value.</p> <p>Similarly, by using the coding rule of the reference rule is already sufficient for composite types containing some hybrid access identifiers, these access identifications are distinguished by name, and some are distinguished by name and position (that is, Some access identities will be repeated). This does not necessarily need to include this type of mode, but if a type model mode does not have this type, then a corresponding XML syntax mode and instance should be generated.</p> <p><XYZ: PurchaseOrder> <Customername> Henry Ford </ Customername> <Shipto> <Street> 5th Ave </ street> <city> new York </ city> <state> NY </ state> <zip> 10010 </ zip > </ Shipto> <purchaselineItems> <Order> <product> Apple </ product> <price> 1.56 </ price> </ order> <order> <product> peach </ product> <price> 1.48 </ price> </ Order> </ purchaselineItems> </ xyz: purchaseorder></p> <p>Similarly, order a composite type value is legal, but this is not a SOAP-ENC: Array type or its subtype. E.g:</p> <p><PurchaselineItems> <Order> <Product> Apple </ Product> <price> 1.56 </ price> </ order> <order> <product> peach </ product> <price> 1.48 </ price> </ order> < / PurchaselineItems> Default</p> <p>A access identification element using the omission format means having a default or not knowing its value. This details are based on access identification, methods, and context. For example, an omissive access identification typically represents a NULL value of a polymorphic access identifier (NULL dependent access identification). Similarly, a omissive format Boolean access identifier typically means a FALSE value or a value of unknown, while a numerical access identifier of a omission format typically means that its value is 0 or a value unknown.</p> <p>SOAP root properties</p> <p>The SOAP root property can be used to mark the root of the order, of course, he is not the true root of the object map, so the object map can be desirated. This attribute can give any one of two values ​​of "0" and "1". The real root of an object map generally has a value "1". Those non-real roots can also be labeled as a descending root that is given value "1". An element can also be explicitly labeled as a non-sorted root of the value of "0".</p> <p>SOAP root properties can appear in any child elements in the SOAP header and SOAP body elements, which does not have a default.</p> <p>This attribute is generally used to use a non-nested method (by multi-reference to implement), due to the plurality of forms of the same level, there is a need to identify the true root.</p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-29002.html</div><div class="plugin d-flex justify-content-center mt-3"></div><hr><div class="row"><div class="col-lg-12 text-muted mt-2"><i class="icon-tags mr-2"></i><span class="badge border border-secondary mr-2"><h2 class="h6 mb-0 small"><a class="text-secondary" href="tag-2.html">9cbs</a></h2></span></div></div></div></div><div class="card card-postlist border-white shadow"><div class="card-body"><div class="card-title"><div class="d-flex justify-content-between"><div><b>New Post</b>(<span class="posts">0</span>) </div><div></div></div></div><ul class="postlist list-unstyled"> </ul></div></div><div class="d-none threadlist"><input type="checkbox" name="modtid" value="29002" checked /></div></div></div></div></div><footer class="text-muted small bg-dark py-4 mt-3" id="footer"><div class="container"><div class="row"><div class="col">CopyRight © 2020 All Rights Reserved </div><div class="col text-right">Processed: <b>0.040</b>, SQL: <b>9</b></div></div></div></footer><script src="./lang/en-us/lang.js?2.2.0"></script><script src="view/js/jquery.min.js?2.2.0"></script><script src="view/js/popper.min.js?2.2.0"></script><script src="view/js/bootstrap.min.js?2.2.0"></script><script src="view/js/xiuno.js?2.2.0"></script><script src="view/js/bootstrap-plugin.js?2.2.0"></script><script src="view/js/async.min.js?2.2.0"></script><script src="view/js/form.js?2.2.0"></script><script> var debug = DEBUG = 0; var url_rewrite_on = 1; var url_path = './'; var forumarr = {"1":"Tech"}; var fid = 1; var uid = 0; var gid = 0; xn.options.water_image_url = 'view/img/water-small.png'; </script><script src="view/js/wellcms.js?2.2.0"></script><a class="scroll-to-top rounded" href="javascript:void(0);"><i class="icon-angle-up"></i></a><a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"><i class="icon-angle-down"></i></a></body></html><script> var forum_url = 'list-1.html'; var safe_token = '3g82EkDiAJiXUmc1fqdjGypy5yLA50KmEY_2BaWXoFXFPjOd2NQXp1U3h9vD5hxjxJRFq_2F_2Fh2DmcbC6WhL'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-1"]').addClass('active'); </script>