EDN Admin
Well-known member
Hi there
in my orchestration, i am querying sql table using sql send/receive port which provide me the following output in
SQLRespMsg message<br/>
<br/>
1) <SQLResponse xmlns=" http://SQLService <Data http://SQLService <Data ID="352" /></SQLResponse><br/>
<br/>
Afterwards I try to extract value of ID attribute from SQLRespMsg in a string variable
varID in Expression shape as below<br/>
<span style="font-size:small <br/>
2) varID = xpath(SQLRespMsg.parameters, <a> /SQLResponse/Data/@ID ); <br/>
<br/>
and use this variable varID in another message in message assigment shape as below (using another variable
xmlDoc)<br/>
<span style="font-size:small <br/>
3) xmlDoc.LoadXml(@"<ns0:SQLRequest xmlns:ns0=""http://SQLService" <ns0ataHandler Action=""DELETE"" ID="+ varID +" /></ns0:SQLRequest>");<br/>
<span style="font-size:small SQLReqMsg.parameters = xmlDoc; <br/>
<br/>
followed by send shape to sql port. Now running this orchestration gives me the following error on code (3) above<span style="font-size:x-small
Exception thrown from: segment 1, progress 32
Inner exception: / is an unexpected token. The expected token is " or . Line 1, position 134.
Exception type: XmlException
Source: System.Xml
Please somebody help me resolve it. I think the variable varID has null value after code (2) above. when i try to hardcode ID="222" in code (3) and rerun it, it runs well with no error and deletes the desired data from sql table. Any help will be appreciated.Thanks
<hr class="sig manibest
View the full article
in my orchestration, i am querying sql table using sql send/receive port which provide me the following output in
SQLRespMsg message<br/>
<br/>
1) <SQLResponse xmlns=" http://SQLService <Data http://SQLService <Data ID="352" /></SQLResponse><br/>
<br/>
Afterwards I try to extract value of ID attribute from SQLRespMsg in a string variable
varID in Expression shape as below<br/>
<span style="font-size:small <br/>
2) varID = xpath(SQLRespMsg.parameters, <a> /SQLResponse/Data/@ID ); <br/>
<br/>
and use this variable varID in another message in message assigment shape as below (using another variable
xmlDoc)<br/>
<span style="font-size:small <br/>
3) xmlDoc.LoadXml(@"<ns0:SQLRequest xmlns:ns0=""http://SQLService" <ns0ataHandler Action=""DELETE"" ID="+ varID +" /></ns0:SQLRequest>");<br/>
<span style="font-size:small SQLReqMsg.parameters = xmlDoc; <br/>
<br/>
followed by send shape to sql port. Now running this orchestration gives me the following error on code (3) above<span style="font-size:x-small
Exception thrown from: segment 1, progress 32
Inner exception: / is an unexpected token. The expected token is " or . Line 1, position 134.
Exception type: XmlException
Source: System.Xml
Please somebody help me resolve it. I think the variable varID has null value after code (2) above. when i try to hardcode ID="222" in code (3) and rerun it, it runs well with no error and deletes the desired data from sql table. Any help will be appreciated.Thanks
<hr class="sig manibest
View the full article