on 11-29-2007 5:29 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
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?
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...
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?
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?
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
User | Count |
---|---|
3 | |
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.