Sponsored Content
Top Forums Shell Programming and Scripting web service call: curl output to xsltproc input Post 302539247 by fpmurphy on Friday 15th of July 2011 10:29:43 PM
Old 07-15-2011
Why can you not hardcode in the name of the stylesheet?

Oh, and by the way, your stylesheet is incorrect. Compare the output of your stylesheet and the following stylesheet
Code:
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                              xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                              xmlns:ns2="http://server/webservices/operations/schema">

   <xsl:output method="text" />

   <xsl:template match='soapenv:Envelope'>
       <xsl:apply-templates select="soapenv:Body"/>
   </xsl:template>

   <xsl:template match='soapenv:Body'>
       <xsl:apply-templates select="ns2:HolidayResponse"/>
   </xsl:template>

   <xsl:template match='ns2:HolidayResponse'>
       <xsl:apply-templates select="ns2:Status"/>
   </xsl:template>

   <xsl:template match='ns2:Status'>
      <xsl:value-of select="." />
   </xsl:template>


</xsl:stylesheet>

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need to Call Web Service from Unix

I'm a Unix and C programming newbie, and I've been tasked with calling a web service from a legacy Unix app... I've come across libxml2 and libsoup, gnome's libraries for XML/SOAP processing... But I'm seeking guidance on the development process... :o (0 Replies)
Discussion started by: jahooper
0 Replies

2. Shell Programming and Scripting

How to call a web service using perl

Hello to all, What i would like to know is how to call a web service using perl. Where can i find documentation that easy describes this procedure? Any advices will be more tha welcome. Thank you. Best Regards, Chriss_58 (3 Replies)
Discussion started by: chriss_58
3 Replies

3. UNIX for Dummies Questions & Answers

curl command with web pages

I can't quite seem to understand what the curl command does with a web address. I tried this: curl O'Reilly Media: Tech Books, Conferences, Courses, News but I just got the first few lines of a web page, and it's nowhere on my machine. Can someone elaborate? (2 Replies)
Discussion started by: Straitsfan
2 Replies

4. Shell Programming and Scripting

Call web service from Shell

Hello All, I have to import data from xml file to mysql database multi-time a day. I think it is better to write a tool to help this. So I write a web service in php. I don't know that if we can call a web service via shell script. If it can, I think we can create a cron job to help run it... (2 Replies)
Discussion started by: hapytran
2 Replies

5. Shell Programming and Scripting

How to call perl web service from javascript?

Hi, I would like to call the below perl web service from javascript .Any help would be appreciated.I am new to web services.Please do the needful. Server Program(Perl Web Service) #!/usr/bin/perl use lib '/usr/lib/perl5/5.8.8/SOAP-Lite-0.65_3/lib'; use SOAP::Transport::HTTP; use Demo;... (3 Replies)
Discussion started by: liyakathali
3 Replies

6. UNIX for Dummies Questions & Answers

Curl --cert to call a servlet

Hi, For one of our requirements, we are using curl command from a Linux box to call the servlet using PEM certificates type. Once servlet is trigger, the data will be loaded through servlet. If the servlet thread is completed successfully, then the control should return to Unix and based on... (0 Replies)
Discussion started by: subhransun
0 Replies

7. UNIX for Beginners Questions & Answers

How to use cURL to download web page with authentification (form)?

Hello, I'm new in the forum and really beginer, and also sorry form my bad english. I use linux and want to create little program to download automaticaly some pdf (invoices) and put in a folder of my computer. I learn how to do and programme with ubuntu but the program will be implemented... (1 Reply)
Discussion started by: MarcelOrMittal
1 Replies

8. Linux

Curl login to web page

Hello dears, I am trying to log in the website using curl but no luck so far. The web page Content-Type is : text/html;charset=ISO-8859-1 I try the following command using curl: curl \ --header "Content-type: text/html" \ --request POST \ --data '{"user": "someusername",... (0 Replies)
Discussion started by: Vit0_Corleone
0 Replies

9. Shell Programming and Scripting

Working web service call not working with curl

Hello, Newbie here, I have a perfectly well working web service call I can issue from chrome (PC Windows 10) and get the results I want (a dimmer being turned on in Fibaro Home Center 2 at level 40) I am not allowed to post urls but the below works with http and :// and... (3 Replies)
Discussion started by: abigbear
3 Replies

10. IP Networking

CurL command Rest API call with oauth 2.0 secutity error

Hi I need to get rates for different security form REST API . the API is oauth 2.0 secured. i need to use curl command to get json response from api . token URL - is HTTP data URL is - HTTPS when trigger my command from bash script it passing and failing intermittently with... (0 Replies)
Discussion started by: shobhit.working
0 Replies
CURLINFO_RESPONSE_CODE(3)				     curl_easy_getinfo options					 CURLINFO_RESPONSE_CODE(3)

NAME
CURLINFO_RESPONSE_CODE - get the last response code SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RESPONSE_CODE, long *codep); DESCRIPTION
Pass a pointer to a long to receive the last received HTTP, FTP or SMTP response code. This option was previously known as CURLINFO_HTTP_CODE in libcurl 7.10.7 and earlier. The stored value will be zero if no server response code has been received. Note that a proxy's CONNECT response should be read with CURLINFO_HTTP_CONNECTCODE(3) and not this. Support for SMTP responses added in 7.25.0. PROTOCOLS
HTTP, FTP and SMTP EXAMPLE
CURL *curl = curl_easy_init(); if(curl) { CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); res = curl_easy_perform(curl); if(res == CURLE_OK) { long response_code; curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code); } curl_easy_cleanup(curl); } AVAILABILITY
Added in 7.10.8. CURLINFO_HTTP_CODE was added in 7.4.1. RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. SEE ALSO
curl_easy_getinfo(3), curl_easy_setopt(3), CURLINFO_HTTP_CONNECTCODE(3), libcurl 7.54.0 February 03, 2016 CURLINFO_RESPONSE_CODE(3)
All times are GMT -4. The time now is 04:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy