How can i convert xml soap request to DOMDocument using symfony 3.4











up vote
0
down vote

favorite












I am trying to convert xml code to Dom
I created successfully soap create, update, delete requests it's working everything fine, problem is xml code readability little difficult, now i decided to convert xml to dom



Create Action:



/**
* Returns the soap create body for the Newsletter Entity.
*
* @param Newsletter $newsletter
* @param type $action
* @return string
*/
public function getSoapCreateNewsletterBody(Newsletter $newsletter) {

$soapBody = '
<Create xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services">
<entity xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<b:Attributes xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic">' .
$this->getFieldXml(self::STRING_TYPE, $newsletter->getEmail(), 'new_email') .
$this->getFieldXml(self::STRING_TYPE, $newsletter->getName(), 'new_name') .
'</b:Attributes>
<b:EntityState i:nil="true"/>
<b:FormattedValues xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/>
<b:Id>00000000-0000-0000-0000-000000000000</b:Id>
<b:LogicalName>new_newsletter</b:LogicalName>
<b:RelatedEntities xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/>
</entity>
</Create>';

return $soapBody;
}


Delete Action:



 /**
* Returns the soap delete body for th Newsletter Entity
*
* @param Newsletter $newsletter
* @return string
*/
public function getSoapDeleteNewsletterBody(Newsletter $newsletter){

$soapBody = '
<Delete xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services">
<entityName>new_newsletter</entityName>
<id>' . $newsletter->getNewsletteridcrm() . '</id>
</Delete>';

return $soapBody;
}


Here i am trying to convert xml to dom, issue with below code



/**
* Returns the soap delete body for th Newsletter Entity
*
* @param Newsletter $newsletter
* @return string
*/
public function getSoapDeleteNewsletterBody(Newsletter $newsletter){

/* Generate the DeleteRequest message */
$deleteRequestDOM = new DOMDocument();
$deleteNode = $deleteRequestDOM->appendChild( $deleteRequestDOM->createElementNS( 'http://schemas.microsoft.com/xrm/2011/Contracts/Services', 'Delete' ) );
$deleteNode->appendChild( $deleteRequestDOM->createElement( 'new_newsletter', $newsletter ) );
$deleteNode->appendChild( $deleteRequestDOM->createElement( 'id', $newsletter->getNewsletteridcrm()->ID ) );
/* Return the DOMNode */
return $deleteNode;
}


can anyone tell me how can i do this...
Thanks in advance ...



Updated Working code:



/**
* Returns the soap delete body for th Newsletter Entity
*
* @param Newsletter $newsletter
* @return string
*/
public function getSoapDeleteNewsletterBody(Newsletter $newsletter){

/* Generate the DeleteRequest message */
$deleteRequestDOM = new DOMDocument();
$deleteNode = $deleteRequestDOM->appendChild( $deleteRequestDOM->createElementNS( 'http://schemas.microsoft.com/xrm/2011/Contracts/Services', 'Delete' ) );
$deleteNode->appendChild( $deleteRequestDOM->createElement( 'entityName', 'new_newsletter' ) );

$deleteNode->appendChild( $deleteRequestDOM->createElement( 'id', $newsletter->getNewsletteridcrm()) );
/* Return the DOMNode */

return $deleteRequestDOM->saveXML($deleteRequestDOM->documentElement);
}









share|improve this question
























  • Can you please describe the "issue with below code" a little further? What is the actual result? What are you expecting? Are you facing an error message or exception?
    – nifr
    Nov 8 at 9:16












  • @nifr thanks for quick response issue is this line $deleteNode->appendChild( $deleteRequestDOM->createElement( 'new_newsletter', $newsletter ) ); here error is Warning: DOMDocument::createElement() expects parameter 2 to be string, object given
    – somesh
    Nov 8 at 9:23










  • Can you see above create and delete actions both working properly i need to convert xml code to DOMDocument can you help me how to convert xml to dom
    – somesh
    Nov 8 at 9:24















up vote
0
down vote

favorite












I am trying to convert xml code to Dom
I created successfully soap create, update, delete requests it's working everything fine, problem is xml code readability little difficult, now i decided to convert xml to dom



Create Action:



/**
* Returns the soap create body for the Newsletter Entity.
*
* @param Newsletter $newsletter
* @param type $action
* @return string
*/
public function getSoapCreateNewsletterBody(Newsletter $newsletter) {

$soapBody = '
<Create xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services">
<entity xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<b:Attributes xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic">' .
$this->getFieldXml(self::STRING_TYPE, $newsletter->getEmail(), 'new_email') .
$this->getFieldXml(self::STRING_TYPE, $newsletter->getName(), 'new_name') .
'</b:Attributes>
<b:EntityState i:nil="true"/>
<b:FormattedValues xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/>
<b:Id>00000000-0000-0000-0000-000000000000</b:Id>
<b:LogicalName>new_newsletter</b:LogicalName>
<b:RelatedEntities xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/>
</entity>
</Create>';

return $soapBody;
}


Delete Action:



 /**
* Returns the soap delete body for th Newsletter Entity
*
* @param Newsletter $newsletter
* @return string
*/
public function getSoapDeleteNewsletterBody(Newsletter $newsletter){

$soapBody = '
<Delete xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services">
<entityName>new_newsletter</entityName>
<id>' . $newsletter->getNewsletteridcrm() . '</id>
</Delete>';

return $soapBody;
}


Here i am trying to convert xml to dom, issue with below code



/**
* Returns the soap delete body for th Newsletter Entity
*
* @param Newsletter $newsletter
* @return string
*/
public function getSoapDeleteNewsletterBody(Newsletter $newsletter){

/* Generate the DeleteRequest message */
$deleteRequestDOM = new DOMDocument();
$deleteNode = $deleteRequestDOM->appendChild( $deleteRequestDOM->createElementNS( 'http://schemas.microsoft.com/xrm/2011/Contracts/Services', 'Delete' ) );
$deleteNode->appendChild( $deleteRequestDOM->createElement( 'new_newsletter', $newsletter ) );
$deleteNode->appendChild( $deleteRequestDOM->createElement( 'id', $newsletter->getNewsletteridcrm()->ID ) );
/* Return the DOMNode */
return $deleteNode;
}


can anyone tell me how can i do this...
Thanks in advance ...



Updated Working code:



/**
* Returns the soap delete body for th Newsletter Entity
*
* @param Newsletter $newsletter
* @return string
*/
public function getSoapDeleteNewsletterBody(Newsletter $newsletter){

/* Generate the DeleteRequest message */
$deleteRequestDOM = new DOMDocument();
$deleteNode = $deleteRequestDOM->appendChild( $deleteRequestDOM->createElementNS( 'http://schemas.microsoft.com/xrm/2011/Contracts/Services', 'Delete' ) );
$deleteNode->appendChild( $deleteRequestDOM->createElement( 'entityName', 'new_newsletter' ) );

$deleteNode->appendChild( $deleteRequestDOM->createElement( 'id', $newsletter->getNewsletteridcrm()) );
/* Return the DOMNode */

return $deleteRequestDOM->saveXML($deleteRequestDOM->documentElement);
}









share|improve this question
























  • Can you please describe the "issue with below code" a little further? What is the actual result? What are you expecting? Are you facing an error message or exception?
    – nifr
    Nov 8 at 9:16












  • @nifr thanks for quick response issue is this line $deleteNode->appendChild( $deleteRequestDOM->createElement( 'new_newsletter', $newsletter ) ); here error is Warning: DOMDocument::createElement() expects parameter 2 to be string, object given
    – somesh
    Nov 8 at 9:23










  • Can you see above create and delete actions both working properly i need to convert xml code to DOMDocument can you help me how to convert xml to dom
    – somesh
    Nov 8 at 9:24













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am trying to convert xml code to Dom
I created successfully soap create, update, delete requests it's working everything fine, problem is xml code readability little difficult, now i decided to convert xml to dom



Create Action:



/**
* Returns the soap create body for the Newsletter Entity.
*
* @param Newsletter $newsletter
* @param type $action
* @return string
*/
public function getSoapCreateNewsletterBody(Newsletter $newsletter) {

$soapBody = '
<Create xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services">
<entity xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<b:Attributes xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic">' .
$this->getFieldXml(self::STRING_TYPE, $newsletter->getEmail(), 'new_email') .
$this->getFieldXml(self::STRING_TYPE, $newsletter->getName(), 'new_name') .
'</b:Attributes>
<b:EntityState i:nil="true"/>
<b:FormattedValues xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/>
<b:Id>00000000-0000-0000-0000-000000000000</b:Id>
<b:LogicalName>new_newsletter</b:LogicalName>
<b:RelatedEntities xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/>
</entity>
</Create>';

return $soapBody;
}


Delete Action:



 /**
* Returns the soap delete body for th Newsletter Entity
*
* @param Newsletter $newsletter
* @return string
*/
public function getSoapDeleteNewsletterBody(Newsletter $newsletter){

$soapBody = '
<Delete xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services">
<entityName>new_newsletter</entityName>
<id>' . $newsletter->getNewsletteridcrm() . '</id>
</Delete>';

return $soapBody;
}


Here i am trying to convert xml to dom, issue with below code



/**
* Returns the soap delete body for th Newsletter Entity
*
* @param Newsletter $newsletter
* @return string
*/
public function getSoapDeleteNewsletterBody(Newsletter $newsletter){

/* Generate the DeleteRequest message */
$deleteRequestDOM = new DOMDocument();
$deleteNode = $deleteRequestDOM->appendChild( $deleteRequestDOM->createElementNS( 'http://schemas.microsoft.com/xrm/2011/Contracts/Services', 'Delete' ) );
$deleteNode->appendChild( $deleteRequestDOM->createElement( 'new_newsletter', $newsletter ) );
$deleteNode->appendChild( $deleteRequestDOM->createElement( 'id', $newsletter->getNewsletteridcrm()->ID ) );
/* Return the DOMNode */
return $deleteNode;
}


can anyone tell me how can i do this...
Thanks in advance ...



Updated Working code:



/**
* Returns the soap delete body for th Newsletter Entity
*
* @param Newsletter $newsletter
* @return string
*/
public function getSoapDeleteNewsletterBody(Newsletter $newsletter){

/* Generate the DeleteRequest message */
$deleteRequestDOM = new DOMDocument();
$deleteNode = $deleteRequestDOM->appendChild( $deleteRequestDOM->createElementNS( 'http://schemas.microsoft.com/xrm/2011/Contracts/Services', 'Delete' ) );
$deleteNode->appendChild( $deleteRequestDOM->createElement( 'entityName', 'new_newsletter' ) );

$deleteNode->appendChild( $deleteRequestDOM->createElement( 'id', $newsletter->getNewsletteridcrm()) );
/* Return the DOMNode */

return $deleteRequestDOM->saveXML($deleteRequestDOM->documentElement);
}









share|improve this question















I am trying to convert xml code to Dom
I created successfully soap create, update, delete requests it's working everything fine, problem is xml code readability little difficult, now i decided to convert xml to dom



Create Action:



/**
* Returns the soap create body for the Newsletter Entity.
*
* @param Newsletter $newsletter
* @param type $action
* @return string
*/
public function getSoapCreateNewsletterBody(Newsletter $newsletter) {

$soapBody = '
<Create xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services">
<entity xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<b:Attributes xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic">' .
$this->getFieldXml(self::STRING_TYPE, $newsletter->getEmail(), 'new_email') .
$this->getFieldXml(self::STRING_TYPE, $newsletter->getName(), 'new_name') .
'</b:Attributes>
<b:EntityState i:nil="true"/>
<b:FormattedValues xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/>
<b:Id>00000000-0000-0000-0000-000000000000</b:Id>
<b:LogicalName>new_newsletter</b:LogicalName>
<b:RelatedEntities xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/>
</entity>
</Create>';

return $soapBody;
}


Delete Action:



 /**
* Returns the soap delete body for th Newsletter Entity
*
* @param Newsletter $newsletter
* @return string
*/
public function getSoapDeleteNewsletterBody(Newsletter $newsletter){

$soapBody = '
<Delete xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services">
<entityName>new_newsletter</entityName>
<id>' . $newsletter->getNewsletteridcrm() . '</id>
</Delete>';

return $soapBody;
}


Here i am trying to convert xml to dom, issue with below code



/**
* Returns the soap delete body for th Newsletter Entity
*
* @param Newsletter $newsletter
* @return string
*/
public function getSoapDeleteNewsletterBody(Newsletter $newsletter){

/* Generate the DeleteRequest message */
$deleteRequestDOM = new DOMDocument();
$deleteNode = $deleteRequestDOM->appendChild( $deleteRequestDOM->createElementNS( 'http://schemas.microsoft.com/xrm/2011/Contracts/Services', 'Delete' ) );
$deleteNode->appendChild( $deleteRequestDOM->createElement( 'new_newsletter', $newsletter ) );
$deleteNode->appendChild( $deleteRequestDOM->createElement( 'id', $newsletter->getNewsletteridcrm()->ID ) );
/* Return the DOMNode */
return $deleteNode;
}


can anyone tell me how can i do this...
Thanks in advance ...



Updated Working code:



/**
* Returns the soap delete body for th Newsletter Entity
*
* @param Newsletter $newsletter
* @return string
*/
public function getSoapDeleteNewsletterBody(Newsletter $newsletter){

/* Generate the DeleteRequest message */
$deleteRequestDOM = new DOMDocument();
$deleteNode = $deleteRequestDOM->appendChild( $deleteRequestDOM->createElementNS( 'http://schemas.microsoft.com/xrm/2011/Contracts/Services', 'Delete' ) );
$deleteNode->appendChild( $deleteRequestDOM->createElement( 'entityName', 'new_newsletter' ) );

$deleteNode->appendChild( $deleteRequestDOM->createElement( 'id', $newsletter->getNewsletteridcrm()) );
/* Return the DOMNode */

return $deleteRequestDOM->saveXML($deleteRequestDOM->documentElement);
}






xml symfony dom soap






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 8 at 11:19

























asked Nov 8 at 8:40









somesh

11312




11312












  • Can you please describe the "issue with below code" a little further? What is the actual result? What are you expecting? Are you facing an error message or exception?
    – nifr
    Nov 8 at 9:16












  • @nifr thanks for quick response issue is this line $deleteNode->appendChild( $deleteRequestDOM->createElement( 'new_newsletter', $newsletter ) ); here error is Warning: DOMDocument::createElement() expects parameter 2 to be string, object given
    – somesh
    Nov 8 at 9:23










  • Can you see above create and delete actions both working properly i need to convert xml code to DOMDocument can you help me how to convert xml to dom
    – somesh
    Nov 8 at 9:24


















  • Can you please describe the "issue with below code" a little further? What is the actual result? What are you expecting? Are you facing an error message or exception?
    – nifr
    Nov 8 at 9:16












  • @nifr thanks for quick response issue is this line $deleteNode->appendChild( $deleteRequestDOM->createElement( 'new_newsletter', $newsletter ) ); here error is Warning: DOMDocument::createElement() expects parameter 2 to be string, object given
    – somesh
    Nov 8 at 9:23










  • Can you see above create and delete actions both working properly i need to convert xml code to DOMDocument can you help me how to convert xml to dom
    – somesh
    Nov 8 at 9:24
















Can you please describe the "issue with below code" a little further? What is the actual result? What are you expecting? Are you facing an error message or exception?
– nifr
Nov 8 at 9:16






Can you please describe the "issue with below code" a little further? What is the actual result? What are you expecting? Are you facing an error message or exception?
– nifr
Nov 8 at 9:16














@nifr thanks for quick response issue is this line $deleteNode->appendChild( $deleteRequestDOM->createElement( 'new_newsletter', $newsletter ) ); here error is Warning: DOMDocument::createElement() expects parameter 2 to be string, object given
– somesh
Nov 8 at 9:23




@nifr thanks for quick response issue is this line $deleteNode->appendChild( $deleteRequestDOM->createElement( 'new_newsletter', $newsletter ) ); here error is Warning: DOMDocument::createElement() expects parameter 2 to be string, object given
– somesh
Nov 8 at 9:23












Can you see above create and delete actions both working properly i need to convert xml code to DOMDocument can you help me how to convert xml to dom
– somesh
Nov 8 at 9:24




Can you see above create and delete actions both working properly i need to convert xml code to DOMDocument can you help me how to convert xml to dom
– somesh
Nov 8 at 9:24












1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










Your issue is caused by this line:



$deleteRequestDOM->createElement( 'new_newsletter', $newsletter )


Here $newsletter is a Newsletter object but createElement expects a string as second argument (the value of the XML element). Have a look at the documentation of the function.



What you really want is ...



$deleteRequestDOM->createElement('entityName', 'new_newsletter')


... to create this XML Node:



<entityName>new_newsletter</entityName>





share|improve this answer





















  • thank you so much ... i realized now one more issue in query no problem i resolve this ... [Catchable Fatal Error: Object of class DOMElement could not be converted to string] , any way thank you so much your support
    – somesh
    Nov 8 at 10:02










  • You need to return a string from the function. That'd be - in your case - return $deleteRequestDom->saveXML(); to return the XML as a string.
    – nifr
    Nov 8 at 10:06










  • Thank you so much your valuable support @nifr ... working fine
    – somesh
    Nov 8 at 10:11











Your Answer






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',
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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53204104%2fhow-can-i-convert-xml-soap-request-to-domdocument-using-symfony-3-4%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








up vote
0
down vote



accepted










Your issue is caused by this line:



$deleteRequestDOM->createElement( 'new_newsletter', $newsletter )


Here $newsletter is a Newsletter object but createElement expects a string as second argument (the value of the XML element). Have a look at the documentation of the function.



What you really want is ...



$deleteRequestDOM->createElement('entityName', 'new_newsletter')


... to create this XML Node:



<entityName>new_newsletter</entityName>





share|improve this answer





















  • thank you so much ... i realized now one more issue in query no problem i resolve this ... [Catchable Fatal Error: Object of class DOMElement could not be converted to string] , any way thank you so much your support
    – somesh
    Nov 8 at 10:02










  • You need to return a string from the function. That'd be - in your case - return $deleteRequestDom->saveXML(); to return the XML as a string.
    – nifr
    Nov 8 at 10:06










  • Thank you so much your valuable support @nifr ... working fine
    – somesh
    Nov 8 at 10:11















up vote
0
down vote



accepted










Your issue is caused by this line:



$deleteRequestDOM->createElement( 'new_newsletter', $newsletter )


Here $newsletter is a Newsletter object but createElement expects a string as second argument (the value of the XML element). Have a look at the documentation of the function.



What you really want is ...



$deleteRequestDOM->createElement('entityName', 'new_newsletter')


... to create this XML Node:



<entityName>new_newsletter</entityName>





share|improve this answer





















  • thank you so much ... i realized now one more issue in query no problem i resolve this ... [Catchable Fatal Error: Object of class DOMElement could not be converted to string] , any way thank you so much your support
    – somesh
    Nov 8 at 10:02










  • You need to return a string from the function. That'd be - in your case - return $deleteRequestDom->saveXML(); to return the XML as a string.
    – nifr
    Nov 8 at 10:06










  • Thank you so much your valuable support @nifr ... working fine
    – somesh
    Nov 8 at 10:11













up vote
0
down vote



accepted







up vote
0
down vote



accepted






Your issue is caused by this line:



$deleteRequestDOM->createElement( 'new_newsletter', $newsletter )


Here $newsletter is a Newsletter object but createElement expects a string as second argument (the value of the XML element). Have a look at the documentation of the function.



What you really want is ...



$deleteRequestDOM->createElement('entityName', 'new_newsletter')


... to create this XML Node:



<entityName>new_newsletter</entityName>





share|improve this answer












Your issue is caused by this line:



$deleteRequestDOM->createElement( 'new_newsletter', $newsletter )


Here $newsletter is a Newsletter object but createElement expects a string as second argument (the value of the XML element). Have a look at the documentation of the function.



What you really want is ...



$deleteRequestDOM->createElement('entityName', 'new_newsletter')


... to create this XML Node:



<entityName>new_newsletter</entityName>






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 8 at 9:38









nifr

39.6k7105115




39.6k7105115












  • thank you so much ... i realized now one more issue in query no problem i resolve this ... [Catchable Fatal Error: Object of class DOMElement could not be converted to string] , any way thank you so much your support
    – somesh
    Nov 8 at 10:02










  • You need to return a string from the function. That'd be - in your case - return $deleteRequestDom->saveXML(); to return the XML as a string.
    – nifr
    Nov 8 at 10:06










  • Thank you so much your valuable support @nifr ... working fine
    – somesh
    Nov 8 at 10:11


















  • thank you so much ... i realized now one more issue in query no problem i resolve this ... [Catchable Fatal Error: Object of class DOMElement could not be converted to string] , any way thank you so much your support
    – somesh
    Nov 8 at 10:02










  • You need to return a string from the function. That'd be - in your case - return $deleteRequestDom->saveXML(); to return the XML as a string.
    – nifr
    Nov 8 at 10:06










  • Thank you so much your valuable support @nifr ... working fine
    – somesh
    Nov 8 at 10:11
















thank you so much ... i realized now one more issue in query no problem i resolve this ... [Catchable Fatal Error: Object of class DOMElement could not be converted to string] , any way thank you so much your support
– somesh
Nov 8 at 10:02




thank you so much ... i realized now one more issue in query no problem i resolve this ... [Catchable Fatal Error: Object of class DOMElement could not be converted to string] , any way thank you so much your support
– somesh
Nov 8 at 10:02












You need to return a string from the function. That'd be - in your case - return $deleteRequestDom->saveXML(); to return the XML as a string.
– nifr
Nov 8 at 10:06




You need to return a string from the function. That'd be - in your case - return $deleteRequestDom->saveXML(); to return the XML as a string.
– nifr
Nov 8 at 10:06












Thank you so much your valuable support @nifr ... working fine
– somesh
Nov 8 at 10:11




Thank you so much your valuable support @nifr ... working fine
– somesh
Nov 8 at 10:11


















draft saved

draft discarded




















































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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53204104%2fhow-can-i-convert-xml-soap-request-to-domdocument-using-symfony-3-4%23new-answer', 'question_page');
}
);

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







這個網誌中的熱門文章

Academy of Television Arts & Sciences

L'Équipe

1995 France bombings