• sravani
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 2
    Replies

Hi all,

   i am new to webservices.i want to write sample rpc based wsdl class. please send me the sample code for this. wsdl class.Any one can u please help me .

 

Thanks in advance.

anu.......

 

  • September 09, 2011
  • Like
  • 0

Hi all,

    i want to pass parameters in vf page like /apex/sample?name="Test".Here Test should be displayed in vf page with out using controller.How to write the sample code for this .any one can u please help me.

 

thanks in advance 

  • September 08, 2011
  • Like
  • 0

Hi All,

    i wrote vf page for events.like this

public class eventsearch

{

public boolean cat{set;get;}

list<event> elist=new list<event>();

event e=new event();

public event getdates()

{

return e;

}

public void findevents()

{
cat=true;

if(e.startdate__c!==null)

{

date d=e.startdate__c;

for(event e:[select startdate__c from event where startdate__C>=:d])

{

elist.add(e);}
}

}

public list<event> getvalues()

{

return elist;

}

}

 

page like this:

 

<apex:page sidebar="false" controller="eventsearch"> 

<apex:form >

  <apex:inputfield value="{!dates.startdate__c}"/> 

<apex:commandButton action="{!findevents}" value="find"/> 

<apex:outputPanel rendered="{!cat}"> 

<apex:pageBlock > 

<apex:pageblocktable value="{!values}" var="ee"> 

<apex:column headerValue="from" value="{!ee.startdate__c}"/> 

</apex:pageblocktable> 

</apex:pageBlock> 

</apex:outputPanel> 

</apex:form>

</apex:page>

In the above code input field is displayed in vf page.but not visible in salesforce sites. But i did all CRUD and Field level security permissions for guest user. any one can u please help me.

 

Thanks in advance.

 

anu.....

  • September 07, 2011
  • Like
  • 0

hi all,

 i want to create the picklist field and values under particular object using vf page.any one canu please help me and send me the sample code .

 

 

thanks in advace.

sravani

Hi,

    i will try to run this class, i got an error like   <?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><CreateCustomerProfileResponse xmlns="https://api.authorize.net/soap/v1/"><CreateCustomerProfileResult><resultCode>Error</resultCode><messages><MessagesTypeMessage><code>E00007</code><text>User authentication failed due to invalid authentication values.</text></MessagesTypeMessage></messages><customerProfileId>0</customerProfileId></CreateCustomerProfileResult></CreateCustomerProfileResponse></soap:Body></soap:Envelope>

 

Public class callExternalWS 
    { 
        public void invokeExternalWs() 
        { 
            HttpRequest req = new HttpRequest(); 
            //Set HTTPRequest Method 
            req.setMethod('POST'); 
            req.setEndpoint('https://api.authorize.net/soap/v1/Service.asmx'); 
            req.setMethod('POST'); 
            req.setHeader('Content-Type', 'text/xml; charset=utf-8'); 
            req.setHeader('SOAPAction', 'https://api.authorize.net/soap/v1/CreateCustomerProfile'); 
            string b =   '<?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><CreateCustomerProfile xmlns="https://api.authorize.net/soap/v1/">'+ 
                          '<merchantAuthentication><name>8j4W5UyB</name>'+ 
                          '<transactionKey>7mR2ah8655gLSR8q</transactionKey></merchantAuthentication>'+ 
    '<profile><description>description</description>'+ 
                          '<email>sforce2009@gmail.com</email>'+ 
                          '<paymentProfiles>'+ 
                          '<CustomerPaymentProfileType><customerType>individual</customerType>'+ 
    '<payment><creditCard><cardNumber>6011000000000012</cardNumber>'+ 
                          '<expirationDate>2009-12</expirationDate></creditCard>'+ 
                          '</payment></CustomerPaymentProfileType></paymentProfiles></profile>'+ 
                          '</CreateCustomerProfile></soap:Body></soap:Envelope>'; 
            req.setBody(b); 
            Http http = new Http(); 
            try { 
              //Execute web service call here        
              HTTPResponse res = http.send(req);    
              //Helpful debug messages 
              System.debug(res.toString()); 
              System.debug('STATUS:'+res.getStatus()); 
              System.debug('STATUS_CODE:'+res.getStatusCode()); 
              System.debug('STATUS_CODE:'+res.getBody()); 
            //YOU CAN ALWAYS PARSE THE RESPONSE XML USING XmlStreamReader  CLASS 
           } catch(System.CalloutException e) { 
                //Exception handling goes here.... 
         }        
    } 
    }

 

 

 thanks

sravani

What is functionality of   lead- to-case

 

Thank u

hi,

     How to enable product family field in product2 object.

 

 

Thank you

Hi,

    i will try to run this class, i got an error like   <?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><CreateCustomerProfileResponse xmlns="https://api.authorize.net/soap/v1/"><CreateCustomerProfileResult><resultCode>Error</resultCode><messages><MessagesTypeMessage><code>E00007</code><text>User authentication failed due to invalid authentication values.</text></MessagesTypeMessage></messages><customerProfileId>0</customerProfileId></CreateCustomerProfileResult></CreateCustomerProfileResponse></soap:Body></soap:Envelope>

 

Public class callExternalWS 
    { 
        public void invokeExternalWs() 
        { 
            HttpRequest req = new HttpRequest(); 
            //Set HTTPRequest Method 
            req.setMethod('POST'); 
            req.setEndpoint('https://api.authorize.net/soap/v1/Service.asmx'); 
            req.setMethod('POST'); 
            req.setHeader('Content-Type', 'text/xml; charset=utf-8'); 
            req.setHeader('SOAPAction', 'https://api.authorize.net/soap/v1/CreateCustomerProfile'); 
            string b =   '<?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><CreateCustomerProfile xmlns="https://api.authorize.net/soap/v1/">'+ 
                          '<merchantAuthentication><name>8j4W5UyB</name>'+ 
                          '<transactionKey>7mR2ah8655gLSR8q</transactionKey></merchantAuthentication>'+ 
    '<profile><description>description</description>'+ 
                          '<email>sforce2009@gmail.com</email>'+ 
                          '<paymentProfiles>'+ 
                          '<CustomerPaymentProfileType><customerType>individual</customerType>'+ 
    '<payment><creditCard><cardNumber>6011000000000012</cardNumber>'+ 
                          '<expirationDate>2009-12</expirationDate></creditCard>'+ 
                          '</payment></CustomerPaymentProfileType></paymentProfiles></profile>'+ 
                          '</CreateCustomerProfile></soap:Body></soap:Envelope>'; 
            req.setBody(b); 
            Http http = new Http(); 
            try { 
              //Execute web service call here        
              HTTPResponse res = http.send(req);    
              //Helpful debug messages 
              System.debug(res.toString()); 
              System.debug('STATUS:'+res.getStatus()); 
              System.debug('STATUS_CODE:'+res.getStatusCode()); 
              System.debug('STATUS_CODE:'+res.getBody()); 
            //YOU CAN ALWAYS PARSE THE RESPONSE XML USING XmlStreamReader  CLASS 
           } catch(System.CalloutException e) { 
                //Exception handling goes here.... 
         }        
    } 
    }

 

 

 thanks

sravani

Hi all,

      i want to pass parameters to vf page without using controller in the url manually.What i passed the value in the url that value will print in vf page.Any one can u please send me the sample code.

Thanks in advance.

anu

  • September 08, 2011
  • Like
  • 0

hi,

     How to enable product family field in product2 object.

 

 

Thank you