-
1. Re: VDB connector to web service returning empty results
jdoyle Jun 1, 2010 1:29 PM (in response to kochk)Hi Kelly,
I want to preface my response with a warning that there are important changes coming in Teiid 7.0 in regards to how XML is treated by Teiid and Teiid Designer. You should take a look at the archives of the teiid-dev mailing list and the associated Jiras to get a sense of the changes. Any pre 7.0 XML based integration will need some level of rework for 7.0.
That said, in the older versions of Teiid this is how the model properties worked.
Example web service; using CapitalCity operation
http://www.oorsprong.org/websamples.countryinfo/CountryInfoService.wso
http://www.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL
Each table with the XMLSOAPConnectorExtensions applied has a property call Namespace Prefixes. The content of this property is used to map the namespace prefixes used within the Column XPaths to resolve the correct namespace for and XML Element. Here's a sample value.
xmlns:tns='http://www.oorsprong.org/websamples.countryinfo' xmlns:mmn0='http://www.oorsprong.org/websamples.countryinfo'
Each Table, and each Column in the tables has properties for 'Name in Source'. The value of this column is set to an XPath to define a nodeset in the case of a table, or an Element or Attrubute in the case of a column. Here are some Samples.
Name in Source for the response table to define the node set is:
/
Name in Source for the CapitalCity Result is:
/mmn0:CapitalCityResponse/mmn0:CapitalCityResult/text()
You could have defined them this way as well:
table: /mmn0:CapitalCityResponse
column: mmn0:CapitalCityResult/text()
Hope that helps.
~john doyle
-
2. Re: VDB connector to web service returning empty results
kochk Jun 2, 2010 6:47 PM (in response to jdoyle)I tried as you suggested, but still am getting a response with null values except for ResponseIn and ResponseOut. The query is being executed through the VDB excecute option. I have put debugging into the web service, so I know it is getting the request and returning a response. I am including some information from my WSDL and Teiid Desiger (6.3) data source to see if that gives any clues:
Snippet from my WSDL file:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="ExampleWebService" targetNamespace="http://com.klk.ws/exampleWebService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://com.klk.ws/exampleWebService" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types>
</types>
<message name="ExampleWebService_process">
<part name="arg0" type="xsd:string">
</part>
</message>
<message name="ExampleWebService_processResponse">
<part name="return" type="xsd:string">
</part>
</message>Teiid Designer (6.3) data source
table "ExampleWebService_processResponse"
Namespace Prefixes = xmlns:tns='http://com.klk.ws/exampleWebService'
XPath for Input = blank
Name = ExampleWebService_processResponse
Name In Source = /tns:processResponse
column "return"
XPath for Input Parameter = blank
Name = return
Name In Source = tns:return/text() Have also tried with just return/text()
Query syntax:
select t2.return
from "exampleVDB"."exampleWsdl.ExampleWebService.process.ExampleWebService_process" t1,
"exampleVDB"."exampleWsdl.ExampleWebService.process.ExampleWebService_processResponse" t2
where t1.arg0="kellie"
and t1.ResponseOut = t2.ResponseIn;
-
3. Re: VDB connector to web service returning empty results
jdoyle Jun 3, 2010 10:18 AM (in response to kochk)Can you also copy in your response document text?
~john
-
4. Re: VDB connector to web service returning empty results
kochk Jun 3, 2010 5:03 PM (in response to jdoyle)<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header></env:Header>
<env:Body>
<tns:processResponse xmlns:tns='http://com.klk.ws/exampleWebService'>
<return>something</return>
</tns:processResponse>
</env:Body>
</env:Envelope> -
5. Re: VDB connector to web service returning empty results
kochk Jun 3, 2010 5:16 PM (in response to kochk)John.. I finally got the inquiry to work. I changed the "Name in Source" field for the response field "return" to "tns:processResponse/return/text()" and then was able to get the value to show up in my vdb query. Thanks so much for all your help. Seeing the raw soap response and using your other suggestions helped to figure it out.
-
6. Re: VDB connector to web service returning empty results
jdoyle Jun 3, 2010 5:34 PM (in response to kochk)Great news.
Keep an eye out for Teiid and Teiid Designer 7.0, they'll be coming out soon.
~john