0% found this document useful (0 votes)
12 views

Assessment 3

Uploaded by

kngb145
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Assessment 3

Uploaded by

kngb145
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Assessment-3

1. Frame XSLT
Request:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://www.boa.com">
<soapenv:Header/>
<soapenv:Body>
<ns:VaryOnWorkstation>
<!-- hallo -->
<ns:Header>
<ns:header_channel sex="male">hai</ns:header_channel>
<ns:header_user>Vyas</ns:header_user>
<ns:header_workstation>pronteff</ns:header_workstation>
</ns:Header><!-- hallo -->

<ns:header_transactionDate
sex="male">07072022</ns:header_transactionDate>

<ns:header_transactionTime>13:02</ns:header_transactionTime>

<ns:header_transactionReference>hello</ns:header_transactionRe
ference>

<ns:header_channelReserved>confirmed</ns:header_channelReser
ved>
<ns:data_workstation>chennai</ns:data_workstation>
</ns:VaryOnWorkstation>
</soapenv:Body>
</soapenv:Envelope>

Expected Output:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:boa="http://www.boa.com">
<soapenv:Header/>
<soapenv:Body>
<boa:Reply>
<boa:Header>
<boa:header_channel
sex="male">hai</boa:header_channel>
<boa:header_user>Vyas</boa:header_user>

<boa:header_workstation>pronteff</boa:header_workstation>
<boa:ReplyStatus>ERR</boa:ReplyStatus>
</boa:Header>
<boa:header_transactionDate
sex="male">07072022</boa:header_transactionDate>

<boa:header_transactionTime>13:02</boa:header_transactionTim
e>

<boa:header_transactionReference>hello</boa:header_transaction
Reference>
<boa:header_channelReserved>confirmed</boa:header_channelRe
served>
<boa:data_workstation>chennai</boa:data_workstation>
<boa:Fault>
<faultCode>ESB0017</faultCode>
<faultString>Invalid message format</faultString>
<detail>
<faultNumber>2999</faultNumber>
</detail>
</boa:Fault>
</boa:Reply>
</soapenv:Body>
</soapenv:Envelope>

2.CData
i. Request:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<description>
<![CDATA[
This is a CDATA section in XML.
It allows you to include special characters
like <, >, &, and others without escaping them.
]]>
</description>
</root>
Output:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<description>
This is a CDATA section in XML.
It allows you to include special characters
like &lt;, &gt;, &amp;, and others without escaping them.
</description>
</root>

ii. Request:

<?xml version="1.0" encoding="UTF-8"?>


<root>
<description>
This is a CDATA section in XML.
It allows you to include special characters
like &lt;, &gt;, &amp;, and others without escaping them.
</description>
</root>
Output:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<description>
<![CDATA[
This is a CDATA section in XML.
It allows you to include special characters
like <, >, &, and others without escaping them.
]]>
</description>
</root>
3. Use apply templates and call templates
request:
<?xml version="1.0" encoding="UTF-8"?>
<products>
<product>
<id>1</id>
<name>Product 1</name>
<description>A description of Product 1.</description>
<price>19.99</price>
<category>Electronics</category>
</product>
<product>
<id>2</id>
<name>Product 2</name>
<description>A description of Product 2.</description>
<price>29.99</price>
<category>Apparel</category>
</product>
<product>
<id>3</id>
<name>Product 3</name>
<description>A description of Product 3.</description>
<price>169.99</price>
<category>Electronics gadgets</category>
</product>
<product>
<id>4</id>
<name>Product 4</name>
<description>A description of Product 4.</description>
<price>299.99</price>
<category>Apl</category>
</product>
</products>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<transformed-products>
<product>
<name>Product 1</name>
<price>19.99</price>
<category>Electronics</category>
<description>A description of Product 1.</description>
<id>1</id>
</product>
<product>
<name>Product 2</name>
<price>29.99</price>
<category>Apparel</category>
<description>A description of Product 2.</description>
<id>2</id>
</product>
<product>
<name>Product 3</name>
<price>169.99</price>
<category>Electronics gadgets</category>
<description>A description of Product 3.</description>
<id>3</id>
</product>
<product>
<name>Product 4</name>
<price>299.99</price>
<category>Apl</category>
<description>A description of Product 4.</description>
<id>4</id>
</product>
</transformed-products>

You might also like