cancel
Showing results for 
Search instead for 
Did you mean: 

Conversion of web service output to Rowsets format

Former Member
0 Kudos

Hi forum,

I am trying to consume a web service in BLS transaction and want to build a graph over the output. The output of web service is of type string( Complex XML returned in the form of string) which is to be converted in to rowsets format. But i cant see the complex type at design time as the type of output is string and i cant parse the web service output.

I tried to use XSL transformation but that seems to be difficult.

Can any one tell me how to solve this problem ?

Thanks a lot,

Mike.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sam,

I am trying to do what you said. But, i am unable to assign the output of xmldecode() to a local XML property as xmldecode is also returning a string. xmldecode and xmlencode functions take a string as input and give a string as output.

And, can you tell me what should be stored in reference document ? The XML response structure can be directly stored in local XML property and that can be used for design time mapping.

Thanks a lot.

Regards,

Mike.

0 Kudos

Michael,

As long as the string is valid XML then the conversion from String to XML in BLS is implicit. Just make sure that it has a valid XML structure.

The reference document loader action should be configured to point to the expected XML structure returned within the web service call. Then at the top menu of the BLS editor select Assign Reference document and point to the local XML property and assign the reference doc XML to that. Now when you exit and look at the local property you will notice that it now appears like the XML from the reference document. This will make it easier to build your links using the local property without actually assigning a value to it during runtime. This is covered in the TPMII1 class if you have your class materials.

Hope this helps.

Sam

0 Kudos

Michael,

Create a Local XML property and assign the encoded XML string to it via the xmldecode() function. Next assign a reference document to the local property that represents what the XML response will look like, makes it easier to assign links at design time (See Help Docs). That's all that you need to do.

Sam

Former Member
0 Kudos

Hi Sam,

I tried to follow a bit different approach but which more or less behaves like what you said.

First, I replaced the output of web service with < and > inplace of "&lt" and "&gt" respectively and saved the output of the web service to a temporary file (.xml ) .

Second, created a local property of web service's complex type(which i know from WSDL) and then using xmlloader action i read back the file and assigned to local property. Now, delete the temporary file.

I tried to do it with out creating a temporary file but i can't assign the string(obtained after replacements) to the local XML property.

The one you said sounds to be a better approach and i will try to do what you said.

Thank you very much Sam

Mike.

Edited by: Michael Samuel on Dec 27, 2007 5:44 PM