php soap responce to array - soap

I am using a rental reservation webservice and it returns a xml response now I have to use that response in my site using php.
for xml you can check this page
https://www.jimpisoft.pt/Rentway_Internacional_Reservations_WS/getPriceQuote.asmx?op=PriceQuote
$xml = simplexml_load_string($response);
$json = json_encode($xml);
$arr = json_decode($json,true);
print_r($arr);
But it says XML Parsing Error: syntax error
I tried this as well
include 'xmlParser.class.php';
$oXmlParser = new xmlParser();
$asArray = $oXmlParser->xml2array($ssString);
$asArray1 = $oXmlParser->xml2array($ssString,'');
$asArray2 = $oXmlParser->xml2array($ssString,1,'');
$response14 = preg_replace("/(]*>)/", "$1$2$3", $asArray);
print_r($response14);
this is the xml
<soap:Envelope><soap:Body><StationDetailsResponse><StationDetailsResult><stationDetails><xs:schema id="StationDetails"><xs:element name="StationDetails" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"><xs:complexType><xs:choice minOccurs="0" maxOccurs="unbounded"><xs:element name="Table"><xs:complexType><xs:sequence><xs:element name="StationID" type="xs:string" minOccurs="0"/><xs:element name="Station" type="xs:string" minOccurs="0"/><xs:element name="Zone" type="xs:int" minOccurs="0"/><xs:element name="StationType" type="xs:int" minOccurs="0"/><xs:element name="StationTypeDescription" type="xs:string" minOccurs="0"/><xs:element name="Address" type="xs:string" minOccurs="0"/><xs:element name="WeekDayOpen" type="xs:string" minOccurs="0"/><xs:element name="WeekdayLunchIni" type="xs:string" minOccurs="0"/><xs:element name="WeekdayLunchFim" type="xs:string" minOccurs="0"/><xs:element name="WeekDayClose" type="xs:string" minOccurs="0"/><xs:element name="SaturDayOpen" type="xs:string" minOccurs="0"/><xs:element name="SaturdayLunchIni" type="xs:string" minOccurs="0"/><xs:element name="SaturdayLunchFim" type="xs:string" minOccurs="0"/><xs:element name="SaturDayClose" type="xs:string" minOccurs="0"/><xs:element name="SunDayOpen" type="xs:string" minOccurs="0"/><xs:element name="SundayLunchIni" type="xs:string" minOccurs="0"/><xs:element name="SundayLunchFim" type="xs:string" minOccurs="0"/><xs:element name="SunDayClose" type="xs:string" minOccurs="0"/><xs:element name="HolidayOpen" type="xs:string" minOccurs="0"/><xs:element name="HolidayLunchIni" type="xs:string" minOccurs="0"/><xs:element name="HolidayLunchFim" type="xs:string" minOccurs="0"/><xs:element name="HolidayClose" type="xs:string" minOccurs="0"/><xs:element name="AfterHour_Enable" type="xs:boolean" minOccurs="0"/><xs:element name="AfterHour_Weekday" type="xs:string" minOccurs="0"/><xs:element name="AfterHour_Saturday" type="xs:string" minOccurs="0"/><xs:element name="AfterHour_Sunday" type="xs:string" minOccurs="0"/><xs:element name="AfterHour_Holiday" type="xs:string" minOccurs="0"/><xs:element name="AfterHours_CheckOut" type="xs:boolean" minOccurs="0"/><xs:element name="AfterHours_CheckIn" type="xs:boolean" minOccurs="0"/><xs:element name="AfterHour_Extra" type="xs:string" minOccurs="0"/><xs:element name="Address1" type="xs:string" minOccurs="0"/><xs:element name="Address2" type="xs:string" minOccurs="0"/><xs:element name="PostalCode" type="xs:string" minOccurs="0"/><xs:element name="City" type="xs:string" minOccurs="0"/><xs:element name="Country" type="xs:int" minOccurs="0"/><xs:element name="Phone1" type="xs:string" minOccurs="0"/><xs:element name="Phone2" type="xs:string" minOccurs="0"/><xs:element name="Fax" type="xs:string" minOccurs="0"/><xs:element name="Email" type="xs:string" minOccurs="0"/><xs:element name="Latitude" type="xs:decimal" minOccurs="0"/><xs:element name="Longitude" type="xs:decimal" minOccurs="0"/><xs:element name="ResponsibleName" type="xs:string" minOccurs="0"/><xs:element name="ResponsiblePhone" type="xs:string" minOccurs="0"/><xs:element name="CellPhone" type="xs:string" minOccurs="0"/><xs:element name="StationAddInfo" type="xs:string" minOccurs="0"/><xs:element name="StationAddInfo1" type="xs:string" minOccurs="0"/><xs:element name="IsFlightInfoMandatory" type="xs:boolean" minOccurs="0"/><xs:element name="AfterHour_Weekday_Start" type="xs:string" minOccurs="0"/><xs:element name="AfterHour_Saturday_Start" type="xs:string" minOccurs="0"/><xs:element name="AfterHour_Sunday_Start" type="xs:string" minOccurs="0"/><xs:element name="AfterHour_Holiday_Start" type="xs:string" minOccurs="0"/><xs:element name="StationHoliday" msdata:DataType="System.Data.DataTable, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" type="xs:anyType" minOccurs="0"/><xs:element name="Schedule" msdata:DataType="System.Data.DataTable, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" type="xs:anyType" minOccurs="0"/></xs:sequence></xs:complexType></xs:element></xs:choice></xs:complexType></xs:element></xs:schema><diffgr:diffgram><StationDetails><Table diffgr:id="Table1" msdata:rowOrder="0"><StationID>ARN</StationID><Station>Arlanda airport </Station><Zone>9</Zone><StationType>2</StationType><StationTypeDescription>Airport</StationTypeDescription><Address>Elkraftsgatan 2 </Address><WeekDayOpen>00:00</WeekDayOpen><WeekdayLunchIni xml:space="preserve"> </WeekdayLunchIni><WeekdayLunchFim xml:space="preserve"> </WeekdayLunchFim><WeekDayClose>23:59</WeekDayClose><SaturDayOpen>00:00</SaturDayOpen><SaturdayLunchIni xml:space="preserve"> </SaturdayLunchIni><SaturdayLunchFim xml:space="preserve"> </SaturdayLunchFim><SaturDayClose>23:59</SaturDayClose><SunDayOpen>00:00</SunDayOpen><SundayLunchIni xml:space="preserve"> </SundayLunchIni><SundayLunchFim xml:space="preserve"> </SundayLunchFim><SunDayClose>23:59</SunDayClose><HolidayOpen>00:00</HolidayOpen><HolidayLunchIni xml:space="preserve"> </HolidayLunchIni><HolidayLunchFim xml:space="preserve"> </HolidayLunchFim><HolidayClose>23:59</HolidayClose><AfterHour_Enable>false</AfterHour_Enable><AfterHours_CheckOut>true</AfterHours_CheckOut><AfterHours_CheckIn>false</AfterHours_CheckIn><Address1>Elkraftsgatan 2</Address1><Address2/><PostalCode>195 60</PostalCode><City>Arlandastad</City><Country>203</Country><Phone1>+46 8 591 150 78</Phone1><Phone2>+46 8 591 150 55</Phone2><Fax/><Email>sweden#addcar.com</Email><Latitude>59.36550</Latitude><Longitude>17.53400</Longitude><ResponsibleName>Esa Palmborg</ResponsibleName><ResponsiblePhone>+46 8 591 150 78</ResponsiblePhone><CellPhone/><StationAddInfo>Please call +46 8 591 150 55 for pickup at your terminal, Go to bus stand 7 and wait for the "Flygplatsparkering/addCar" shuttle bus.</StationAddInfo><StationAddInfo1>Please call +46 8 591 150 55 for pickup at your terminal, Go to bus stand 7 and wait for the "Flygplatsparkering/addCar" shuttle bus.</StationAddInfo1><IsFlightInfoMandatory>false</IsFlightInfoMandatory><AfterHour_Weekday_Start xml:space="preserve"> </AfterHour_Weekday_Start><AfterHour_Saturday_Start xml:space="preserve"> </AfterHour_Saturday_Start><AfterHour_Sunday_Start xml:space="preserve"> </AfterHour_Sunday_Start><AfterHour_Holiday_Start xml:space="preserve"> </AfterHour_Holiday_Start><StationHoliday><xs:schema id="NewDataSet"><xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="StationHoliday" msdata:UseCurrentLocale="true"><xs:complexType><xs:choice minOccurs="0" maxOccurs="unbounded"><xs:element name="StationHoliday"><xs:complexType><xs:sequence><xs:element name="Date" type="xs:string" minOccurs="0"/><xs:element name="Holiday_description" type="xs:string" minOccurs="0"/><xs:element name="OpenHour" type="xs:string" minOccurs="0"/><xs:element name="CloseHour" type="xs:string" minOccurs="0"/></xs:sequence></xs:complexType></xs:element></xs:choice></xs:complexType></xs:element></xs:schema><diffgr:diffgram><DocumentElement><StationHoliday diffgr:id="StationHoliday1" msdata:rowOrder="0"><Date>2016-06-19</Date><Holiday_description>Midsummer</Holiday_description><OpenHour>00:00</OpenHour><CloseHour>23:59</CloseHour></StationHoliday><StationHoliday diffgr:id="StationHoliday2" msdata:rowOrder="1"><Date>2016-06-20</Date><Holiday_description>Midsummer</Holiday_description><OpenHour>00:00</OpenHour><CloseHour>23:59</CloseHour></StationHoliday><StationHoliday diffgr:id="StationHoliday3" msdata:rowOrder="2"><Date>2016-06-21</Date><Holiday_description>Midsummer</Holiday_description><OpenHour>00:00</OpenHour><CloseHour>23:59</CloseHour></StationHoliday><StationHoliday diffgr:id="StationHoliday4" msdata:rowOrder="3"><Date>2016-08-18</Date><Holiday_description>Midsummer</Holiday_description><OpenHour>00:00</OpenHour><CloseHour>23:59</CloseHour></StationHoliday></DocumentElement></diffgr:diffgram></StationHoliday><Schedule><xs:schema id="NewDataSet"><xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="StationHoliday" msdata:UseCurrentLocale="true"><xs:complexType><xs:choice minOccurs="0" maxOccurs="unbounded"><xs:element name="StationHoliday"><xs:complexType><xs:sequence><xs:element name="SeasonStart" type="xs:string" minOccurs="0"/><xs:element name="SeasonEnd" type="xs:string" minOccurs="0"/><xs:element name="MondayAHStart" type="xs:string" minOccurs="0"/><xs:element name="MondayOpen" type="xs:string" minOccurs="0"/><xs:element name="MondayLunchStart" type="xs:string" minOccurs="0"/><xs:element name="MondayLunchEnd" type="xs:string" minOccurs="0"/><xs:element name="MondayClose" type="xs:string" minOccurs="0"/><xs:element name="MondayAHEnd" type="xs:string" minOccurs="0"/><xs:element name="TuesdayAHStart" type="xs:string" minOccurs="0"/><xs:element name="TuesdayOpen" type="xs:string" minOccurs="0"/><xs:element name="TuesdayLunchStart" type="xs:string" minOccurs="0"/><xs:element name="TuesdayLunchEnd" type="xs:string" minOccurs="0"/><xs:element name="TuesdayClose" type="xs:string" minOccurs="0"/><xs:element name="TuesdayAHEnd" type="xs:string" minOccurs="0"/><xs:element name="WednesdayAHStart" type="xs:string" minOccurs="0"/><xs:element name="WednesdayOpen" type="xs:string" minOccurs="0"/><xs:element name="WednesdayLunchStart" type="xs:string" minOccurs="0"/><xs:element name="WednesdayLunchEnd" type="xs:string" minOccurs="0"/><xs:element name="WednesdayClose" type="xs:string" minOccurs="0"/><xs:element name="WednesdayAHEnd" type="xs:string" minOccurs="0"/><xs:element name="ThursdayAHStart" type="xs:string" minOccurs="0"/><xs:element name="ThursdayOpen" type="xs:string" minOccurs="0"/><xs:element name="ThursdayLunchStart" type="xs:string" minOccurs="0"/><xs:element name="ThursdayLunchEnd" type="xs:string" minOccurs="0"/><xs:element name="ThursdayClose" type="xs:string" minOccurs="0"/><xs:element name="ThursdayAHEnd" type="xs:string" minOccurs="0"/><xs:element name="FridayAHStart" type="xs:string" minOccurs="0"/><xs:element name="FridayOpen" type="xs:string" minOccurs="0"/><xs:element name="FridayLunchStart" type="xs:string" minOccurs="0"/><xs:element name="FridayLunchEnd" type="xs:string" minOccurs="0"/><xs:element name="FridayClose" type="xs:string" minOccurs="0"/><xs:element name="FridayAHEnd" type="xs:string" minOccurs="0"/><xs:element name="SaturdayAHStart" type="xs:string" minOccurs="0"/><xs:element name="SaturdayOpen" type="xs:string" minOccurs="0"/><xs:element name="SaturdayLunchStart" type="xs:string" minOccurs="0"/><xs:element name="SaturdayLunchEnd" type="xs:string" minOccurs="0"/><xs:element name="SaturdayClose" type="xs:string" minOccurs="0"/><xs:element name="SaturdayAHEnd" type="xs:string" minOccurs="0"/><xs:element name="SundayAHStart" type="xs:string" minOccurs="0"/><xs:element name="SundayOpen" type="xs:string" minOccurs="0"/><xs:element name="SundayLunchStart" type="xs:string" minOccurs="0"/><xs:element name="SundayLunchEnd" type="xs:string" minOccurs="0"/><xs:element name="SundayClose" type="xs:string" minOccurs="0"/><xs:element name="SundayAHEnd" type="xs:string" minOccurs="0"/><xs:element name="HolidayAHStart" type="xs:string" minOccurs="0"/><xs:element name="HolidayOpen" type="xs:string" minOccurs="0"/><xs:element name="HolidayLunchStart" type="xs:string" minOccurs="0"/><xs:element name="HolidayLunchEnd" type="xs:string" minOccurs="0"/><xs:element name="HolidayClose" type="xs:string" minOccurs="0"/><xs:element name="HolidayAHEnd" type="xs:string" minOccurs="0"/></xs:sequence></xs:complexType></xs:element></xs:choice></xs:complexType></xs:element></xs:schema><diffgr:diffgram><DocumentElement><StationHoliday diffgr:id="StationHoliday1" msdata:rowOrder="0"><SeasonStart>01/01</SeasonStart><SeasonEnd>31/12</SeasonEnd><MondayAHStart xml:space="preserve"> </MondayAHStart><MondayOpen>00:00</MondayOpen><MondayLunchStart xml:space="preserve"> </MondayLunchStart><MondayLunchEnd xml:space="preserve"> </MondayLunchEnd><MondayClose>23:59</MondayClose><MondayAHEnd xml:space="preserve"> </MondayAHEnd><TuesdayAHStart xml:space="preserve"> </TuesdayAHStart><TuesdayOpen>00:00</TuesdayOpen><TuesdayLunchStart xml:space="preserve"> </TuesdayLunchStart><TuesdayLunchEnd xml:space="preserve"> </TuesdayLunchEnd><TuesdayClose>23:59</TuesdayClose><TuesdayAHEnd xml:space="preserve"> </TuesdayAHEnd><WednesdayAHStart xml:space="preserve"> </WednesdayAHStart><WednesdayOpen>00:00</WednesdayOpen><WednesdayLunchStart xml:space="preserve"> </WednesdayLunchStart><WednesdayLunchEnd xml:space="preserve"> </WednesdayLunchEnd><WednesdayClose>23:59</WednesdayClose><WednesdayAHEnd xml:space="preserve"> </WednesdayAHEnd><ThursdayAHStart xml:space="preserve"> </ThursdayAHStart><ThursdayOpen>00:00</ThursdayOpen><ThursdayLunchStart xml:space="preserve"> </ThursdayLunchStart><ThursdayLunchEnd xml:space="preserve"> </ThursdayLunchEnd><ThursdayClose>23:59</ThursdayClose><ThursdayAHEnd xml:space="preserve"> </ThursdayAHEnd><FridayAHStart xml:space="preserve"> </FridayAHStart><FridayOpen>00:00</FridayOpen><FridayLunchStart xml:space="preserve"> </FridayLunchStart><FridayLunchEnd xml:space="preserve"> </FridayLunchEnd><FridayClose>23:59</FridayClose><FridayAHEnd xml:space="preserve"> </FridayAHEnd><SaturdayAHStart xml:space="preserve"> </SaturdayAHStart><SaturdayOpen>00:00</SaturdayOpen><SaturdayLunchStart xml:space="preserve"> </SaturdayLunchStart><SaturdayLunchEnd xml:space="preserve"> </SaturdayLunchEnd><SaturdayClose>23:59</SaturdayClose><SaturdayAHEnd xml:space="preserve"> </SaturdayAHEnd><SundayAHStart xml:space="preserve"> </SundayAHStart><SundayOpen>00:00</SundayOpen><SundayLunchStart xml:space="preserve"> </SundayLunchStart><SundayLunchEnd xml:space="preserve"> </SundayLunchEnd><SundayClose>23:59</SundayClose><SundayAHEnd xml:space="preserve"> </SundayAHEnd><HolidayAHStart xml:space="preserve"> </HolidayAHStart><HolidayOpen>00:00</HolidayOpen><HolidayLunchStart xml:space="preserve"> </HolidayLunchStart><HolidayLunchEnd xml:space="preserve"> </HolidayLunchEnd><HolidayClose>23:59</HolidayClose><HolidayAHEnd xml:space="preserve"> </HolidayAHEnd></StationHoliday></DocumentElement></diffgr:diffgram></Schedule></Table></StationDetails></diffgr:diffgram></stationDetails></StationDetailsResult></StationDetailsResponse></soap:Body></soap:Envelope>

Related

How do I add a new resx file to my project using the dotnet CLI or VS Code?

How do I add a new .resx (plus .Designer.cs) file to my project using the dotnet CLI or VS Code?
I couldn't find a template either, it'd be nice if the community could make a new template we could install or even have it as one of the default templates.
Here is the sample XML provided for reference (took me a while to find it)
The file is named Foo.resx, and then you can copy paste it for each language Foo.fr.resx or even Foo.fr-fr.resx
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="PageTitle" xml:space="preserve">
<value>My page title in english</value>
</data>
</root>
For each file I have the following entry in my csproj
<ItemGroup>
<EmbeddedResource Update="Pages\Foo.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Foo.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
Lastly, for balzor wasm, the resource name matches the page name.

Azure Data Factory - ingest XML using source connector and store as CSV

I have a data set to fetch an XML document from a storage account. When I push that through and store it as a CSV (or JSON) (edited for clarity) in ADLS gen2 (edit) using either a Mapping Data Flow or just a regular pipeline activity I end up with a file containing only the first line of the document. Anyone who has been through this that can give me a tip on what I'm doing wrong?
The XML map looks like this if that helps:
<xs:element name="SAMPLE_XML">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="record">
<xs:complexType>
<xs:sequence>
<xs:element name="LABEL" type="xs:string" />
<xs:element name="AUFNR" type="xs:unsignedInt" />
<xs:element minOccurs="0" name="SYSST" />
<xs:element minOccurs="0" name="STTXT" type="xs:string" />
<xs:element name="STTXU" type="xs:string" />
<xs:element name="AUART" type="xs:string" />
<xs:element name="QMNUM" type="xs:string" />
<xs:element name="QMTXT" type="xs:string" />
<xs:element name="TPLNR" type="xs:string" />
<xs:element name="BEARB" type="xs:string" />
<xs:element name="EQUNR" type="xs:string" />
<xs:element name="INGPR" type="xs:string" />
<xs:element name="VAPLZ" type="xs:string" />
<xs:element name="GSTRP" type="xs:string" />
<xs:element name="GLTRP" type="xs:string" />
<xs:element name="ZZLTRMN" type="xs:string" />
<xs:element name="PRIOK" type="xs:string" />
<xs:element name="REVNR" type="xs:string" />
<xs:element name="ILART" type="xs:string" />
<xs:element name="KTEXT" type="xs:string" />
<xs:element name="UDATE_UTIME" type="xs:string" />
<xs:element name="VORNR" type="xs:string" />
<xs:element name="VSTTXT" type="xs:string" />
<xs:element name="ARBPL" type="xs:string" />
<xs:element name="ARBEI" type="xs:decimal" />
<xs:element name="ISMNW" type="xs:decimal" />
<xs:element name="AUFNT" />
<xs:element name="PROID" />
<xs:element name="ERNAM" type="xs:string" />
<xs:element name="ERDAT" type="xs:string" />
<xs:element name="AENAM" type="xs:string" />
<xs:element name="AEDAT" type="xs:string" />
<xs:element name="LTXA1" type="xs:string" />
<xs:element name="ANLZU" type="xs:string" />
<xs:element name="FSAVD" type="xs:string" />
<xs:element name="FSAVZ" type="xs:time" />
<xs:element name="FSEDD" type="xs:string" />
<xs:element name="FSEDZ" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
#MartinJaffer-MSFT in a comment to my question suggested I used a collectionReference in the mapping settings and that worked.
I hadn't used that as the description refers to JSON only. "Select or specify the JSONPath of a nested JSON array for cross-apply."
But yes, that worked as he said and problem solved. Thanks.

ServiceStack + SOAP + soapUI

I'm trying to get soapUI to recognize the types in my ServiceStack soap service. I'm sure that I'm doing something wrong in the setup of the service. Here is the WSDL:
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="Soap12"
targetNamespace="https://something.com/service/types"
xmlns:svc="https://something.com/service/types"
xmlns:tns="https://something.com/service/types"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:wsa10="http://www.w3.org/2005/08/addressing"
xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
<wsdl:types>
<xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="anyType" nillable="true" type="xs:anyType" />
<xs:element name="anyURI" nillable="true" type="xs:anyURI" />
<xs:element name="base64Binary" nillable="true" type="xs:base64Binary" />
<xs:element name="boolean" nillable="true" type="xs:boolean" />
<xs:element name="byte" nillable="true" type="xs:byte" />
<xs:element name="dateTime" nillable="true" type="xs:dateTime" />
<xs:element name="decimal" nillable="true" type="xs:decimal" />
<xs:element name="double" nillable="true" type="xs:double" />
<xs:element name="float" nillable="true" type="xs:float" />
<xs:element name="int" nillable="true" type="xs:int" />
<xs:element name="long" nillable="true" type="xs:long" />
<xs:element name="QName" nillable="true" type="xs:QName" />
<xs:element name="short" nillable="true" type="xs:short" />
<xs:element name="string" nillable="true" type="xs:string" />
<xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte" />
<xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt" />
<xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong" />
<xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort" />
<xs:element name="char" nillable="true" type="tns:char" />
<xs:simpleType name="char">
<xs:restriction base="xs:int" />
</xs:simpleType>
<xs:element name="duration" nillable="true" type="tns:duration" />
<xs:simpleType name="duration">
<xs:restriction base="xs:duration">
<xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?" />
<xs:minInclusive value="-P10675199DT2H48M5.4775808S" />
<xs:maxInclusive value="P10675199DT2H48M5.4775807S" />
</xs:restriction>
</xs:simpleType>
<xs:element name="guid" nillable="true" type="tns:guid" />
<xs:simpleType name="guid">
<xs:restriction base="xs:string">
<xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}" />
</xs:restriction>
</xs:simpleType>
<xs:attribute name="FactoryType" type="xs:QName" />
<xs:attribute name="Id" type="xs:ID" />
<xs:attribute name="Ref" type="xs:IDREF" />
</xs:schema>
</wsdl:types>
<wsdl:message name="IsAvailableRequestIn">
<wsdl:part name="parameters" element="tns:IsAvailableRequest" />
</wsdl:message>
<wsdl:message name="IsAvailableRequestOut">
<wsdl:part name="parameters" element="tns:IsAvailableRequestResponse" />
</wsdl:message>
<wsdl:portType name="ISyncReply">
<wsdl:operation name="IsAvailableRequest">
<wsdl:input message="svc:IsAvailableRequestIn" />
<wsdl:output message="svc:IsAvailableRequestOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="IOneWay">
</wsdl:portType>
<wsdl:binding name="WSHttpBinding_ISyncReply" type="svc:ISyncReply">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="IsAvailableRequest">
<soap:operation soapAction="https://something.com/service/types/IsAvailableRequest" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="WSHttpBinding_IOneWay" type="svc:IOneWay">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
</wsdl:binding>
<wsdl:service name="SyncReply">
<wsdl:port name="WSHttpBinding_ISyncReply" binding="svc:WSHttpBinding_ISyncReply">
<soap:address location="http://beta.something.com/service/soap12" />
</wsdl:port>
</wsdl:service>
<wsdl:service name="AsyncOneWay">
<wsdl:port name="WSHttpBinding_IOneWay" binding="svc:WSHttpBinding_IOneWay">
<soap:address location="http://beta.something.com/service/soap12" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Notice that it doesn't include the type information (I dunno, should it?) Here is the type schema:
<?xml version="1.0"?>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/SomethingWeb" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/SomethingWeb" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="IsAvailableRequest">
<xs:sequence>
<xs:element minOccurs="0" name="ClientID" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="Token" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="IsAvailableRequest" nillable="true" type="tns:IsAvailableRequest" />
<xs:complexType name="IsAvailableResponse">
<xs:sequence>
<xs:element minOccurs="0" name="Available" nillable="true" type="tns:ArrayOfAvailableData" />
<xs:element minOccurs="0" name="ClientID" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="Location" nillable="true" type="tns:Location" />
<xs:element minOccurs="0" name="Message" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="Request" nillable="true" type="tns:IsAvailableRequest" />
<xs:element minOccurs="0" name="ReturnCode" type="xs:int" />
<xs:element minOccurs="0" name="Token" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="IsAvailableResponse" nillable="true" type="tns:IsAvailableResponse" />
<xs:complexType name="ArrayOfAvailableData">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="AvailableData" nillable="true" type="tns:AvailableData" />
</xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfAvailableData" nillable="true" type="tns:ArrayOfAvailableData" />
<xs:complexType name="AvailableData">
<xs:sequence>
<xs:element minOccurs="0" name="Code" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="Label" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="AvailableData" nillable="true" type="tns:AvailableData" />
<xs:complexType name="Location">
<xs:sequence>
<xs:element minOccurs="0" name="Result" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="Location" nillable="true" type="tns:Location" />
</xs:schema>
How do I get soapUI (and by extension, other java code) to understand my schema?
I just had this problem and sorted it out by adding a default namespace in AppHost via
SetConfig(new EndpointHostConfig {
WsdlServiceNamespace = "http://my.new.namespace.com/types",
});
And decorating my models with
[DataContract(Namespace = "http://my.new.namespace.com/types")]
More details here: https://github.com/ServiceStack/ServiceStack/wiki/SOAP-support

mssoapinit fails to initialize WSDL

The MSSOAP client fails initializing the soap12 interface of the Hello Example project.
var soap = new ActiveXObject('MSSOAP.SOAPClient30');
soap.mssoapinit('http://<server>/ServiceStack.Hello/soap12');
var retval = soap.Hello('test');
The following error is returned:
WSDLPort: WSDLPort:The soap:binding subnode on the binding for port WSHttpBinding_ISyncReply is missing HRESULT=0x1: Incorrect function.
- WSDLService:Processing service SyncReply found no port definitions HRESULT=0x80070057: The parameter is incorrect.
- WSDLReader:Analyzing the WSDL file failed HRESULT=0x80070057: The parameter is incorrect.
- Client:One of the parameters supplied is invalid. HRESULT=0x80070057: The parameter is incorrect.
I am using ServiceStack version 3.95 with IIS 6.0 and.NET 4.0.30319.
This is the WSDL:
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="Soap12"
targetNamespace="http://schemas.servicestack.net/types"
xmlns:svc="http://schemas.servicestack.net/types"
xmlns:tns="http://schemas.servicestack.net/types"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:wsa10="http://www.w3.org/2005/08/addressing"
xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
<wsdl:types>
<xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="anyType" nillable="true" type="xs:anyType" />
<xs:element name="anyURI" nillable="true" type="xs:anyURI" />
<xs:element name="base64Binary" nillable="true" type="xs:base64Binary" />
<xs:element name="boolean" nillable="true" type="xs:boolean" />
<xs:element name="byte" nillable="true" type="xs:byte" />
<xs:element name="dateTime" nillable="true" type="xs:dateTime" />
<xs:element name="decimal" nillable="true" type="xs:decimal" />
<xs:element name="double" nillable="true" type="xs:double" />
<xs:element name="float" nillable="true" type="xs:float" />
<xs:element name="int" nillable="true" type="xs:int" />
<xs:element name="long" nillable="true" type="xs:long" />
<xs:element name="QName" nillable="true" type="xs:QName" />
<xs:element name="short" nillable="true" type="xs:short" />
<xs:element name="string" nillable="true" type="xs:string" />
<xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte" />
<xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt" />
<xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong" />
<xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort" />
<xs:element name="char" nillable="true" type="tns:char" />
<xs:simpleType name="char">
<xs:restriction base="xs:int" />
</xs:simpleType>
<xs:element name="duration" nillable="true" type="tns:duration" />
<xs:simpleType name="duration">
<xs:restriction base="xs:duration">
<xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?" />
<xs:minInclusive value="-P10675199DT2H48M5.4775808S" />
<xs:maxInclusive value="P10675199DT2H48M5.4775807S" />
</xs:restriction>
</xs:simpleType>
<xs:element name="guid" nillable="true" type="tns:guid" />
<xs:simpleType name="guid">
<xs:restriction base="xs:string">
<xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}" />
</xs:restriction>
</xs:simpleType>
<xs:attribute name="FactoryType" type="xs:QName" />
<xs:attribute name="Id" type="xs:ID" />
<xs:attribute name="Ref" type="xs:IDREF" />
</xs:schema>
<xs:schema xmlns:tns="http://schemas.servicestack.net/types" elementFormDefault="qualified" targetNamespace="http://schemas.servicestack.net/types" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="Hello">
<xs:sequence>
<xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="Hello" nillable="true" type="tns:Hello" />
<xs:complexType name="HelloResponse">
<xs:sequence>
<xs:element minOccurs="0" name="Result" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="HelloResponse" nillable="true" type="tns:HelloResponse" />
</xs:schema>
</wsdl:types>
<wsdl:message name="HelloIn">
<wsdl:part name="parameters" element="tns:Hello" />
</wsdl:message>
<wsdl:message name="HelloOut">
<wsdl:part name="parameters" element="tns:HelloResponse" />
</wsdl:message>
<wsdl:portType name="ISyncReply">
<wsdl:operation name="Hello">
<wsdl:input message="svc:HelloIn" />
<wsdl:output message="svc:HelloOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="IOneWay">
</wsdl:portType>
<wsdl:binding name="WSHttpBinding_ISyncReply" type="svc:ISyncReply">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="Hello">
<soap:operation soapAction="http://schemas.servicestack.net/types/Hello" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="WSHttpBinding_IOneWay" type="svc:IOneWay">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
</wsdl:binding>
<wsdl:service name="SyncReply">
<wsdl:port name="WSHttpBinding_ISyncReply" binding="svc:WSHttpBinding_ISyncReply">
<soap:address location="http://<servername>/servicestack/soap12" />
</wsdl:port>
</wsdl:service>
<wsdl:service name="AsyncOneWay">
<wsdl:port name="WSHttpBinding_IOneWay" binding="svc:WSHttpBinding_IOneWay">
<soap:address location="http://<servername>/servicestack/soap12" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

soap parsing with simplexml_load_string i want to parse it i get response with empty body

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<SearchHotelsResponse xmlns="http://tourico.com/webservices/">
<SearchHotelsResult>
<xs:schema id="TWS_HotelList" targetNamespace="http://tourico.com/webservices/TWS_HotelList.xsd" xmlns:mstns="http://tourico.com/webservices/TWS_HotelList.xsd" xmlns="http://tourico.com/webservices/TWS_HotelList.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="TWS_HotelList" msdata:IsDataSet="true" msdata:Locale="en-US" msdata:EnforceConstraints="False">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Hotel">
<xs:complexType>
<xs:sequence>
<xs:element name="RoomType" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Avail" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="offset" form="unqualified" type="xs:byte" use="required" />
<xs:attribute name="status" form="unqualified" type="xs:boolean" use="required" /></xs:complexType>
</xs:element>
<xs:element name="Discount" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="type" form="unqualified" msprop:Generator_UserColumnName="type" msprop:Generator_ColumnVarNameInTable="columtype" type="xs:string" use="required" />
<xs:attribute name="name" form="unqualified" type="xs:string" use="required" />
<xs:attribute name="from" form="unqualified" msdata:DateTimeMode="Unspecified" type="xs:dateTime" use="required" />
<xs:attribute name="to" form="unqualified" msdata:DateTimeMode="Unspecified" type="xs:dateTime" use="required" />
<xs:attribute name="value" form="unqualified" type="xs:string" use="required" /></xs:complexType>
</xs:element>
<xs:element name="Occup" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Supp" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="supId" form="unqualified" type="xs:int" />
<xs:attribute name="name" form="unqualified" type="xs:string" use="required" />
<xs:attribute name="price" form="unqualified" type="xs:double" use="required" /></xs:complexType>
</xs:element>
<xs:element name="Board" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="bbId" form="unqualified" type="xs:int" />
<xs:attribute name="name" form="unqualified" type="xs:string" use="required" />
<xs:attribute name="price" form="unqualified" type="xs:double" use="required" />
<xs:attribute name="default" form="unqualified" msprop:Generator_UserColumnName="default" msprop:Generator_ColumnVarNameInTable="columndefault" msprop:Generator_ColumnPropNameInTable="defaultColumn"
type="xs:boolean" default="false" /></xs:complexType>
</xs:element>
<xs:element name="Room" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Child" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="age" form="unqualified" type="xs:int" /></xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="seqNum" form="unqualified" type="xs:int" use="required" />
<xs:attribute name="adultNum" form="unqualified" type="xs:int" use="required" />
<xs:attribute name="childNum" form="unqualified" type="xs:int" /></xs:complexType>
</xs:element>
<xs:element name="Price" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="offset" form="unqualified" type="xs:int" use="required" />
<xs:attribute name="value" form="unqualified" type="xs:double" use="required" /></xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="occupId" form="unqualified" type="xs:string" use="required" />
<xs:attribute name="maxAdult" form="unqualified" type="xs:int" use="required" />
<xs:attribute name="maxChild" form="unqualified" type="xs:int" use="required" />
<xs:attribute name="price" form="unqualified" type="xs:double" use="required" />
<xs:attribute name="tax" form="unqualified" type="xs:double" use="required" />
<xs:attribute name="dblBed" form="unqualified" type="xs:boolean" />
<xs:attribute name="avrNightPrice" form="unqualified" type="xs:double" use="required" /></xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="productId" form="unqualified" type="xs:string" use="required" />
<xs:attribute name="name" form="unqualified" type="xs:string" use="required" />
<xs:attribute name="nights" form="unqualified" type="xs:byte" use="required" />
<xs:attribute name="startDate" form="unqualified" type="xs:dateTime" use="required" />
<xs:attribute name="isAvailable" form="unqualified" type="xs:boolean" />
<xs:attribute name="roomId" form="unqualified" type="xs:int" />
<xs:attribute name="hotelRoomTypeId" form="unqualified" type="xs:int" /></xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="hotelId" form="unqualified" type="xs:int" use="required" />
<xs:attribute name="provider" form="unqualified" type="xs:string" use="required" />
<xs:attribute name="name" form="unqualified" type="xs:string" use="required" />
<xs:attribute name="address" form="unqualified" type="xs:string" />
<xs:attribute name="category" form="unqualified" type="xs:string" />
<xs:attribute name="bestVal" form="unqualified" type="xs:byte" />
<xs:attribute name="thumb" form="unqualified" type="xs:string" />
<xs:attribute name="starsLevel" form="unqualified" type="xs:double" />
<xs:attribute name="minAverPrice" form="unqualified" type="xs:double" use="required" />
<xs:attribute name="desc" form="unqualified" type="xs:string" use="required" />
<xs:attribute name="location" form="unqualified" type="xs:string" use="required" />
<xs:attribute name="currency" form="unqualified" type="xs:string" />
<xs:attribute name="brandId" form="unqualified" type="xs:int" />
<xs:attribute name="brandName" form="unqualified" type="xs:string" /></xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<TWS_HotelList xmlns="http://tourico.com/webservices/TWS_HotelList.xsd">
<Hotel hotelId="1041291" provider="localTgsProvider" name="Rush Inn - DEMO - DEMO" address="DEMO - Khalid Bin Waleed Road Dubai 44099" category="Tourist Class" bestVal="0" thumb="http://image1.urlforimages.com/1041291/Rush-Front_Thumbnailed.jpg"
starsLevel="2" minAverPrice="148.54" desc="DEMO - DEMO - Families will love to vacation at the Rush Inn with all the amenities and attractions it provides" location="Bur Dubai,Dubai,AE" currency="AED" brandId="0" brandName="">
<RoomType productId="1041291;1180012;34538" name="Standard" nights="1" startDate="2010-08-20T00:00:00-04:00" isAvailable="true" roomId="3" hotelRoomTypeId="1180012">
<Avail offset="0" status="true" />
<Occup occupId="1041291;1180012;34538;2;2;0;1" maxAdult="4" maxChild="2" price="148.54" tax="0" dblBed="true" avrNightPrice="148.54">
<Board bbId="24" name="Room Only" price="0" default="true" />
<Room seqNum="1" adultNum="1" childNum="1">
<Child age="8" />
</Room>
<Price offset="0" value="148.54" />
</Occup>
<Occup occupId="1041291;1180012;34538;2;2;0;2" maxAdult="4" maxChild="2" price="148.54" tax="0" dblBed="false" avrNightPrice="148.54">
<Board bbId="24" name="Room Only" price="0" default="true" />
<Room seqNum="1" adultNum="1" childNum="1">
<Child age="8" />
</Room>
<Price offset="0" value="148.54" />
</Occup>
</RoomType>
</Hotel>
</TWS_HotelList>
</SearchHotelsResult>
</SearchHotelsResponse>
</soap:Body>
</soap:Envelope>
My bet is the question is when you have a SOAP data which is wrapped in an XML packet which function in PHP can you use to extract SOAP data?
I just researched this for an hour because I had a similar issue. What is boils down to is that just because SOAP is wrapped in XML doesn't mean you can use a "simple" ;-) XML function to extract the SOAP information that you want.
You have to bear namespaces in mind. In my case I had this:
<?xml version="1.0" encoding="utf-8"?>
* <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
* <soap:Body><Request_MerchantStatementResponse xmlns="http://www.netcash.co.za/netserv/ncUpload">
* <Request_MerchantStatementResult>2010/11/06 00:00:00\tOBL\t0\t\tOpening Balance\t100000.00\t+\t0.00\t\t\t\t\t\t\t\r</Request_MerchantStatementResult>
* </Request_MerchantStatementResponse></soap:Body>
* </soap:Envelope>
I needed to extract the "Request_MerchantStatementResult" and only that. The solution was to specify the name spaces referenced in my return XML.
$xml = simplexml_load_string($response);
echo $xml->children('http://schemas.xmlsoap.org/soap/envelope/')
->children('http://www.netcash.co.za/netserv/ncUpload')
->Request_MerchantStatementResponse
->Request_MerchantStatementResult;
The problem comes in if you just print_r the result from simplexml_load_string you get nothing. So be sure to specify your name space.
EDIT
I digress, instead of having
echo $xml->children('http://schemas.xmlsoap.org/soap/envelope/')
->children('http://www.netcash.co.za/netserv/ncUpload')
->Request_MerchantStatementResponse
->Request_MerchantStatementResult;
I should have had:
$result = $xml->children('http://schemas.xmlsoap.org/soap/envelope/')
->children('http://www.netcash.co.za/netserv/ncUpload')
->Request_MerchantStatementResponse;
echo $result->Request_MerchantStatementResult;