Monday, October 25, 2010

"ORAMED-01003:[Invalid assign source expression]Invalid source used while assigning"


I did an "Assign Value" in a Mediator component as follows. Basically, what this does is use an XPath condition to choose from 1 of 2 endpoints and then override the endpointURI, thus mimicking dynamic routing.

if ('1' = '1') then ' http://server1:8001/wsdl1' else ' http://server2:8001/wsdl2'
property: endpointURI
Unfortunately, at runtime, I received the following error:
<env:Envelope xmlns:env="">
      <faultstring> oracle.tip.mediator.infra.exception.MediatorException: ORAMED-01003:[Invalid assign source expression]Invalid source used while assigning. Check if source expression are valid. ["if ('1' = '1') then '
http://server1:8001/wsdl1' else 'http://server2:8001/wsdl2'"]Possible Fix:Modify source for valid expression


For some reason, the "Assign Values" field does not support certain XPath features, such as conditions.

To work around this, I moved the statement to my XSL as follows:
  <xsl:when test="'1' = '1'">
    <xsl:variable name="LocationOut"
    <xsl:variable name="LocationOut"

Applicable Versions:
  • Oracle SOA Suite 11g (

No comments: