Jump to content

v2kea412

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

v2kea412's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. lol....after 1 month of using PHP would give you the proper syntax for anything to show up correctly in your browser...
  2. I believe I had the POST set to true in an earlier test. That said, my issue is not necessarily with my client-side test. I am more focused on what I have to do differently to get the acknowledgment back to them after I process the request. Here is the code of my listener: <?php require("trex.classes.inc.php"); if (isset($HTTP_RAW_POST_DATA)) { // Setup variables // $errors = array(); $act = new Activity(4,1); $xml = $HTTP_RAW_POST_DATA; $transaction = new xmlTransaction($xml, $act->Id); $transaction->writeXaction(); $xmlOut = $transaction->sendResponse(); // Send Header with payload header("Content-type: text/xml"); echo $xmlOut; sendRequest($transaction->raw, $xmlOut); unset($transaction); unset($act); } ?> Should I be using some other functions to get the $xmlOut to them? like HTTPResponse class or something similar?
  3. Here is what my test environment client has, omitted purposely is the xml payload and url... //open connection $ch = curl_init(); //set the url, number of POST vars, POST data curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch,CURLOPT_HTTPHEADER, array('Content-Type: text/xml')); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_POST,false); curl_setopt($ch,CURLOPT_POSTFIELDS,$xml); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //execute post $result = curl_exec($ch); echo $result; //close connection curl_close($ch); And like I said, this does show me what I thought they would see when called from their Java Servlet...But they say they are not receiving anything... The only other thing to note, and not sure if it would make a difference, is that I am also emailing the XML response to myself for debugging purposes in my listening script...
  4. I have a need to synchronously communicate XML over HTTPS using POST. The originating server is using Java servlets to call my URL. I can see the XML payload in $HTTP_RAW_POST_DATA and can process what I need to do on my end just fine. Part of the synchronous transmission is to let the Java servlet that I received the XML just fine. My PHP code simply echo's back the XML response as such: if (isset($HTTP_RAW_POST_DATA)) { // Setup variables // $errors = array(); $act = new Activity(4,1); $xml = $HTTP_RAW_POST_DATA; $transaction = new xmlTransaction($xml, $act->Id); $transaction->writeXaction(); $xmlOut = $transaction->sendResponse(); // Send Header with payload header("Content-type: text/xml"); echo $xmlOut; } In my test environment, using cURL, I can retrieve the XML verifying the send, but on their end, they say they see nothing... It is almost as if they are expecting something to be sent back to them, but not sure how to accomplish that. Perhaps it is my ignorance of web services, but I think I am missing something.... Any ideas out there?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.