cancel
Showing results for 
Search instead for 
Did you mean: 

Web Service to xml to bls to xacute query formatting

Former Member
0 Kudos

Hi.

I have a BLS calling a web service which returns a data set in the xMII XML format. I take that output and put it in a xml transaction output property and try to read it with an xacute query. (obviously I will be doing more manipulations to the data in the bls once i get this issue resolved). The query returns a blank page when tested.

OK, so I take the same xml output, and in the same bls use the Write_File action to create an xml file, then use the XMLLoader action to read in that file back into the bls, assign the results of the xmlLoader to the xml transaction output property and try to read that output with an xacute query. I get the data when I test the query.

Now, I don't touch the format between the web service and the file or after I load the file. How come the xacute query can read one transaction output and not the other?

I have taken both transaction propertie values from a trace log and compared the strings and find no difference between the return from the web service and the result of the xmlLoader. I don't want to take the output of the web service and write it to a file just to get in into an xml format that works properly.

Accepted Solutions (0)

Answers (1)

Answers (1)

jcgood25
Active Contributor
0 Kudos

Do you possibly have an issue with string to xml property conversion from the output of the webservice? You can't always assign a string that looks like xml into an xml property and expect it to implicitly convert the types.

Regards,

Jeremy

Former Member
0 Kudos

I am sure that is the root cause, but how do I do an explicit type conversion without going through the output to file and load xml step? What else is needed?

The return of the Web Service is an XML that contains an XML string in the xMII format. I can look at that string and it looks correct (Though xacute doesn't recognize the string as an xml structure). I can take that string and put it in an XML transaction property and it looks correct (the reference in the BLS is: SqlXml2.SQLXML2Response{/ns1:SQLXML2Response/ns1:SQLXML2Return}). I can take that XML variable and output to a file and then load that file and it actually is correct (though the content of the file and the return string from the web service are identical). So, I can see that the type conversion takes place when I load the xml file but I haven't found the action that will do the type conversion otherwise even though the "conversion" doesn't seem to require changing the content at all. Have I missed something?

jcgood25
Active Contributor
0 Kudos

Your web service call response does not appear to be coming from xMII, why would you have another entity return xMII native XML format? Wouldn't it make more sense to return the data and then construct the document inside BLS?

How about trying to link the response of your webservice into the Output of an IllumDoc action?

Former Member
0 Kudos

Since I could do it that way I was just trying to save some compatibility issues. I thought that if it was formatted in xMII's XML format I would have no problems reading the data (ha). I tried the illumdoc action before but I may not have put the string on the right value. I'll try that again and let you know...

Former Member
0 Kudos

J-Good - did the fix to the StringToXml action ever make it into a release or hotfix? That will do the trick.

Former Member
0 Kudos

I tried the IllumDoc as well as the string to xml function (the documentation showed this to be unsuitable, but I tried it anyway), both of which I had looked at before, and neither would work. It would seem that there should be a way to explicitly declare a value as an XML or that there be a better implicit function short of writing it out as a file and reading it back in.

The problem is that the web service we are accessing will only return a string value containing the results of a query against a data source. We have some control of the format of the string and chose to use an XML format for compatibility and so chose to use the xMII format just to make sure.

Any other ideas?

Former Member
0 Kudos

Which version of xMII? SR2? SR3?

Former Member
0 Kudos

Sorry, we are at 11.5 sr3

Former Member
0 Kudos

Check with Jeremy to see if the StringToXml fix is in SR3 or went into a separate hotfix. That should do the trick for you.

Former Member
0 Kudos

One other quick question:

Is the desired XML coming back to you as "XML elements" in the web service response or as a an encoded string within a single element in the web service response?

I was assuming the latter, but if the former, you should be able to just do an "assign XML". Also, I would double and triple check that the XML format coming back from the web service is exactly xMII format. Maybe you could post an example?

Former Member
0 Kudos

It is a string within a single xml element.

Former Member
0 Kudos

Then the StringToXml action is exactly what you need. Check with Jeremy regarding the fix. Use StringToXml, then map the output of that action to your transaction output parameter.

Former Member
0 Kudos

It must be in a hot fix and not in SR3. The StringToXML action I have causes the transaction to go off into the weeds and never return. Could someone tell me where the "fixed" one is?

erik_schrampf
Active Participant
0 Kudos

This is a bug and is fixed in SR4 which should be out at the beginning of next year. Currently the StringtoXML works similary to the StringListToXML. This will be fixed the way it will work not is if you have an xml structure in a string format it will convert this to an actual XML file which you can navigate through and add values to nodes.

Erik

Former Member
0 Kudos

Hi, Erik.

Why not issue a hotfix?

erik_schrampf
Active Participant
0 Kudos

Rick/Morgan,

Here is the hotfix note number to fix this problem 1041404.

Enjoy