How convert to array or json php soap __dorequest response? The Next CEO of Stack OverflowHow can I prevent SQL injection in PHP?PHP: Delete an element from an arrayConvert HTML + CSS to PDF with PHP?How do I get PHP errors to display?How Do You Parse and Process HTML/XML in PHP?Convert PHP object to associative arrayHow does PHP 'foreach' actually work?Reference - What does this error mean in PHP?Manually convert XML SOAP response into PHP arrayParse XML SOAP response php
Gödel's incompleteness theorems - what are the religious implications?
Is it okay to majorly distort historical facts while writing a fiction story?
Why do we say “un seul M” and not “une seule M” even though M is a “consonne”?
Does int main() need a declaration on C++?
Is it OK to decorate a log book cover?
Car headlights in a world without electricity
Can I cast Thunderwave and be at the center of its bottom face, but not be affected by it?
Are British MPs missing the point, with these 'Indicative Votes'?
Can you teleport closer to a creature you are Frightened of?
Is the offspring between a demon and a celestial possible? If so what is it called and is it in a book somewhere?
Identify and count spells (Distinctive events within each group)
Why was Sir Cadogan fired?
Could you use a laser beam as a modulated carrier wave for radio signal?
How can the PCs determine if an item is a phylactery?
How does a dynamic QR code work?
Arrows in tikz Markov chain diagram overlap
How to coordinate airplane tickets?
That's an odd coin - I wonder why
How can a day be of 24 hours?
Traveling with my 5 year old daughter (as the father) without the mother from Germany to Mexico
Is a distribution that is normal, but highly skewed, considered Gaussian?
How to show a landlord what we have in savings?
What difference does it make matching a word with/without a trailing whitespace?
Find a path from s to t using as few red nodes as possible
How convert to array or json php soap __dorequest response?
The Next CEO of Stack OverflowHow can I prevent SQL injection in PHP?PHP: Delete an element from an arrayConvert HTML + CSS to PDF with PHP?How do I get PHP errors to display?How Do You Parse and Process HTML/XML in PHP?Convert PHP object to associative arrayHow does PHP 'foreach' actually work?Reference - What does this error mean in PHP?Manually convert XML SOAP response into PHP arrayParse XML SOAP response php
this is _dorequest response. Response is xml string data.
I tried convert with simplexml_load_string() function and later return array but function result is empty.
'<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<ns1:createNgiShipmentWithAddressResponse xmlns:ns1="http://yurticikargo.com.tr/NgiShipmentInterfaceServices" xmlns:ns2="http://yurticikargo.com.tr/NgiShipmentInterfaceServices" xmlns:ns3="http://yurticikargo.com.tr/WSExceptions/">
<XShipmentDataResponse>
<outFlag>0</outFlag>
<projectId>18501</projectId>
<specialFieldDataArray>
<specialFieldName>53</specialFieldName>
<specialFieldValue>SIP-1234885679</specialFieldValue>
</specialFieldDataArray>
<specialFieldDataArray>
<specialFieldName>3</specialFieldName>
<specialFieldValue>SIP-1234885679</specialFieldValue>
</specialFieldDataArray>
</XShipmentDataResponse>
</ns1:createNgiShipmentWithAddressResponse>
</env:Body>
</env:Envelope>'
php
add a comment |
this is _dorequest response. Response is xml string data.
I tried convert with simplexml_load_string() function and later return array but function result is empty.
'<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<ns1:createNgiShipmentWithAddressResponse xmlns:ns1="http://yurticikargo.com.tr/NgiShipmentInterfaceServices" xmlns:ns2="http://yurticikargo.com.tr/NgiShipmentInterfaceServices" xmlns:ns3="http://yurticikargo.com.tr/WSExceptions/">
<XShipmentDataResponse>
<outFlag>0</outFlag>
<projectId>18501</projectId>
<specialFieldDataArray>
<specialFieldName>53</specialFieldName>
<specialFieldValue>SIP-1234885679</specialFieldValue>
</specialFieldDataArray>
<specialFieldDataArray>
<specialFieldName>3</specialFieldName>
<specialFieldValue>SIP-1234885679</specialFieldValue>
</specialFieldDataArray>
</XShipmentDataResponse>
</ns1:createNgiShipmentWithAddressResponse>
</env:Body>
</env:Envelope>'
php
add a comment |
this is _dorequest response. Response is xml string data.
I tried convert with simplexml_load_string() function and later return array but function result is empty.
'<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<ns1:createNgiShipmentWithAddressResponse xmlns:ns1="http://yurticikargo.com.tr/NgiShipmentInterfaceServices" xmlns:ns2="http://yurticikargo.com.tr/NgiShipmentInterfaceServices" xmlns:ns3="http://yurticikargo.com.tr/WSExceptions/">
<XShipmentDataResponse>
<outFlag>0</outFlag>
<projectId>18501</projectId>
<specialFieldDataArray>
<specialFieldName>53</specialFieldName>
<specialFieldValue>SIP-1234885679</specialFieldValue>
</specialFieldDataArray>
<specialFieldDataArray>
<specialFieldName>3</specialFieldName>
<specialFieldValue>SIP-1234885679</specialFieldValue>
</specialFieldDataArray>
</XShipmentDataResponse>
</ns1:createNgiShipmentWithAddressResponse>
</env:Body>
</env:Envelope>'
php
this is _dorequest response. Response is xml string data.
I tried convert with simplexml_load_string() function and later return array but function result is empty.
'<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<ns1:createNgiShipmentWithAddressResponse xmlns:ns1="http://yurticikargo.com.tr/NgiShipmentInterfaceServices" xmlns:ns2="http://yurticikargo.com.tr/NgiShipmentInterfaceServices" xmlns:ns3="http://yurticikargo.com.tr/WSExceptions/">
<XShipmentDataResponse>
<outFlag>0</outFlag>
<projectId>18501</projectId>
<specialFieldDataArray>
<specialFieldName>53</specialFieldName>
<specialFieldValue>SIP-1234885679</specialFieldValue>
</specialFieldDataArray>
<specialFieldDataArray>
<specialFieldName>3</specialFieldName>
<specialFieldValue>SIP-1234885679</specialFieldValue>
</specialFieldDataArray>
</XShipmentDataResponse>
</ns1:createNgiShipmentWithAddressResponse>
</env:Body>
</env:Envelope>'
php
php
asked Mar 21 at 20:07
Tuğçe ÖzerTuğçe Özer
1
1
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
xml converted to array:
$xml = "$result"; //$result xml string
$xml_parser = xml_parser_create();
xml_parse_into_struct($xml_parser,$xml,$vals,$index);
xml_parser_free($xml_parser);
$sonuc = $vals[$index['NODENAME'][0]]["value"];
add a comment |
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55288506%2fhow-convert-to-array-or-json-php-soap-dorequest-response%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
xml converted to array:
$xml = "$result"; //$result xml string
$xml_parser = xml_parser_create();
xml_parse_into_struct($xml_parser,$xml,$vals,$index);
xml_parser_free($xml_parser);
$sonuc = $vals[$index['NODENAME'][0]]["value"];
add a comment |
xml converted to array:
$xml = "$result"; //$result xml string
$xml_parser = xml_parser_create();
xml_parse_into_struct($xml_parser,$xml,$vals,$index);
xml_parser_free($xml_parser);
$sonuc = $vals[$index['NODENAME'][0]]["value"];
add a comment |
xml converted to array:
$xml = "$result"; //$result xml string
$xml_parser = xml_parser_create();
xml_parse_into_struct($xml_parser,$xml,$vals,$index);
xml_parser_free($xml_parser);
$sonuc = $vals[$index['NODENAME'][0]]["value"];
xml converted to array:
$xml = "$result"; //$result xml string
$xml_parser = xml_parser_create();
xml_parse_into_struct($xml_parser,$xml,$vals,$index);
xml_parser_free($xml_parser);
$sonuc = $vals[$index['NODENAME'][0]]["value"];
answered Mar 22 at 13:03
Tuğçe ÖzerTuğçe Özer
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55288506%2fhow-convert-to-array-or-json-php-soap-dorequest-response%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown