parsing soap response

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

parsing soap response

mirans
I really need help on parsing soap results … I just don't get it :-)

[output:(xml:$response)] gives:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GenerateApiKeyResponse xmlns="http://www.chili-publisher.com/"> <GenerateApiKeyResult>&lt;apiKey succeeded="true" key="wqaelVtDSPKPQtHHeZYOlV24F8sfgcBpz+pBaPRNSIzLtjyW2jvxlEvIIRV74F+N2hk88kXpNnOBYHWqCKjKeQ==" validTill="2013-11-26 19:09:26Z" superAdmin="true" /&gt;</GenerateApiKeyResult> </GenerateApiKeyResponse> </soap:Body> </soap:Envelope>

[output:$response->contents] gives:

<apiKey succeeded="true" key="wqaelVtDSPKPQtHHeZYOlV24F8sfgcBpz+pBaPRNSIzLtjyW2jvxlEvIIRV74F+N2hk88kXpNnOBYHWqCKjKeQ==" validTill="2013-11-26 19:09:26Z" superAdmin="true" />

I need to extract the values of 'apiKey succeeded' and the value for 'key'
But I have no clue how to do this (tried with xml_tree, tried all the xml tags)

I hope somebody can help me with this ?
The help will be much appreciated!

kind regards, miran



#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: parsing soap response

Tim Taplin
I believe that what you are looking for is the xml->attributes tag. It looks like you've already retrieved the apiKey xml object, and just need to retrieve the attribute values, like a javascript property.

it may help to view the object as such:
<apiKey
        succeeded="true"
        key="wqaelVtDSPKPQtHHeZYOlV24F8sfgcBpz+pBaPRNSIzLtjyW2jvxlEvIIRV74F+N2hk88kXpNnOBYHWqCKjKeQ=="
        validTill="2013-11-26 19:09:26Z"
        superAdmin="true"
/>
Assuming you have already cast $response as an xml object as in your example,
you can retrieve those attributes as an array of pairs by doing:
        var('apiKey' = $response->attributes);

        var('succeeded' = $apiKey->find('succeeded'));

        I always have to test to see whether that find will return the value or the entire pair.

Hope that gets you started.

Tim Taplin

On Nov 26, 2013, at 1:18 AM, mirans <[hidden email]> wrote:

> I really need help on parsing soap results … I just don't get it :-)
>
> [output:(xml:$response)] gives:
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GenerateApiKeyResponse xmlns="http://www.chili-publisher.com/"> <GenerateApiKeyResult>&lt;apiKey succeeded="true" key="wqaelVtDSPKPQtHHeZYOlV24F8sfgcBpz+pBaPRNSIzLtjyW2jvxlEvIIRV74F+N2hk88kXpNnOBYHWqCKjKeQ==" validTill="2013-11-26 19:09:26Z" superAdmin="true" /&gt;</GenerateApiKeyResult> </GenerateApiKeyResponse> </soap:Body> </soap:Envelope>
>
> [output:$response->contents] gives:
>
> <apiKey succeeded="true" key="wqaelVtDSPKPQtHHeZYOlV24F8sfgcBpz+pBaPRNSIzLtjyW2jvxlEvIIRV74F+N2hk88kXpNnOBYHWqCKjKeQ==" validTill="2013-11-26 19:09:26Z" superAdmin="true" />
>
> I need to extract the values of 'apiKey succeeded' and the value for 'key'
> But I have no clue how to do this (tried with xml_tree, tried all the xml tags)
>
> I hope somebody can help me with this ?
> The help will be much appreciated!
>
> kind regards, miran
>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: parsing soap response

mirans
thanks for your response, I already tried that and as a result I just get 'array'

Now I try to get the key with String_ReplaceRegExp, but my regex skills aren't that great (none at all actually)
maybe someone can help me with the right syntax ?
I have:

[var:'content'=(xml:$response)->contents]
[var:'key1'=(String_ReplaceRegExp:$content,-find='<apiKey succeeded=\"true\"\\skey=\"',-replace='')]

but that only gives me half of the wanted result:
wqaelVtDSPLfs7VzW6g+VcKGvK0Sfd7aqKWikBZzb7tTy_TulA8zCt3uoOtVYECv_sdeV+N+JI_i5pakLWrFHQ==" validTill="2013-11-27 06:02:44Z" superAdmin="true" />

kind regards, miran




Op 26 nov. 2013, om 15:29 heeft Tim Taplin <[hidden email]> het volgende geschreven:

> I believe that what you are looking for is the xml->attributes tag. It looks like you've already retrieved the apiKey xml object, and just need to retrieve the attribute values, like a javascript property.
>
> it may help to view the object as such:
> <apiKey
> succeeded="true"
> key="wqaelVtDSPKPQtHHeZYOlV24F8sfgcBpz+pBaPRNSIzLtjyW2jvxlEvIIRV74F+N2hk88kXpNnOBYHWqCKjKeQ=="
> validTill="2013-11-26 19:09:26Z"
> superAdmin="true"
> />
> Assuming you have already cast $response as an xml object as in your example,
> you can retrieve those attributes as an array of pairs by doing:
> var('apiKey' = $response->attributes);
>
> var('succeeded' = $apiKey->find('succeeded'));
>
> I always have to test to see whether that find will return the value or the entire pair.
>
> Hope that gets you started.
>
> Tim Taplin
>
> On Nov 26, 2013, at 1:18 AM, mirans <[hidden email]> wrote:
>
>> I really need help on parsing soap results … I just don't get it :-)
>>
>> [output:(xml:$response)] gives:
>>
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GenerateApiKeyResponse xmlns="http://www.chili-publisher.com/"> <GenerateApiKeyResult>&lt;apiKey succeeded="true" key="wqaelVtDSPKPQtHHeZYOlV24F8sfgcBpz+pBaPRNSIzLtjyW2jvxlEvIIRV74F+N2hk88kXpNnOBYHWqCKjKeQ==" validTill="2013-11-26 19:09:26Z" superAdmin="true" /&gt;</GenerateApiKeyResult> </GenerateApiKeyResponse> </soap:Body> </soap:Envelope>
>>
>> [output:$response->contents] gives:
>>
>> <apiKey succeeded="true" key="wqaelVtDSPKPQtHHeZYOlV24F8sfgcBpz+pBaPRNSIzLtjyW2jvxlEvIIRV74F+N2hk88kXpNnOBYHWqCKjKeQ==" validTill="2013-11-26 19:09:26Z" superAdmin="true" />
>>
>> I need to extract the values of 'apiKey succeeded' and the value for 'key'
>> But I have no clue how to do this (tried with xml_tree, tried all the xml tags)
>>
>> I hope somebody can help me with this ?
>> The help will be much appreciated!
>>
>> kind regards, miran
>>
>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: parsing soap response

Tim Taplin
Can you possibly send me the full response string? or some code to retrieve the soap response?
Please post it to me off list.

I'll poke at it and work out the right syntax.

Tim Taplin

On Nov 26, 2013, at 12:06 PM, mirans <[hidden email]> wrote:

> thanks for your response, I already tried that and as a result I just get 'array'
>
> Now I try to get the key with String_ReplaceRegExp, but my regex skills aren't that great (none at all actually)
> maybe someone can help me with the right syntax ?
> I have:
>
> [var:'content'=(xml:$response)->contents]
> [var:'key1'=(String_ReplaceRegExp:$content,-find='<apiKey succeeded=\"true\"\\skey=\"',-replace='')]
>
> but that only gives me half of the wanted result:
> wqaelVtDSPLfs7VzW6g+VcKGvK0Sfd7aqKWikBZzb7tTy_TulA8zCt3uoOtVYECv_sdeV+N+JI_i5pakLWrFHQ==" validTill="2013-11-27 06:02:44Z" superAdmin="true" />
>
> kind regards, miran
>
>
>
>
> Op 26 nov. 2013, om 15:29 heeft Tim Taplin <[hidden email]> het volgende geschreven:
>
>> I believe that what you are looking for is the xml->attributes tag. It looks like you've already retrieved the apiKey xml object, and just need to retrieve the attribute values, like a javascript property.
>>
>> it may help to view the object as such:
>> <apiKey
>> succeeded="true"
>> key="wqaelVtDSPKPQtHHeZYOlV24F8sfgcBpz+pBaPRNSIzLtjyW2jvxlEvIIRV74F+N2hk88kXpNnOBYHWqCKjKeQ=="
>> validTill="2013-11-26 19:09:26Z"
>> superAdmin="true"
>> />
>> Assuming you have already cast $response as an xml object as in your example,
>> you can retrieve those attributes as an array of pairs by doing:
>> var('apiKey' = $response->attributes);
>>
>> var('succeeded' = $apiKey->find('succeeded'));
>>
>> I always have to test to see whether that find will return the value or the entire pair.
>>
>> Hope that gets you started.
>>
>> Tim Taplin
>>
>> On Nov 26, 2013, at 1:18 AM, mirans <[hidden email]> wrote:
>>
>>> I really need help on parsing soap results … I just don't get it :-)
>>>
>>> [output:(xml:$response)] gives:
>>>
>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GenerateApiKeyResponse xmlns="http://www.chili-publisher.com/"> <GenerateApiKeyResult>&lt;apiKey succeeded="true" key="wqaelVtDSPKPQtHHeZYOlV24F8sfgcBpz+pBaPRNSIzLtjyW2jvxlEvIIRV74F+N2hk88kXpNnOBYHWqCKjKeQ==" validTill="2013-11-26 19:09:26Z" superAdmin="true" /&gt;</GenerateApiKeyResult> </GenerateApiKeyResponse> </soap:Body> </soap:Envelope>
>>>
>>> [output:$response->contents] gives:
>>>
>>> <apiKey succeeded="true" key="wqaelVtDSPKPQtHHeZYOlV24F8sfgcBpz+pBaPRNSIzLtjyW2jvxlEvIIRV74F+N2hk88kXpNnOBYHWqCKjKeQ==" validTill="2013-11-26 19:09:26Z" superAdmin="true" />
>>>
>>> I need to extract the values of 'apiKey succeeded' and the value for 'key'
>>> But I have no clue how to do this (tried with xml_tree, tried all the xml tags)
>>>
>>> I hope somebody can help me with this ?
>>> The help will be much appreciated!
>>>
>>> kind regards, miran
>>>
>>>
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso
>>> [hidden email]
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: parsing soap response

Tim Taplin
Wanted to post back to the list after reviewing your code and responding directly.

So, I think that the main issue was the encoding on the apiKey element. The opening of the apiKey element is url encoded which prevented it from being part of the xml object that you could retrieve attributes from.

I was able to walk down the structure using firstChild to retrieve those contents and then cast the string as xml  to be able to retrieve the attributes.
xml($response->firstChild->firstChild->firstChild->contents)->attributes

I'm sure there is an xPath expression to better retrieve that, but its not part of my skill set.

Also, you may need to do some error checking to make sure the nodes exist before retrieving the contents.

If this encoding glitch is fixed at some point, you will need to extend the code down one more child before retrieving the attributes.

Also, I think that you may have been misled by the way in which your browser displayed the results. When you output $response, it only showed the unencoded part of the xml, even though the rest of the xml was present in the source view. Whenever displaying xml, you will need to look at the source view or webinspector, since the browser will be using its own rules to attempt to display the code.

Hope that all helps.

Tim Taplin

On Nov 26, 2013, at 12:19 PM, Tim Taplin <[hidden email]> wrote:

> Can you possibly send me the full response string? or some code to retrieve the soap response?
> Please post it to me off list.
>
> I'll poke at it and work out the right syntax.
>
> Tim Taplin
>
> On Nov 26, 2013, at 12:06 PM, mirans <[hidden email]> wrote:
>
>> thanks for your response, I already tried that and as a result I just get 'array'
>>
>> Now I try to get the key with String_ReplaceRegExp, but my regex skills aren't that great (none at all actually)
>> maybe someone can help me with the right syntax ?
>> I have:
>>
>> [var:'content'=(xml:$response)->contents]
>> [var:'key1'=(String_ReplaceRegExp:$content,-find='<apiKey succeeded=\"true\"\\skey=\"',-replace='')]
>>
>> but that only gives me half of the wanted result:
>> wqaelVtDSPLfs7VzW6g+VcKGvK0Sfd7aqKWikBZzb7tTy_TulA8zCt3uoOtVYECv_sdeV+N+JI_i5pakLWrFHQ==" validTill="2013-11-27 06:02:44Z" superAdmin="true" />
>>
>> kind regards, miran
>>
>>
>>
>>
>> Op 26 nov. 2013, om 15:29 heeft Tim Taplin <[hidden email]> het volgende geschreven:
>>
>>> I believe that what you are looking for is the xml->attributes tag. It looks like you've already retrieved the apiKey xml object, and just need to retrieve the attribute values, like a javascript property.
>>>
>>> it may help to view the object as such:
>>> <apiKey
>>> succeeded="true"
>>> key="wqaelVtDSPKPQtHHeZYOlV24F8sfgcBpz+pBaPRNSIzLtjyW2jvxlEvIIRV74F+N2hk88kXpNnOBYHWqCKjKeQ=="
>>> validTill="2013-11-26 19:09:26Z"
>>> superAdmin="true"
>>> />
>>> Assuming you have already cast $response as an xml object as in your example,
>>> you can retrieve those attributes as an array of pairs by doing:
>>> var('apiKey' = $response->attributes);
>>>
>>> var('succeeded' = $apiKey->find('succeeded'));
>>>
>>> I always have to test to see whether that find will return the value or the entire pair.
>>>
>>> Hope that gets you started.
>>>
>>> Tim Taplin
>>>
>>> On Nov 26, 2013, at 1:18 AM, mirans <[hidden email]> wrote:
>>>
>>>> I really need help on parsing soap results … I just don't get it :-)
>>>>
>>>> [output:(xml:$response)] gives:
>>>>
>>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GenerateApiKeyResponse xmlns="http://www.chili-publisher.com/"> <GenerateApiKeyResult>&lt;apiKey succeeded="true" key="wqaelVtDSPKPQtHHeZYOlV24F8sfgcBpz+pBaPRNSIzLtjyW2jvxlEvIIRV74F+N2hk88kXpNnOBYHWqCKjKeQ==" validTill="2013-11-26 19:09:26Z" superAdmin="true" /&gt;</GenerateApiKeyResult> </GenerateApiKeyResponse> </soap:Body> </soap:Envelope>
>>>>
>>>> [output:$response->contents] gives:
>>>>
>>>> <apiKey succeeded="true" key="wqaelVtDSPKPQtHHeZYOlV24F8sfgcBpz+pBaPRNSIzLtjyW2jvxlEvIIRV74F+N2hk88kXpNnOBYHWqCKjKeQ==" validTill="2013-11-26 19:09:26Z" superAdmin="true" />
>>>>
>>>> I need to extract the values of 'apiKey succeeded' and the value for 'key'
>>>> But I have no clue how to do this (tried with xml_tree, tried all the xml tags)
>>>>
>>>> I hope somebody can help me with this ?
>>>> The help will be much appreciated!
>>>>
>>>> kind regards, miran
>>>>
>>>>
>>>>
>>>> #############################################################
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso
>>>> [hidden email]
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso
>>> [hidden email]
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>>
>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: parsing soap response

mirans
thanks, I was indeed thinking that by using [output] my browser showed the raw code
and my soap and xml skills aren't that great yet
your explanation and code helps me a lot!

miran




Op 26 nov. 2013, om 21:16 heeft Tim Taplin <[hidden email]> het volgende geschreven:

> Wanted to post back to the list after reviewing your code and responding directly.
>
> So, I think that the main issue was the encoding on the apiKey element. The opening of the apiKey element is url encoded which prevented it from being part of the xml object that you could retrieve attributes from.
>
> I was able to walk down the structure using firstChild to retrieve those contents and then cast the string as xml  to be able to retrieve the attributes.
> xml($response->firstChild->firstChild->firstChild->contents)->attributes
>
> I'm sure there is an xPath expression to better retrieve that, but its not part of my skill set.
>
> Also, you may need to do some error checking to make sure the nodes exist before retrieving the contents.
>
> If this encoding glitch is fixed at some point, you will need to extend the code down one more child before retrieving the attributes.
>
> Also, I think that you may have been misled by the way in which your browser displayed the results. When you output $response, it only showed the unencoded part of the xml, even though the rest of the xml was present in the source view. Whenever displaying xml, you will need to look at the source view or webinspector, since the browser will be using its own rules to attempt to display the code.
>
> Hope that all helps.
>
> Tim Taplin
>
> On Nov 26, 2013, at 12:19 PM, Tim Taplin <[hidden email]> wrote:
>
>> Can you possibly send me the full response string? or some code to retrieve the soap response?
>> Please post it to me off list.
>>
>> I'll poke at it and work out the right syntax.
>>
>> Tim Taplin
>>
>> On Nov 26, 2013, at 12:06 PM, mirans <[hidden email]> wrote:
>>
>>> thanks for your response, I already tried that and as a result I just get 'array'
>>>
>>> Now I try to get the key with String_ReplaceRegExp, but my regex skills aren't that great (none at all actually)
>>> maybe someone can help me with the right syntax ?
>>> I have:
>>>
>>> [var:'content'=(xml:$response)->contents]
>>> [var:'key1'=(String_ReplaceRegExp:$content,-find='<apiKey succeeded=\"true\"\\skey=\"',-replace='')]
>>>
>>> but that only gives me half of the wanted result:
>>> wqaelVtDSPLfs7VzW6g+VcKGvK0Sfd7aqKWikBZzb7tTy_TulA8zCt3uoOtVYECv_sdeV+N+JI_i5pakLWrFHQ==" validTill="2013-11-27 06:02:44Z" superAdmin="true" />
>>>
>>> kind regards, miran
>>>
>>>
>>>
>>>
>>> Op 26 nov. 2013, om 15:29 heeft Tim Taplin <[hidden email]> het volgende geschreven:
>>>
>>>> I believe that what you are looking for is the xml->attributes tag. It looks like you've already retrieved the apiKey xml object, and just need to retrieve the attribute values, like a javascript property.
>>>>
>>>> it may help to view the object as such:
>>>> <apiKey
>>>> succeeded="true"
>>>> key="wqaelVtDSPKPQtHHeZYOlV24F8sfgcBpz+pBaPRNSIzLtjyW2jvxlEvIIRV74F+N2hk88kXpNnOBYHWqCKjKeQ=="
>>>> validTill="2013-11-26 19:09:26Z"
>>>> superAdmin="true"
>>>> />
>>>> Assuming you have already cast $response as an xml object as in your example,
>>>> you can retrieve those attributes as an array of pairs by doing:
>>>> var('apiKey' = $response->attributes);
>>>>
>>>> var('succeeded' = $apiKey->find('succeeded'));
>>>>
>>>> I always have to test to see whether that find will return the value or the entire pair.
>>>>
>>>> Hope that gets you started.
>>>>
>>>> Tim Taplin
>>>>
>>>> On Nov 26, 2013, at 1:18 AM, mirans <[hidden email]> wrote:
>>>>
>>>>> I really need help on parsing soap results … I just don't get it :-)
>>>>>
>>>>> [output:(xml:$response)] gives:
>>>>>
>>>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GenerateApiKeyResponse xmlns="http://www.chili-publisher.com/"> <GenerateApiKeyResult>&lt;apiKey succeeded="true" key="wqaelVtDSPKPQtHHeZYOlV24F8sfgcBpz+pBaPRNSIzLtjyW2jvxlEvIIRV74F+N2hk88kXpNnOBYHWqCKjKeQ==" validTill="2013-11-26 19:09:26Z" superAdmin="true" /&gt;</GenerateApiKeyResult> </GenerateApiKeyResponse> </soap:Body> </soap:Envelope>
>>>>>
>>>>> [output:$response->contents] gives:
>>>>>
>>>>> <apiKey succeeded="true" key="wqaelVtDSPKPQtHHeZYOlV24F8sfgcBpz+pBaPRNSIzLtjyW2jvxlEvIIRV74F+N2hk88kXpNnOBYHWqCKjKeQ==" validTill="2013-11-26 19:09:26Z" superAdmin="true" />
>>>>>
>>>>> I need to extract the values of 'apiKey succeeded' and the value for 'key'
>>>>> But I have no clue how to do this (tried with xml_tree, tried all the xml tags)
>>>>>
>>>>> I hope somebody can help me with this ?
>>>>> The help will be much appreciated!
>>>>>
>>>>> kind regards, miran
>>>>>
>>>>>
>>>>>
>>>>> #############################################################
>>>>> This message is sent to you because you are subscribed to
>>>>> the mailing list Lasso
>>>>> [hidden email]
>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>> Send administrative queries to  <[hidden email]>
>>>>
>>>>
>>>> #############################################################
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso
>>>> [hidden email]
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>>
>>>
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso
>>> [hidden email]
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: parsing soap response

stevepiercy
In reply to this post by Tim Taplin
On 11/26/13 at 1:16 PM, [hidden email] (Tim Taplin) pronounced:

> Also, I think that you may have been misled by the way in which your browser
> displayed the results. When you output $response, it only showed the unencoded part
> of the xml, even though the rest of the xml was present in the source view.
> Whenever displaying xml, you will need to look at the source view or webinspector,
> since the browser will be using its own rules to attempt to display the code.

I do this in my page in order to view the XML response inline.

<textarea>[$response]</textarea>

--steve

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>