Jump to content

victorsk

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

victorsk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi everybody, I am working with SOAP-PEAR and run on a nasty problem I don't know answer to. First I explain what I know how to do. I am trying to construct a soap request and I know how to do this if XML has this structure: Case 1 <parent> <child1>string</child1> <child2>string</child2> <child3>string</child3> </parent> In this case, I construct an Array("root" => new Soap_Value("child1", "string", "value")).... Now my problem is that I don't know how to create an array() or some other data if XML structure is like this: Case 2 <parent child1="value1" child2="value2" child3="value3" /> :'( Could somebody please tell me how I can construct a SOAP request with SOAP-PEAR for that structure in Case 2? I just can't find a way to formulate it using arrays or some other data type :-\ Your help will greatly be appreciated. Thank you, Victor.
  2. Hi, I got it. What I was missing is to apply unserialize() on the object after that. Thanks, Victor.
  3. Hi everyone, I've got a custom Web_Services_Object object which I am trying to encode with json_encode(), store it in MySQL DB, then json_decode() back to use it. The problem is that after applying json_decode(), this object becomes stdClass and it must be Web_Services_Object type. Here is a snapshot of what I have: $client = new Web_Services_Object; $client->CallAPI(); $obj = json_encode($client); After json_decode($obj) is done, I get stdClass Object for: $myObj = json_decode($obj); //is stdClass But I need it to be of type Web_Services_Object. Please, I am not very knowledgeable with PHP, could you please provide an example how this could be done? I think it has something to do with serializing object but I have no idea how to implement it. Thank you, Victor.
  4. Hello, I need to find a way on how to save a session and an object obtained in file1.php and use the session and object information in file2.php. I cannot create a class and then instantiante it in file2.php because I am sending a SOAP request and with it I am getting that session and object information. There are subsequent other SOAP API functions that I need to call using session and object information obtained in file1.php so: Step 1: CheckAvailability (uses object obtained in file1) onClick="load file2.php?parameter=some parameters Step 2: Add Product onClick="load file3.php?parameter= some parameters" <<< uses object/session information obtained from file1 and CheckAvailability Step 3: BookProduct onclick="load file4.php?parameter=some parameters" <<< uses object/session information obtained file1 and CheckAvailability and Add Product Clearly, re-using the same class at BookProduct part will be extremely inefficient because I have to call every previous procedure. I hope I clearly defined my problem so it seems like the only way is to pass a resulting object/session from file to file as opposed to getting it from step 1. So the basic Idea: at Step 3 use object's values obtained in Step1 + Step2. Please help, Thank you, Victor.
×
×
  • 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.