I suggest first writing all the responses to a temporary file, and than reading that file with the xml libname engine. Instead of the static filename and file statements you can use the more dynamic filename(), fopen(), etc functions inside the data step. Taking your example you would create 4 temporary files inside the data step and then using them in the soapweb() function. But maybe you can also re-use the one single file (reqest - in your example) - have you tried that? If everything is working fine, you could also try to dynamically create xml librefs pointing to dynamically created files inside the data step ( libname() function ). But I think this would be slower then the "first write all responses to a file" approach. If your xml is simple enough, you could avoid using xml libname engine, and reading the SOAP responses directly with string processing functions. If you have a working example, that calls a public web service with static methods (PROC SOAP), you could share it here, so we can enhance it.
... View more