Jump to content

zenag

Members
  • Posts

    443
  • Joined

  • Last visited

Posts posted by zenag

  1. Thank you .

     

    how to parse this soap response .any help please.

     

    <soap:Envelope>
    −
    <soap:Body>
    −
    <GetListItemsResponse>
    −
    <GetListItemsResult>
    −
    <listitems>
    −
    <rs:data ItemCount="4">
    <z:row ows_Attachments="0" ows_LinkTitle="test" ows_Name="test" ows_Email="jaiganesh@gmail.com" ows_MetaInfo="1;#" ows__ModerationStatus="0" ows__Level="1" ows_Title="test" ows_ID="1" ows_owshiddenversion="2" ows_UniqueId="1;#{B6AEA147-BD2F-4157-8F46-57B86277EAA5}" ows_FSObjType="1;#0" ows_Created_x0020_Date="1;#2012-05-15 12:09:57" ows_Created="2012-05-15 12:09:57" ows_FileLeafRef="1;#1_.000" ows_FileRef="1;#Lists/CustomerInfo/1_.000"/>
    <z:row ows_Attachments="0" ows_LinkTitle="Test2" ows_Name="test" ows_MetaInfo="2;#" ows__ModerationStatus="0" ows__Level="1" ows_Title="Test2" ows_ID="2" ows_owshiddenversion="1" ows_UniqueId="2;#{4EC49195-F4D6-483F-B762-0F1DEEDBF2E5}" ows_FSObjType="2;#0" ows_Created_x0020_Date="2;#2012-05-15 12:11:00" ows_Created="2012-05-15 12:11:00" ows_FileLeafRef="2;#2_.000" ows_FileRef="2;#Lists/CustomerInfo/2_.000"/>
    <z:row ows_Attachments="0" ows_LinkTitle="My Title" ows_MetaInfo="3;#" ows__ModerationStatus="0" ows__Level="1" ows_Title="My Title" ows_ID="3" ows_owshiddenversion="1" ows_UniqueId="3;#{E4E5854A-2263-45D0-85D1-02AD65B6006E}" ows_FSObjType="3;#0" ows_Created_x0020_Date="3;#2012-05-15 15:49:58" ows_Created="2012-05-15 15:49:58" ows_FileLeafRef="3;#3_.000" ows_FileRef="3;#Lists/CustomerInfo/3_.000"/>
    <z:row ows_Attachments="0" ows_LinkTitle="My Title" ows_MetaInfo="4;#" ows__ModerationStatus="0" ows__Level="1" ows_Title="My Title" ows_ID="4" ows_owshiddenversion="1" ows_UniqueId="4;#{59C287EA-F92E-4F57-80A7-30E453124DD8}" ows_FSObjType="4;#0" ows_Created_x0020_Date="4;#2012-05-15 15:50:50" ows_Created="2012-05-15 15:50:50" ows_FileLeafRef="4;#4_.000" ows_FileRef="4;#Lists/CustomerInfo/4_.000"/>
    </rs:data>
    </listitems>
    </GetListItemsResult>
    </GetListItemsResponse>
    </soap:Body>
    </soap:Envelope>
    
    

     

     

  2. Hi

     

     

    I  am trying to retrieve soap response as xml string.

    I have tried to parse the soap response xml string using simplexml.

    I am getting the error

     

    XML Parsing Error: junk after document element

     

     

    Here is my response. I have a problem in this response as you can see <br /> tag get added to the last of this xml string. I haver tried to remove using str_replace but with no luck.

     

    <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetListItemsResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/"><GetListItemsResult><listitems xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882' xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882' xmlns:rs='urn:schemas-microsoft-com:rowset' xmlns:z='#RowsetSchema'> <rs:data ItemCount="4">    <z:row ows_Attachments='0' ows_LinkTitle='test' ows_Name='test' ows_Email='jaiganesh@gmail.com' ows_MetaInfo='1;#' ows__ModerationStatus='0' ows__Level='1' ows_Title='test' ows_ID='1' ows_owshiddenversion='2' ows_UniqueId='1;#{B6AEA147-BD2F-4157-8F46-57B86277EAA5}' ows_FSObjType='1;#0' ows_Created_x0020_Date='1;#2012-05-15 12:09:57' ows_Created='2012-05-15 12:09:57' ows_FileLeafRef='1;#1_.000' ows_FileRef='1;#Lists/CustomerInfo/1_.000' />    <z:row ows_Attachments='0' ows_LinkTitle='Test2' ows_Name='test' ows_MetaInfo='2;#' ows__ModerationStatus='0' ows__Level='1' ows_Title='Test2' ows_ID='2' ows_owshiddenversion='1' ows_UniqueId='2;#{4EC49195-F4D6-483F-B762-0F1DEEDBF2E5}' ows_FSObjType='2;#0' ows_Created_x0020_Date='2;#2012-05-15 12:11:00' ows_Created='2012-05-15 12:11:00' ows_FileLeafRef='2;#2_.000' ows_FileRef='2;#Lists/CustomerInfo/2_.000' />    <z:row ows_Attachments='0' ows_LinkTitle='My Title' ows_MetaInfo='3;#' ows__ModerationStatus='0' ows__Level='1' ows_Title='My Title' ows_ID='3' ows_owshiddenversion='1' ows_UniqueId='3;#{E4E5854A-2263-45D0-85D1-02AD65B6006E}' ows_FSObjType='3;#0' ows_Created_x0020_Date='3;#2012-05-15 15:49:58' ows_Created='2012-05-15 15:49:58' ows_FileLeafRef='3;#3_.000' ows_FileRef='3;#Lists/CustomerInfo/3_.000' />    <z:row ows_Attachments='0' ows_LinkTitle='My Title' ows_MetaInfo='4;#' ows__ModerationStatus='0' ows__Level='1' ows_Title='My Title' ows_ID='4' ows_owshiddenversion='1' ows_UniqueId='4;#{59C287EA-F92E-4F57-80A7-30E453124DD8}' ows_FSObjType='4;#0' ows_Created_x0020_Date='4;#2012-05-15 15:50:50' ows_Created='2012-05-15 15:50:50' ows_FileLeafRef='4;#4_.000' ows_FileRef='4;#Lists/CustomerInfo/4_.000' /> </rs:data> </listitems></GetListItemsResult></GetListItemsResponse></soap:Body></soap:Envelope><br />
    
    

     

     

     

     

     

  3. it can be done using javascript...
    
    see this sample code....
    

     

     

    index.php

    <script type="text/javascript">
    
    function pass(val)
    {
    window.location="index.php?value="+val;
    
    }
    
    </script>
    <select   onChange="pass(this.value)"name="country"><option value="">select values</option><option value="0">0</option><option value="1">1</option></select>
    <?
    $values=$_GET["value"];
    if(isset($values))
    {
    echo $values;
    
    }
    
    
    
    ?>
    

  4. 
    $password=md5($_POST[password]);
    $sql="INSERT INTO users (newsletters, updates, fname, lname, login, password, company, address1, address2, city, state, province, zip, country, email, email_mode, phone)
    VALUES
    ('$_POST[newsletters]','$_POST[updates]','$_POST[fname]','$_POST[lname]','$_POST[login]','$password','$_POST[company]','$_POST[address1]','$_POST[address2]','$_POST[city]','$_POST[state]','$_POST[province]','$_POST[zip]','$_POST[country]','$_POST[email]','$_POST[email_mode]','$_POST[phone]')";
    

  5. 
    anyway....
    
    try to solve pretty small things by yourself,  that may teach u a lot...
    
    function convert(&$array_strings)
    {
        
        $higher=strtoupper($array_strings);
        print($higher);
    }$array_strings="hello this is php coding in lower case to upper case";
    convert($array_strings);
    
    
    
    
    2.
    
    
    function regular_expressions($boolean)
    { 
        if(!preg_match("/[A-Z]{1}[a-z]{3}[0-9][.]p[Hh]p/",$boolean))
          { 
               
                return false;
                     
                  
               
          }
      
      else {
      
       print("true<br/>");
      
      } 
      }
          $qqq="Gone8.phpProblem" ;
      regular_expressions($qqq);
    

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