Web-service query calls can (I would assume) only cope with the @WHERE:PARAM:USER_DEF:..... parameters
So perhaps recode (or take a copy of) the NSQL something like;
WHERE l.lookup_code = @NVL@ ( @where:param:xml:string:/data/license_type/@value@ , @WHERE:PARAM:USER_DEF:STRING:license_type@ )
and call your query over SOAP with a <filter> section;
<Query xmlns="http://www.niku.com/xog/Query">
<Code>my_query_code</Code>
<Filter>
<param_license_type>my_value</param_license_type>
</Filter>
</Query>