![]() |
| ||
| Trouble with SOAP and xslt I'm trying to run a SOAP response from a web service through an xslt translation and place it in a web page via an Ajax call. The web service and javascript all works fine. I am having a problem accessing specific nodes inside the xslt file. Specifically: when I run the SOAP response through <xsl:for-each select="//*"> I can get all the correct node names in the response and their associated values. However when I try to access via <xsl:for-each select="//getStringResult"> I get absolutely nothing. Here's an example of the SOAP response <?xml version="1.0" encoding="utf-i"?> Here's the xslt file <?xml version="1.0"?> Any idea why I'm having problems with my XPath usage? Thanks. |
| ||
| Re: Trouble with SOAP and xslt Okay, maybe if I show the supporting javascript: function callService() {
The only function that is called is 'callService'. That function makes the web service call and then retrieves the xslt file. Both of these are done via Ajax. I'm sure I'm missing something pretty damned basic .. but I could really use some help. Thanks. |
| ||
| Re: Trouble with SOAP and xslt Found the answer. I was not defining the namespace for 'soap:' and thus the xslt translator couldn't find 'soap:Envelope' or 'soap:Body' tags. On top of that I had to set up a namespace for the 'http://ramabahama.net/webservices' name space. I used 'roas' and once I included xmlns:roas=http://ramabahama.net/webservices' to the xsl:stylesheet tag I could reference the returned values as 'roas:[fill in tag name here]'. |
| All times are GMT -4. The time now is 3:59 pm. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC