Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7087171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:38:27+00:00 2026-05-28T07:38:27+00:00

Here is my code for the soap request and printout of xml: header(Content-Type:text/xml); $client

  • 0

Here is my code for the soap request and printout of xml:

header("Content-Type:text/xml");

$client = new SoapClient("http://---.---.-----------.--/EMSAPI/Service.asmx?wsdl", array('trace'=>1));

date_default_timezone_set("America/Chicago");

$result = $client->GetBookings(array('UserName' => "api", "Password" => "apitest", "StartDate" => date("H:i:s", strtotime("Today")), "EndDate"=> date("H:i:s", strtotime("Today")), "Buildings" =>array("int" => "1"), "Statuses" =>array("int"=>"1001"), "ViewComboRoomComponents" => true ));

$resString = html_entity_decode($client->__getLastResponse());

echo str_replace('<?xml version="1.0" encoding="utf-8"?>', '<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href="bookings.xsl" type="text/xsl"?>', $resString);

I would like to be able to format this XML layout and sort it by time:

<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href="bookings.xsl" type="text/xsl"?><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><GetBookingsResponse xmlns="http://DEA.EMS.API.Web.Service/"><GetBookingsResult><Bookings>
  <Data>
    <BookingDate>2012-01-20T00:00:00-06:00</BookingDate>
    <StartBookingDate>2012-01-20T00:00:00-06:00</StartBookingDate>
    <RoomDescription>Memorial N103 Stotler</RoomDescription>
    <TimeEventStart>2012-01-20T10:00:00-06:00</TimeEventStart>
    <TimeEventEnd>2012-01-20T12:00:00-06:00</TimeEventEnd>
    <GroupName>Asian Affairs Center</GroupName>
    <EventName>TaLK</EventName>
    <SetupTypeDescription>Chairs In Rows</SetupTypeDescription>
    <SetupCount>15</SetupCount>
    <ReservationID>60750</ReservationID>
    <EventCoordinator>CJ</EventCoordinator>
    <GroupID>4036</GroupID>
    <VIP xml:space="preserve"> </VIP>
    <VIPEvent>false</VIPEvent>
    <ClosedAllDay>false</ClosedAllDay>
    <OpenTime>1900-01-01T07:00:00-06:00</OpenTime>
    <CloseTime>1900-01-01T00:00:00-06:00</CloseTime>
    <GroupTypeDescription>Campus Use</GroupTypeDescription>
    <EventTypeDescription>Lecture/Seminar</EventTypeDescription>
    <Contact>Jessica Fitzgerald 882-6902</Contact>
    <AltContact />
    <BookingID>322710</BookingID>
    <TimeBookingStart>2012-01-20T08:42:00-06:00</TimeBookingStart>
    <TimeBookingEnd>2012-01-20T12:15:00-06:00</TimeBookingEnd>
    <GMTStartTime>2012-01-20T14:42:00-06:00</GMTStartTime>
    <GMTEndTime>2012-01-20T18:15:00-06:00</GMTEndTime>
    <TimeZone>CT</TimeZone>
    <BuildingCode>Memorial</BuildingCode>
    <Building>Memorial Union Meeting Rooms</Building>
    <RoomCode>N103 Stotler</RoomCode>
    <Room>N103 Stotler Lounge All</Room>
    <RoomID>2409</RoomID>
    <BuildingID>1</BuildingID>
    <StatusID>1001</StatusID>
    <StatusTypeID>-14</StatusTypeID>
    <EventTypeID>2420</EventTypeID>
    <GroupTypeID>2305</GroupTypeID>
    <DateAdded>2011-12-30T11:13:47.81-06:00</DateAdded>
    <AddedBy>Chareba Johnson</AddedBy>
    <DateChanged>2012-01-17T11:37:22.38-06:00</DateChanged>
    <ChangedBy>Kaitlin Hinkle</ChangedBy>
  </Data>

</Bookings></GetBookingsResult></GetBookingsResponse></soap:Body></soap:Envelope>

Right now, I am just trying to get something to appear by applying the stylesheet. So this is what I have so far:

<xsl:template match="//soap:Envelope/GetBookingsResponse/GetBookingsResult/Bookings/Data">
    <xsl:apply-templates select="*/*/EventName"/>
</xsl:template>

</xsl:stylesheet>

Help would be greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:38:28+00:00Added an answer on May 28, 2026 at 7:38 am

    If you don’t know anything about XSL, don’t go this way and use SimpleXML to create a data structure you know how to deal with.

    ZVON used to have good tutorial on XSLT, they messed up the navigation since then but you can still use them: http://zvon.org/comp/r/tut-XSLT_1.html#Pages~Contents

    EDIT:

    Find below a version that works (tested on my machine using xsltproc). Pay attention to the namespace declarations, which was mostly where it fails for you (I guess).

    <xsl:stylesheet version="1.0"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
                    xmlns:ws="http://DEA.EMS.API.Web.Service/">
        <xsl:template match="/soap:Envelope//ws:Data">
            <Name><xsl:value-of select="ws:EventName"/></Name>
        </xsl:template>
    </xsl:stylesheet>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the code I'm using to generate the request headers: $headers = array( new
In a SOAP client request, the header needs this line: <NS2:Header Name=Foo>Bar<NS2:Header> So I
Hello I am trying to do a SOAP request here is my code: #
See here: http://code.google.com/p/ie7-js/ Does anyone have any experience or remarks about this javascript? Is
I have this code here, which is intended to allow any type of arguments:
I got this from a Soap client request: Exception: SoapFault exception: [soap:Client] Server was
Well here is the API I'm trying to use: http://www.hotelscombined.com/api/LiveRates.asmx?op=HotelSearch Here is the code
So I'm having some problems adding a wsse header to my SOAP request. #!/usr/bin/perl
I'm using Zend_Soap_Client object for sending a soap request to another application here is
Ok the error is showing up somewhere in this here code if($error==false) { $query

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.