cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alfred Nathaniel <a.nathan...@bluewin.ch>
Subject Re: Parameterization in a SOAP Call
Date Tue, 01 Mar 2005 20:23:18 GMT
On Tue, 2005-03-01 at 09:29, Geert Josten wrote:

> 
> I'm not sure whether it is possible to put a parameter in an attribute in XSP, just like
in XSL, but 
> you could easily add an XSL transform after the XSP generate. As far as I see and recall,
the XSP 
> generates a XML file with a soap: instruction. This is executed by some soap transformer,
am I 
> right? If so, adding an XSL transform just before that transformer should be easy.

Here is how to generate a dynamic attribute in XSP:

  <xsp:logic>
    String ipaddr = parameters.getParameter("ipaddr");
    String url = "http://" + ipaddr +
":7078/webservices/quoteprice/QuoteSearch";
  </xsp:logic>

  <soap:call url="
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsp:attribute name="url"><xsp:expr>url</xsp:expr></xsp:attribute>
    <m:quickSearch
      xmlns:m="http://quoteprice.sbs/webservices/quotesearch">

> > 
> > I need to parameterize the IP Address so that I can configure it for
> > different deployment environments viz. dev, prod etc. I have been able to
> > put the IP in the sitemap and retrieve it in the XSP, but cant seem to pass
> > it as a call to the SOAP request.
> > I'm trying to use <xsp:expr> for this.
> > 

HTH, Alfred.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message