XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
- XQuery Help and Discussion (2017)
-> + Issue with Processing Instruct... (2)
-> + problem converting json to XML... (2)
-> + Problem base64 decoding string... (3)
-> + Problems posting multipart for... (5)
-> + trouble with download of price... (2)
-> + Problem with http-post not bei... (3)
-> + path problem, xps_file:writeAl... (9)
-> + Xquery update support? (2)
-> + problem with Stylus studio try... (5)
-> + adding dtd reference to xml ou... (4)
-> + xquery escaping ambarsand when... (3)
-> + Whitespace problem when return... (5)
-> + Problem with namespace prefix ... (5)
-> - Sending via SFTP returns unexp... (1)
-> + Query and Sftp clent (4)
-> + xquery and try - catch (3)
-> + Query + ddtek:http-post optio... (5)
-> + Example files referenced in do... (3)
-> + Automatic Error Detection and ... (3)
-> + Working with result of ddtek:h... (2)
-- [1-20] [21-40] [41-60] Next
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
ling shenSubject: Can I pass a parameter/vaiable as the address in ddtek:wscall?
Author: ling shen
Date: 15 Jul 2008 04:22 PM
When doing wscall, I need to pass the host address as a parmeter. So I tried to use a variable $WebServiceAddress to replace "http://www.ejse.com/WeatherService/Service.asmx".

*************************************************************
declare variable $WebServiceHost as xs:string := "http://12.34.567.89:8888/";

let $WebServiceAddress :=concat($WebServiceHost, "WeatherService/Service.asmx")
return

ddtek:wscall(
<ddtek:location
address=$WebServiceAddress
soapaction="http://ejse.com/WeatherService/GetWeatherInfo"/>,
<tns:UserCreds xmlns:tns="http://ejse.com/WeatherService/">
<tns:UserName>marypelle@acme.org</tns:UserName>
<tns:Password>30Mp75Y8p49s</tns:Password>
</tns:UserCreds>,
<tns:GetWeatherInfo xmlns:tns="http://ejse.com/WeatherService/">
<tns:zipCode>01803</tns:zipCode>
</tns:GetWeatherInfo>
)

*********************************************************
I am getting:
XQQueryException: [DataDirect][XQuery][err:XPST0003]Error at line 10, column 9. No starting quote found for attribute value.
Line: 10
Column: 9
ErrorCode: {http://www.w3.org/2005/xqt-errors}XPST0003
VendorCode: P0007
com.ddtek.xquery3.XQQueryException: [DataDirect][XQuery][err:XPST0003]Error at line 10, column 9. No starting quote found for
attribute value.

If I add the string quote around the variable like this address="$WebServiceAddress",
it will use the literal "$WebServiceAddress" as address, which is not right.

Is there a way to use a vaiable as the address in ddtek:wscall?


Please advise.

Thank you,


Ling



Postnext
Minollo I.Subject: Can I pass a parameter/vaiable as the address in ddtek:wscall?
Author: Minollo I.
Date: 15 Jul 2008 04:32 PM
Try:
ddtek:wscall(
<ddtek:location
address="{$WebServiceAddress}"
soapaction="http://ejse.com/WeatherService/GetWeatherInfo"/>,
<tns:UserCreds xmlns:tns="http://ejse.com/WeatherService/">
<tns:UserName>marypelle@acme.org</tns:UserName>
<tns:Password>30Mp75Y8p49s</tns:Password>
</tns:UserCreds>,
<tns:GetWeatherInfo xmlns:tns="http://ejse.com/WeatherService/">
<tns:zipCode>01803</tns:zipCode>
</tns:GetWeatherInfo>
)

Posttop
ling shenSubject: Can I pass a parameter/vaiable as the address in ddtek:wscall?
Author: ling shen
Date: 15 Jul 2008 06:55 PM
It works.

Thank you!

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.