MSDN has an article that describes native xmlhttp.
http://msdn.microsoft.com/en-us/library/ms537505(v=vs.85).aspx#_id
As the article describes, I have enabled native xml http. But this xml demo still doesn't run in ie9 on my local iis 7 server. It runs on the original site. If I download it to the local web server, it doesn't. The xmlhttp request
xmlhttp=new XMLHttpRequest(); doesn't return an object.
The demo is from the w3schools site http://www.w3schools.com/xml/tryit.asp?filename=tryxml_app_first.
This is the HTML.
<html>
<head>
<script type="text/javascript">
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","cd_catalog.xml",false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;
x=xmlDoc.getElementsByTagName("CD");
function displayCD(i)
{
artist=(x[i].getElementsByTagName("ARTIST")[0].childNodes[0].nodeValue);
title=(x[i].getElementsByTagName("TITLE")[0].childNodes[0].nodeValue);
year=(x[i].getElementsByTagName("YEAR")[0].childNodes[0].nodeValue);
txt="Artist: " + artist + "<br />Title: " + title + "<br />Year: "+ year;
document.getElementById("showCD").innerHTML=txt;
}
</script>
</head>
<body onload="displayCD(11)">
<div id='showCD'></div>
</body>
</html>
This is the xml file.
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <!-- Edited by XMLSpy®
-->
- <CATALOG>
- <CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</CD>
- <CD>
<TITLE>Hide your heart</TITLE>
<ARTIST>Bonnie Tyler</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>CBS Records</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1988</YEAR>
</CD>
- <CD>
<TITLE>Greatest Hits</TITLE>
<ARTIST>Dolly Parton</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>RCA</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1982</YEAR>
</CD>
- <CD>
<TITLE>Still got the blues</TITLE>
<ARTIST>Gary Moore</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>Virgin records</COMPANY>
<PRICE>10.20</PRICE>
<YEAR>1990</YEAR>
</CD>
- <CD>
<TITLE>Eros</TITLE>
<ARTIST>Eros Ramazzotti</ARTIST>
<COUNTRY>EU</COUNTRY>
<COMPANY>BMG</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1997</YEAR>
</CD>
- <CD>
<TITLE>One night only</TITLE>
<ARTIST>Bee Gees</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>Polydor</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1998</YEAR>
</CD>
- <CD>
<TITLE>Sylvias Mother</TITLE>
<ARTIST>Dr.Hook</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>CBS</COMPANY>
<PRICE>8.10</PRICE>
<YEAR>1973</YEAR>
</CD>
- <CD>
<TITLE>Maggie May</TITLE>
<ARTIST>Rod Stewart</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>Pickwick</COMPANY>
<PRICE>8.50</PRICE>
<YEAR>1990</YEAR>
</CD>
- <CD>
<TITLE>Romanza</TITLE>
<ARTIST>Andrea Bocelli</ARTIST>
<COUNTRY>EU</COUNTRY>
<COMPANY>Polydor</COMPANY>
<PRICE>10.80</PRICE>
<YEAR>1996</YEAR>
</CD>
- <CD>
<TITLE>When a man loves a woman</TITLE>
<ARTIST>Percy Sledge</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Atlantic</COMPANY>
<PRICE>8.70</PRICE>
<YEAR>1987</YEAR>
</CD>
- <CD>
<TITLE>Black angel</TITLE>
<ARTIST>Savage Rose</ARTIST>
<COUNTRY>EU</COUNTRY>
<COMPANY>Mega</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1995</YEAR>
</CD>
- <CD>
<TITLE>1999 Grammy Nominees</TITLE>
<ARTIST>Many</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Grammy</COMPANY>
<PRICE>10.20</PRICE>
<YEAR>1999</YEAR>
</CD>
- <CD>
<TITLE>For the good times</TITLE>
<ARTIST>Kenny Rogers</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>Mucik Master</COMPANY>
<PRICE>8.70</PRICE>
<YEAR>1995</YEAR>
</CD>
- <CD>
<TITLE>Big Willie style</TITLE>
<ARTIST>Will Smith</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1997</YEAR>
</CD>
- <CD>
<TITLE>Tupelo Honey</TITLE>
<ARTIST>Van Morrison</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>Polydor</COMPANY>
<PRICE>8.20</PRICE>
<YEAR>1971</YEAR>
</CD>
- <CD>
<TITLE>Soulsville</TITLE>
<ARTIST>Jorn Hoel</ARTIST>
<COUNTRY>Norway</COUNTRY>
<COMPANY>WEA</COMPANY>
<PRICE>7.90</PRICE>
<YEAR>1996</YEAR>
</CD>
- <CD>
<TITLE>The very best of</TITLE>
<ARTIST>Cat Stevens</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>Island</COMPANY>
<PRICE>8.90</PRICE>
<YEAR>1990</YEAR>
</CD>
- <CD>
<TITLE>Stop</TITLE>
<ARTIST>Sam Brown</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>A and M</COMPANY>
<PRICE>8.90</PRICE>
<YEAR>1988</YEAR>
</CD>
- <CD>
<TITLE>Bridge of Spies</TITLE>
<ARTIST>T'Pau</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>Siren</COMPANY>
<PRICE>7.90</PRICE>
<YEAR>1987</YEAR>
</CD>
- <CD>
<TITLE>Private Dancer</TITLE>
<ARTIST>Tina Turner</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>Capitol</COMPANY>
<PRICE>8.90</PRICE>
<YEAR>1983</YEAR>
</CD>
- <CD>
<TITLE>Midt om natten</TITLE>
<ARTIST>Kim Larsen</ARTIST>
<COUNTRY>EU</COUNTRY>
<COMPANY>Medley</COMPANY>
<PRICE>7.80</PRICE>
<YEAR>1983</YEAR>
</CD>
- <CD>
<TITLE>Pavarotti Gala Concert</TITLE>
<ARTIST>Luciano Pavarotti</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>DECCA</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1991</YEAR>
</CD>
- <CD>
<TITLE>The dock of the bay</TITLE>
<ARTIST>Otis Redding</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Atlantic</COMPANY>
<PRICE>7.90</PRICE>
<YEAR>1987</YEAR>
</CD>
- <CD>
<TITLE>Picture book</TITLE>
<ARTIST>Simply Red</ARTIST>
<COUNTRY>EU</COUNTRY>
<COMPANY>Elektra</COMPANY>
<PRICE>7.20</PRICE>
<YEAR>1985</YEAR>
</CD>
- <CD>
<TITLE>Red</TITLE>
<ARTIST>The Communards</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>London</COMPANY>
<PRICE>7.80</PRICE>
<YEAR>1987</YEAR>
</CD>
- <CD>
<TITLE>Unchain my heart</TITLE>
<ARTIST>Joe Cocker</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>EMI</COMPANY>
<PRICE>8.20</PRICE>
<YEAR>1987</YEAR>
</CD>
</CATALOG>
Where do the security issues happen that cause this demo to not run?
Related
I am working on a project and I need to create a multi sheet excel file using classic asp.
Here is my code. It makes a multi sheet excel but I cant write anything on sheet 2 or 3:
<%
response.charset = "UTF-8"
Response.Buffer=true
Response.AddHeader "Content-Disposition", "attachment;filename=aaa.xls"
Response.ContentType = "application/vnd.ms-excel"
%>
<HTML xmlns:x="urn:schemas-microsoft-com:office:excel">
<HEAD>
<xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name>sheet1</x:Name>
<x:WorksheetOptions>
<x:Print>
<x:ValidPrinterInfo>
</x:Print>
</x:WorksheetOptions>
</x:ExcelWorksheet>
<x:ExcelWorksheet>
<x:Name>sheet2</x:Name>
<x:WorksheetOptions>
<x:Print>
<x:ValidPrinterInfo>
</x:Print>
</x:WorksheetOptions>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
</x:ExcelWorkbook>
</xml>
</HEAD>
<BODY>
<TABLE>
<%
dim oConn
Set oConn = Server.CreateObject("ADODB.Connection")
Dim rs, ds
Set rs = Server.CreateObject("ADODB.Recordset")
Response.Write "<tr>"
Response.Write "<td style='border-left:none;border:.5pt solid windowtext;' bgcolor='#CCCCCC' bordercolor='#000000'><b>"
Response.Write "aa"
Response.Write "</b></td>"
Response.Write "</tr>"
Response.Write "<tr>"
Response.Write "<td>"
Response.Write "bb"
Response.Write "</td>"
Response.Write "</tr>"
%>
</TABLE>
</BODY>
</HTML>
I don't think it's possible to create actual .xls / .xlsx files in Classic ASP without a third party component (such as EasyXLS.ExcelDocument).
But what you can do is generate your Excel file using XML markup within Classic ASP, export it with a .xls extension and Excel will convert the file when you open it (after a warning message).
For example:
<%#LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
Response.Charset = "UTF-8"
Response.AddHeader "Content-Disposition", "attachment;filename=aaa.xls"
Response.ContentType = "application/vnd.ms-excel"
%><?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Author>Author Name</Author>
<LastAuthor>Author Name</LastAuthor>
<Created>2020-05-20T13:19:37Z</Created>
<LastSaved>2020-05-20T13:21:04Z</LastSaved>
<Company>Company Name</Company>
<Version>14.00</Version>
</DocumentProperties>
<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
<AllowPNG/>
</OfficeDocumentSettings>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<WindowHeight>4695</WindowHeight>
<WindowWidth>14355</WindowWidth>
<WindowTopX>360</WindowTopX>
<WindowTopY>105</WindowTopY>
<ActiveSheet>2</ActiveSheet>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
</Styles>
<Worksheet ss:Name="Sheet1">
<Table ss:ExpandedColumnCount="1" ss:ExpandedRowCount="1" x:FullColumns="1"
x:FullRows="1" ss:DefaultRowHeight="15">
<Row>
<Cell><Data ss:Type="String">1A - Sheet 1</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
<Worksheet ss:Name="Sheet2">
<Table ss:ExpandedColumnCount="1" ss:ExpandedRowCount="1" x:FullColumns="1"
x:FullRows="1" ss:DefaultRowHeight="15">
<Row>
<Cell><Data ss:Type="String">1A - Sheet 2</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
<Worksheet ss:Name="Sheet3">
<Table ss:ExpandedColumnCount="1" ss:ExpandedRowCount="1" x:FullColumns="1"
x:FullRows="1" ss:DefaultRowHeight="15">
<Row>
<Cell><Data ss:Type="String">1A - Sheet 3</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<Selected/>
<Panes>
<Pane>
<Number>3</Number>
<ActiveRow>6</ActiveRow>
<ActiveCol>3</ActiveCol>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
</Workbook>
The above example has 3 populated sheets. Best thing to do would be to create a dummy template of the type of Excel layout you're looking to generate, populate the sheets with dummy data and export from Excel using the "XML Spreadsheet" format (which is all I did for the above example). Then use Classic ASP to replace the dummy data with actual data.
if i have an xml file like below:
<?xml version="1.0" encoding="UTF-8"?>
<CATALOG>
<CD ID="1">
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10</PRICE>
<YEAR>1985</YEAR>
</CD>
<CD ID="2">
<TITLE>Hide your heart</TITLE>
<ARTIST>Bonnie Tyler</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>CBS Records</COMPANY>
<PRICE>31</PRICE>
<YEAR>1988</YEAR>
</CD>
</CATALOG>
how i could add to each price element the value of 1000, so there is a sum like current value + 1000, using xslt-3?
Output:
<?xml version="1.0" encoding="UTF-8"?>
<CATALOG>
<CD ID="1001">
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>1010</PRICE>
<YEAR>1985</YEAR>
</CD>
<CD ID="1002">
<TITLE>Hide your heart</TITLE>
<ARTIST>Bonnie Tyler</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>CBS Records</COMPANY>
<PRICE>1031</PRICE>
<YEAR>1988</YEAR>
</CD>
</CATALOG>
If you write a template for the PRICE elements and handle the rest by xsl:mode on-no-match="shallow-copy" (https://www.w3.org/TR/xslt-30/#built-in-templates-shallow-copy) you get
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="3.0">
<xsl:param name="to-be-added" as="xs:decimal" select="1000"/>
<xsl:mode on-no-match="shallow-copy"/>
<xsl:template match="PRICE">
<xsl:copy>
<xsl:value-of select=". + $to-be-added"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
https://xsltfiddle.liberty-development.net/6qM2e2j
I am trying to build a soap webservice in node js using the npm module soap. I am using the soap.listen function that is mentioned to launch a soap server in node js. The wsdl file I am including looks like below:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="wscalc1" targetNamespace="http://localhost:8100/api/orderStatusWsdl" xmlns="http://localhost:8100/api/orderStatusWsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<wsdl:message name="receiveOrderStatusRequest">
<wsdl:part name="a" type="xs:string"/>
<wsdl:part name="b" type="xs:string"/>
</wsdl:message>
<wsdl:message name="receiveOrderStatusResponse">
<wsdl:part name="orderStatusResponse" type="xs:string"/>
</wsdl:message>
<wsdl:portType name="orderStatusPort">
<wsdl:operation name="receiveOrderStatus">
<wsdl:input message="receiveOrderStatusRequest"/>
<wsdl:output message="receiveOrderStatusResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="orderStatusBinding" type="orderStatusPort">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="receiveOrderStatus">
<soap:operation soapAction="receiveOrderStatus"/>
<wsdl:input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="orderStatusService">
<wsdl:port binding="orderStatusBinding" name="orderStatus">
<soap:address location="http://localhost:8100/api/orderStatusWsdl"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
The node js code:
var orderStatusWsdlXml = fs.readFileSync(path.join(__dirname, 'soap/wsdl/myWsdl2.wsdl'), 'utf8')
var soapServer = soap.listen(server, BASE_URL + '/orderStatusWsdl', orderStatusSoapService, orderStatusWsdlXml2)
soapServer.log = function(type, data) {
log.d('TYPE: ' + type)
log.d('DATA: ' + JSON.stringify(data, null, 4))
}
After running the node project I try to load the WSDL in SOAP UI client and I get the following error:
Error loading [http://localhost:8100/api/orderStatusWsdl]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Unexpected end of file after null
Where am I going wrong?
I use the following MP4Box command to generate the manifest file(.mpd). The manifest file is common to different video representations.
MP4Box -dash 5000 -frag 5000 -fps 25 -frag-rap -rap -bs-switching merge -profile dashavc264:live -mpd-title "Mpeg Dash Preview" -segment-ext null -segment-name seg_ -out test.mpd resolution_480p.mp4#video:baseURL=./v/ resolution_360p.mp4#video:baseURL=./v_360/ resolution_720p.mp4#video:baseURL=./v_720/ resolution_480p.mp4#audio:baseURL=./a/
Though dash.js is playing the video, only single bitrate is being played without switching the resolution according to network condition. Am I missing something in the command? or should I enable Adaptive Bitrate Switching in the player?
Manifest file
<?xml version="1.0"?>
<!-- MPD file Generated with GPAC version 0.6.0-revUNKNOWN-UNKNOWN at 2016-09-12T11:58:50.789Z-->
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT1.500S" type="static" mediaPresentationDuration="PT0H1M2.502S" maxSegmentDuration="PT0H0M5.000S" profiles="urn:mpeg:dash:profile:isoff-live:2011,http://dashif.org/guidelines/dash264">
<ProgramInformation moreInformationURL="http://gpac.sourceforge.net">
<Title>Mpeg Dash Preview</Title>
</ProgramInformation>
<Period duration="PT0H1M2.502S">
<AdaptationSet segmentAlignment="true" maxWidth="1280" maxHeight="720" maxFrameRate="25" par="28800:15480" lang="und">
<SegmentTemplate timescale="12800" media="seg_$Number$" startNumber="1" duration="64000" initialization="seg_init"/>
<Representation id="1" mimeType="video/mp4" codecs="avc1.42c015" width="480" height="360" frameRate="25" sar="60:43" startWithSAP="1" bandwidth="796236">
<BaseURL>./v/</BaseURL>
</Representation>
<Representation id="2" mimeType="video/mp4" codecs="avc1.42c01e" width="640" height="480" frameRate="25" sar="60:43" startWithSAP="1" bandwidth="1208202">
<BaseURL>./v_360/</BaseURL>
</Representation>
<Representation id="3" mimeType="video/mp4" codecs="avc1.42c01f" width="1280" height="720" frameRate="25" sar="45:43" startWithSAP="1" bandwidth="2715861">
<BaseURL>./v_720/</BaseURL>
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true" lang="hin">
<SegmentTemplate timescale="48000" media="seg_$Number$" startNumber="1" duration="240000" initialization="seg_init"/>
<Representation id="4" mimeType="audio/mp4" codecs="mp4a.40.2" audioSamplingRate="48000" startWithSAP="1" bandwidth="343385">
<BaseURL>./a/</BaseURL>
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
</Representation>
</AdaptationSet>
</Period>
</MPD>
Here is the wsdl file with the schema inline. I have the actual wsdl file being called locally aka localhost/wsdl/.
<wsdl:definitions xmlns="http://soap.company.com/fetch_n_pay"
xmlns:tns="http://soap.company.com/fetch_n_pay"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://soap.company.com/fetch_n_pay">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://soap.company.com/fetch_n_pay">
<s:complexType name="fetchBookingDetailsRequType">
<s:all>
<s:element name="version" type="s:string"/>
<s:element name="timestamp" type="s:dateTime"/>
<s:element name="siteUrl" type="s:string"/>
<s:element name="confirmationCode" type="s:string"/>
<s:element name="vendorCode" type="s:string"/>
</s:all>
</s:complexType>
<s:complexType name="fetchBookingDetailsRespType">
<s:all>
<s:element name="version" type="s:string"/>
<s:element name="timestamp" type="s:dateTime"/>
<s:element name="isSuccess" type="s:boolean"/>
<s:element name="responseCode" type="s:int"/>
<s:element name="errorMessage" type="s:string"/>
<s:element name="sailingDate" type="s:date"/>
<s:element name="sailingName" type="s:string"/>
<s:element name="cruiselineName" type="s:string"/>
<s:element name="cruiselineId" type="s:string"/>
<s:element name="cabinNumber" type="s:string"/>
<s:element name="roomType" type="s:string"/>
<s:element name="shipName" type="s:string"/>
<s:element name="departingFrom" type="s:string"/>
<s:element name="returnDate" type="s:date"/>
<s:element name="numberOfAdults" type="s:int"/>
<s:element name="numberOfChildren" type="s:int"/>
<s:element name="numberOfSeniors" type="s:int"/>
<s:element name="numberOfInfants" type="s:int"/>
<s:element name="confirmationNumber" type="s:string"/>
<s:element name="balanceDueDate" type="s:dateTime"/>
<s:element name="depositDueDate" type="s:dateTime"/>
<s:element name="depositCollectedByCruiseline" type="s:boolean"/>
<s:element name="wasBookedSuccess" type="s:boolean"/>
<s:element name="shipImageUrl" type="s:string"/>
<s:element name="isCancelled" type="s:boolean"/>
<s:element name="insuranceAmount" type="s:double"/>
<s:element name="customerTitle" type="s:string"/>
<s:element name="customerFirstName" type="s:string"/>
<s:element name="customerLastName" type="s:string"/>
<s:element name="customerPhone" type="s:string"/>
<s:element name="customerEmail" type="s:string"/>
</s:all>
</s:complexType>
<s:element name="fetchBookingDetailsRequElement" type="tns:fetchBookingDetailsRequType" />
<s:element name="fetchBookingDetailsRespElement" type="tns:fetchBookingDetailsRespType" />
</s:schema>
</wsdl:types>
<wsdl:message name="fetchBookingDetailsSoapIn">
<wsdl:part name="banana1" element="tns:fetchBookingDetailsRequElement"/>
</wsdl:message>
<wsdl:message name="fetchBookingDetailsSoapOut">
<wsdl:part name="banana2" element="tns:fetchBookingDetailsRespElement"/>
</wsdl:message>
<wsdl:portType name="FetchAndPaySoap">
<wsdl:operation name="fetchBookingDetails">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
Gets Information for booking.
</wsdl:documentation>
<wsdl:input message="tns:fetchBookingDetailsSoapIn"/>
<wsdl:output message="tns:fetchBookingDetailsSoapOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="FetchAndPaySoap" type="tns:FetchAndPaySoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="fetchBookingDetails">
<soap:operation soapAction="http://soap.company.com/fetchBookingDetails" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="FetchAndPay">
<wsdl:port name="FetchAndPaySoap" binding="tns:FetchAndPaySoap">
<soap:address location="localhost/wsdl/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
1) For some reason the request soap is adding in "fet:" namespace
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:fet="http://soap.company.com/fetch_n_pay">
<soapenv:Header/>
<soapenv:Body>
<fet:fetchBookingDetailsRequElement>
<!--You may enter the following 5 items in any order-->
<fet:version>?</fet:version>
<fet:timestamp>?</fet:timestamp>
<fet:siteUrl>?</fet:siteUrl>
<fet:confirmationCode>?</fet:confirmationCode>
<fet:vendorCode>?</fet:vendorCode>
</fet:fetchBookingDetailsRequElement>
</soapenv:Body>
</soapenv:Envelope>
2) The SOAP Response is valid but the schema Compliance failed. This is the error:
SOAP Response - VALID
Schema Compliance - FAILED
-> line -1: Missing message part with name [{http://soap.company.com/fetch_n_pay}fetchBookingDetailsRespElement]
Here is the response:
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<fetchBookingDetailsResponse
xmlns="http://soap.company.com/fetch_n_pay">
<version>0.1.0</version>
<timestamp>2015-06-18T13:37:08-04:00</timestamp>
<isSuccess>false</isSuccess>
<responseCode>47</responseCode>
<errorMessage>No results were found.</errorMessage>
</fetchBookingDetailsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Im trying to be Schema Compliant so that this can be parsed.
Anything would be greatly appreciated. Thank you!
Your validation engine already gave you the answer, it's not fetchBookingDetailsResponse, it's fetchBookingDetailsRespElement.