AnsweredAssumed Answered

Call Web Service XML Parsing error

Question asked by comicrage on Oct 8, 2014

Hi,

 

I got an XML parsing error. I am using a Call Web Service to get an array of email string like the following   


<s:Envelope xmlns:s="http://schema.xmlsoap.org/soap/envelope/">

     <s:Header>

          <ActivityId CorrelationId="dc05ef42-cf46-47e5-b3f1-808570b5c2dc" xmlns="http://schema.microsoft.com/2004/09/SeviceModel/Diagonostics">

               dc05ef42-cf46-47e5-b3f1-808570b5cdc</ActivityId>

     </s:Header>

     <s:Body>

        <GetTaskReviewerResponse xmlns="http://tempuri.org/">

             <GetTaskReviewerResult xmlns=a="http://schemas.microsoft.com/2003/10/Serialization/Arrays xmlns:i="http://www.w3.org/2001/XMLSchema-Instance">

                <a:string>christopher.baxer@myemail.gov</a:string>

                <a:string>jennifer.yan@myemail.gov </a:string>

                <a:string>john.ya@myemail.gov</a:string>           

          <GetTaskReviewerResponse>
     </s:Body>

</s:Envelope>

 

After the call web service, i send a notification email to view the raw XML and get the following

 

<a:string xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">christopher.baxer@myemail.gov

<a:string xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">jennifer.yan@myemail.gov</a:string>

<a:string xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> john.ya@myemail.gov</a:string>

 

In the Query XML, I used XPath and here is the path

 

/s:Envelope/s:Body/defaultNS:GetTaskReviewersResponse/defaultNS:GetTaskReviewersResult/a:string

 

The ERROR, after the Query XML, I view the count and content of the collection, it is 1 instead of 3 and

it concatenated all the email string into one line like the following

 

christopher.baxer@myemail.govjennifer.yan@myemail.govjohn.yee@myemail.gov

 

My questions 1. How can I parse the email correctly to separate the email into my collection variables? 2. What steps did I forget or did wrong?

Outcomes