Note that there are some explanatory texts on larger screens.

plurals
  1. POcomplete noob, SOAP PHP, request with authentication, store in mySQL
    primarykey
    data
    text
    <p>OK, so I'm completely lost here! Been staring myself blind at the screen for two days and all the explanations/tutorials I can find on the internet assumes you've already worked with SOAP before.</p> <p>Using <a href="http://www.soapui.org/" rel="nofollow">SOAPui</a> I was at least able to try out the request and see the result :) But I need to replicate this in PHP... e.g, make request in PHP using authentication credentials and then store the response in a mySQL table.</p> <p>This is how the request looks like</p> <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/"&gt; &lt;soapenv:Header/&gt; &lt;soapenv:Body&gt; &lt;tem:DoThis&gt; &lt;tem:licensId&gt;[MYLICENSID]&lt;/tem:licensId&gt; &lt;tem:licenskey&gt;[MYLICENSKEY]&lt;/tem:licenskey&gt; &lt;tem:guid&gt;[AGUID]&lt;/tem:guid&gt; &lt;/tem:DoThis&gt; &lt;/soapenv:Body&gt; &lt;/soapenv:Envelope&gt; </code></pre> <p>So I need to verify/authenticate the request (i guess)? But how do I do this with PHP? Once I get the request to work, how will the response be presented? I would like to insert it into an existing mySQL DB. That is to say that this is my "end game"/the purpose of this. Retrieving information from external system, compare it to existing information in DB, and if new information exists, replace current or add new.</p> <p>I tried</p> <pre><code>$wsdl = 'http://URLTOSERVICE/Export.svc?wsdl'; $client = new SoapClient( $wsdl, array( "tem:licensid" =&gt; "[MYLICENSID]", "tem:licenskey" =&gt; "[MYLICENSKEY]", "tem:guid" =&gt; "[AGUID]" ) ); print_r($client-&gt;DoThis()); </code></pre> <p>But the response is about as interesting as looking in to a blank paper for 2 days... i.e, returns nothing.</p> <p>Like I said in the topic title and at the beginning. I have no experience with SOAP. So please, if some kind soul out there takes the time to answer, keep in mind that I need clear and precise explanations :)</p> <p>And thank you to anyone taking the time to help me understanding this...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload