on 10-13-2006 10:32 AM
Hi Everyone,
I am working on a BPm scenario, where the data which I get in BPM is of the format:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<SubmitBatchPwResponse xmlns="http://AltInn.no/webservices/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<SubmitBatchPwResult> <b><?xml version="1.0"?><DataBatchInReceipt schemaVersion="1.0" batchId="sap12" enterpriseSystemId="826" <i><b>status="OK"</b></i> ><DataUnitInReceipt sendersReference="sap6" submissionReference="{0D68714D-DA80-4987-886C-540376BED791}" status="OK" timeReceived="2006-10-13T11:19:25"><Message><MessageEntry type="Default" logged="2006-10-13T11:19:26">Sendt til Altinn</MessageEntry></Message></DataUnitInReceipt></DataBatchInReceipt></b> </SubmitBatchPwResult>
</SubmitBatchPwResponse>
Where the bold part is the XML string inserted into SubmitBatchPwResult.
Now the issue is I need to check the attribute 'status' . If status is 'Ok' then the first branch of switch should execute or else the second branch should execute.
How can I check 'status' for it's value in switch condition.
I have tried various combinations but it doesn't work.
In the switch condition editor the following are the ones i have tried:
1) WSDL_1_RES./p1:SubmitBatchPwResponse/p1:SubmitBatchPwResult ≈ *status="OK"
2) WSDL_1_RES./p1:SubmitBatchPwResponse/p1:SubmitBatchPwResult/p1:DataBatchInReceipt/@status ≈ OK
3)WSDL_1_RES./p1:SubmitBatchPwResponse/p1:SubmitBatchPwResult/DataBatchInReceipt/@status ≈ OK
Here WSDL_1_RES is the incoming abstract interface which contains the above mentioned message.
Pls advice.
Cheers,
Ashish
I finally found the answer:
The XPATH expression has to be: <b>WSDL_1_RES./p1:SubmitBatchPwResponse/p1:SubmitBatchPwResult ≈ status="OK"</b>
For the 2nd loop where I have to check that status is not OK, there i use the Xpath expression:
WSDL_1_RES./p1:SubmitBatchPwResponse/p1:SubmitBatchPwResult ≈ status="++"*
This is because in second condition the status can be anything but OK and it has to be more than 2 characters as per the XSD provided by the webservice party.
Thanks Prakash for your continual assistance.
Cheers,
Ashish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.