• king kp
  • NEWBIE
  • 20 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 25
    Replies
Hi All,

I tried using the SOAP Web Services in Apex class but here  I am able to use the Method is:"Logon" in Apex class 
  String str1='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v7="urn://oracle.bi.webservices/v7">'
   +'<soapenv:Header/>'
   +'<soapenv:Body>'
      +'<v7:logon>'
         +'<v7:name>kullayappa adapala</v7:name>'
         +'<v7:password>Welcome123</v7:password>'
      +'</v7:logon>'
   +'</soapenv:Body>'
+'</soapenv:Envelope>';

HttpRequest req = new HttpRequest(); 
            req.setTimeout(120000);         
            req.setMethod('GET'); 
            req.setEndpoint(endPointURL);
            req.setHeader('Authorization', authorizationHeader);
            req.setHeader('Content-Type', 'text/xml;charset=UTF-8');
            req.setBody(str1);
            
        Http http = new Http();
          
        Transient HttpResponse res = new HttpResponse();
            res = http.send(req);

I am getting the Other response

is it working for "Logon Method in Apex class"  or Not

How Can I resolve this please help me on this
Hi ,

I am Integration between the Salesforce to External Service: I am facing the Issue "  Unable to tunnel through proxy. Proxy returns "HTTP/1.0 404 Not Found"
How can I resolve this please help in this Any one  thanks

regards
kullayappa
 
how to connect to salesforce OKTA using SSO Connectin, I tried Using the SSO but throwing this error please help on this.

User-added image

Thanks
kullayappa
Hi FRIENDS,


How to Connect to Salesforce to External Services using the Salesforce SSO 

Please Help me on this

Regards
kullayappa
Hi Friends,

Display the default value based on Parent record 

how i will do please help me on this 

Thanks
kullayappa
used this code throwing this error: "Unrecognized base64 character: ;"  can any one please help me
for(Dom.XMLNode child : xrec) {

    //system.debug('child..'+child);
        for (dom.XmlNode awr : child.getchildren() ) {
        //System.debug('awr...'+awr);
            for(dom.XmlNode xy:awr.getchildren()){
            // system.debug('xy...'+xy);
                for(dom.XmlNode anc :xy.getchildren()){


                 //if(anc.gettext() != null ){
                 baseco=true;
                encodedvalue=anc.gettext();
                 Blob d = EncodingUtil.base64Decode(encodedvalue);
                        //system.debug('d...'+d);

                    decodedstring = d.tostring(); 
                }
                
            }
          
        }
       
    }

Thanks
kullayappa
Hi Firends,

How to use the Java script in Apex class (OR)  in static resource stored Javascript we can use the Apex class,
please help me.


Thanks
kullayappa
  • September 19, 2016
  • Like
  • 0
Hi Friends,

How to Hexadecimal reponse code be the converted into XML from within Apex

Please help me

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Header/><env:Body><ns2:runReportResponse xmlns:ns2="http://xmlns.oracle.com/oxp/service/PublicReportService"><ns2:runReportReturn><ns2:reportBytes>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjwhRE9DVFlQRSBodG1sIFBV
QkxJQyAiLS8vVzNDLy9EVEQgWEhUTUwgMS4wIFN0cmljdC8vRU4iDQogICAgImh0dHA6Ly93d3cu
dzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXN0cmljdC5kdGQiPg0KPGh0bWwgeG1sbnM9Imh0
dHA6Ly93d3cudzMub3JnLzE5OTkveGh0bWwiPg0KPCEtLSBHZW5lcmF0ZWQgYnkgT3JhY2xlIEJJ
IFB1Ymxpc2hlciAxMS4xLjEuNy4wQkktRkFSRUwxMC1CUCAtLT4NCjxoZWFkPg0KPG1ldGEgaHR0
cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7IGNoYXJzZXQ9VVRGLTgi
Lz4NCjx0aXRsZT48L3RpdGxlPg0KPHN0eWxlIHR5cGU9InRleHQvY3NzIiBpZD0iaW50ZXJuYWxT
dHlsZSI+DQouYzAge3RleHQtYWxpZ246IGNlbnRlcjtsaW5lLWhlaWdodDogMjcuNzQ0cHQ7bWFy
Z2luLXRvcDogMC4wcHQ7bWFyZ2luLWJvdHRvbTogMC4wcHQ7fQ0KLmMxIHtmb250LWZhbWlseTog
J0FyaWFsJztmb250LX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48cCBjbGFzcz0iYzYiPjxzcGFuIGNsYXNzPSJjNSI+cXFhYTwvc3Bhbj48L3A+DQo8L3Rk
Pg0KPC90cj4NCjx0ciBjbGFzcz0iYzciPg0KPHRkIHZhbGlnbj0idG9wIiBjbGFzcz0iYzgiPjxw
IGNsYXNzPSJjNCI+PHNwYW4gY2xhc3M9ImM1Ij4xMjIwMDEuMDwvc3Bhbj48L3A+DQo8L3RkPg0K
PHRkIHZhbGlnbj0idG9wIiBjbGFzcz0iYzgiPjxwIGNsYXNzPSJjNiI+PHNwYW4gY2xhc3M9ImM1
Ij5teV9vcHB0eTwvc3Bhbj48L3A+DQo8L3RkPg0KPC90cj4NCjx0ciBjbGFzcz0iYzkiPg0KPHRk
IHZhbGlnbj0idG9wIiBjbGFzcz0iYzMiPjxwIGNsYXNzPSJjMTAiPjxici8+PC9wPg0KPC90ZD4N
Cjx0ZCB2YWxpZ249InRvcCIgY2xhc3M9ImMzIj48cCBjbGFzcz0iYzExIj48YnIvPjwvcD4NCjwv
dGQ+DQo8L3RyPg0KPC90YWJsZT4NCjwvYm9keT4NCjwvaHRtbD4NCg==</ns2:reportBytes><ns2:reportContentType>text/html;charset=UTF-8</ns2:reportContentType><ns2:reportFileID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns2:reportLocale xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns2:metaDataList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/></ns2:runReportReturn></ns2:runReportResponse></env:Body></env:Envelope>

Thanks
kullai

Hi Firends,

I have to generating the Enterprice WSDL using the Soap also,then How to Create the Account in SOAP UI 

https://testdriv-dev-ed.my.salesforce.com/soap/wsdl.jsp?type=*&ver_sf_com_apps=1.7

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com">
   <soapenv:Header>
      <urn:EmailHeader>
         <urn:triggerAutoResponseEmail>?</urn:triggerAutoResponseEmail>
         <urn:triggerOtherEmail>?</urn:triggerOtherEmail>
         <urn:triggerUserEmail>?</urn:triggerUserEmail>
      </urn:EmailHeader>
      <urn:PackageVersionHeader>
         <!--Zero or more repetitions:-->
         <urn:packageVersions>
            <urn:majorNumber>?</urn:majorNumber>
            <urn:minorNumber>?</urn:minorNumber>
            <urn:namespace>?</urn:namespace>
         </urn:packageVersions>
      </urn:PackageVersionHeader>
      <urn:DebuggingHeader>
         <!--Zero or more repetitions:-->
         <urn:categories>
            <urn:category>?</urn:category>
            <urn:level>?</urn:level>
         </urn:categories>
         <urn:debugLevel>?</urn:debugLevel>
      </urn:DebuggingHeader>
      <urn:LocaleOptions>
         <!--Optional:-->
         <urn:language>?</urn:language>
         <!--Optional:-->
         <urn:localizeErrors>?</urn:localizeErrors>
      </urn:LocaleOptions>
      <urn:DuplicateRuleHeader>
         <urn:allowSave>?</urn:allowSave>
         <urn:includeRecordDetails>?</urn:includeRecordDetails>
         <urn:runAsCurrentUser>?</urn:runAsCurrentUser>
      </urn:DuplicateRuleHeader>
      <urn:AllOrNoneHeader>
         <urn:allOrNone>?</urn:allOrNone>
      </urn:AllOrNoneHeader>
      <urn:StreamingEnabledHeader>
         <urn:streamingEnabled>?</urn:streamingEnabled>
      </urn:StreamingEnabledHeader>
      <urn:DisableFeedTrackingHeader>
         <urn:disableFeedTracking>?</urn:disableFeedTracking>
      </urn:DisableFeedTrackingHeader>
      <urn:AllowFieldTruncationHeader>
         <urn:allowFieldTruncation>?</urn:allowFieldTruncation>
      </urn:AllowFieldTruncationHeader>
      <urn:MruHeader>
         <urn:updateMru>?</urn:updateMru>
      </urn:MruHeader>
      <urn:AssignmentRuleHeader>
         <urn:assignmentRuleId>?</urn:assignmentRuleId>
         <urn:useDefaultRule>?</urn:useDefaultRule>
      </urn:AssignmentRuleHeader>
      <urn:SessionHeader>
         <urn:sessionId>?</urn:sessionId>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:create>
         <!--Zero or more repetitions:-->
         <urn:sObjects>
            <!--Zero or more repetitions:-->
            <urn1:fieldsToNull>?</urn1:fieldsToNull>
            <urn1:Id>?</urn1:Id>
         </urn:sObjects>
      </urn:create>
   </soapenv:Body>
</soapenv:Envelope>


Thanks
kullayappa
Hi to all,
How to Excute this class please help me

@RestResource(urlMapping='/Merchandise/*')
global with sharing class MerchandiseManager {
    @HttpGet
    global static Account getMerchandiseById() {
        RestRequest req = RestContext.request;
        String merchId = req.requestURI.substring(
        req.requestURI.lastIndexOf('/')+1);
        Account result =
        [SELECT Name,NumberofLocations__c,DunsNumber,Description
        FROM Account];
        return result;
    }
    @HttpPost
    global static String createMerchandise(String name,
        String description, Decimal price, Double inventory) {
        Account m = new Account(
        Name=name,
        Description=description,
        NumberofLocations__c=price);
        //DunsNumber=inventory);
        insert m;
        return m.Id;
    }
    
}


thanks
kullaia
Hi Firends,

External WSDL URL Using the Salesforce how to do This One Please help me.

Thanks
kullayappa
Hi Friends,

how to  salesforce WSDL or Rest  API Url creating please Help me

Thanks 
kullai
Hi Friends ,

I have to Integrate Salesforce to External Services 

Throwing the Error Is "Internal Server Error",Status Code :500 " Htttpresponse

External Services Has asking the JSON Format  in this Place Creating the XML Format How To resolve this Could Please Help me.



global class ResponseclsforFIC{
@future(callout=true)
    public static void Responsefrom3rdparty(string syncid){
    try{
      String endPointURL = 'https://cacf-test.crm.us2.oraclecloud.com/crmCommonApi/resources/latest/accounts';
      String userName = 'kullayappa.adapala@config-consultants.com';
      String password = 'Kull@i12345';
      
      // Specify the required user name and password to access the endpoint 
      // As well as the header and header information 
      Blob headerValue = Blob.valueOf(userName + ':' + password);
      String authorizationHeader = 'BASIC ' +EncodingUtil.base64Encode(headerValue);

        DOM.Document resDoc = new DOM.Document();        
            // Send the request
        HttpRequest req = new HttpRequest();   
     //   req.setTimeout(120000);         
        req.setMethod('POST'); 
        req.setEndpoint(endPointURL);
        req.setHeader('Authorization', authorizationHeader);
        sfdcFICxmlcreator genrate = new sfdcFICxmlcreator();
        String xml = genrate.xmlgenrate(syncid);
        req.setHeader('content-type', 'application/vnd.oracle.adf.resourceitem+json; charset=utf-8');
        req.setBody(xml);
        
         System.Debug('......... Body ...........'+xml);
        Http http = new Http();
          
       Transient HttpResponse res = new HttpResponse();
        res = http.send(req); 
          //HttpResponse res = http.send(request);  
           res = http.send(req); 
        system.debug('res.......'+res.getbody());
        Contact sfintegrate = new Contact();
       
        sfintegrate.Accountid=syncid;
        sfintegrate.LastName='ramgopalvarma';
        sfintegrate.Request_Status__c=res.getStatus();
         sfintegrate.Status_Code__c=string.valueof(res.getStatusCode());
         
         system.debug('>>>>>>>>>>>'+syncid);
         system.debug('????????????'+string.valueof(res.getStatusCode()));
         if(sfintegrate.Status_Code__c!='200'){
         sfintegrate.FIC_response__c=res.getbody();
         }
         sfintegrate.Execution_time__c=string.valueof(System.now());
         sfintegrate.Request_Body__c=xml;
         insert sfintegrate ;
      }catch(Exception e){
      System.debug('Error::'+e.getMessage());
    }
  }
 }


Thanks
kullayappa
Hi ,

How POST Account Information JSON format using Apex.Could You Please Help Me

Thanks 
kullayappa 
Hi ,

Integration Between Salesforce to OracleSalesCloud Using the Rest Api Please Help me


Regards
kullai
how to connect to salesforce OKTA using SSO Connectin, I tried Using the SSO but throwing this error please help on this.

User-added image

Thanks
kullayappa
Hi Friends,

how to  salesforce WSDL or Rest  API Url creating please Help me

Thanks 
kullai
Hi ,

I am Integration between the Salesforce to External Service: I am facing the Issue "  Unable to tunnel through proxy. Proxy returns "HTTP/1.0 404 Not Found"
How can I resolve this please help in this Any one  thanks

regards
kullayappa
 
how to connect to salesforce OKTA using SSO Connectin, I tried Using the SSO but throwing this error please help on this.

User-added image

Thanks
kullayappa
used this code throwing this error: "Unrecognized base64 character: ;"  can any one please help me
for(Dom.XMLNode child : xrec) {

    //system.debug('child..'+child);
        for (dom.XmlNode awr : child.getchildren() ) {
        //System.debug('awr...'+awr);
            for(dom.XmlNode xy:awr.getchildren()){
            // system.debug('xy...'+xy);
                for(dom.XmlNode anc :xy.getchildren()){


                 //if(anc.gettext() != null ){
                 baseco=true;
                encodedvalue=anc.gettext();
                 Blob d = EncodingUtil.base64Decode(encodedvalue);
                        //system.debug('d...'+d);

                    decodedstring = d.tostring(); 
                }
                
            }
          
        }
       
    }

Thanks
kullayappa
Hi Firends,

How to use the Java script in Apex class (OR)  in static resource stored Javascript we can use the Apex class,
please help me.


Thanks
kullayappa
  • September 19, 2016
  • Like
  • 0
Hi Friends,

How to Hexadecimal reponse code be the converted into XML from within Apex

Please help me

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Header/><env:Body><ns2:runReportResponse xmlns:ns2="http://xmlns.oracle.com/oxp/service/PublicReportService"><ns2:runReportReturn><ns2:reportBytes>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjwhRE9DVFlQRSBodG1sIFBV
QkxJQyAiLS8vVzNDLy9EVEQgWEhUTUwgMS4wIFN0cmljdC8vRU4iDQogICAgImh0dHA6Ly93d3cu
dzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXN0cmljdC5kdGQiPg0KPGh0bWwgeG1sbnM9Imh0
dHA6Ly93d3cudzMub3JnLzE5OTkveGh0bWwiPg0KPCEtLSBHZW5lcmF0ZWQgYnkgT3JhY2xlIEJJ
IFB1Ymxpc2hlciAxMS4xLjEuNy4wQkktRkFSRUwxMC1CUCAtLT4NCjxoZWFkPg0KPG1ldGEgaHR0
cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7IGNoYXJzZXQ9VVRGLTgi
Lz4NCjx0aXRsZT48L3RpdGxlPg0KPHN0eWxlIHR5cGU9InRleHQvY3NzIiBpZD0iaW50ZXJuYWxT
dHlsZSI+DQouYzAge3RleHQtYWxpZ246IGNlbnRlcjtsaW5lLWhlaWdodDogMjcuNzQ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PjxzcGFuIGNsYXNz
PSJjNSI+MTMwMDE1LjA8L3NwYW4+PC9wPg0KPC90ZD4NCjx0ZCB2YWxpZ249InRvcCIgY2xhc3M9
ImM4Ij48cCBjbGFzcz0iYzYiPjxzcGFuIGNsYXNzPSJjNSI+cXFhYTwvc3Bhbj48L3A+DQo8L3Rk
Pg0KPC90cj4NCjx0ciBjbGFzcz0iYzciPg0KPHRkIHZhbGlnbj0idG9wIiBjbGFzcz0iYzgiPjxw
IGNsYXNzPSJjNCI+PHNwYW4gY2xhc3M9ImM1Ij4xMjIwMDEuMDwvc3Bhbj48L3A+DQo8L3RkPg0K
PHRkIHZhbGlnbj0idG9wIiBjbGFzcz0iYzgiPjxwIGNsYXNzPSJjNiI+PHNwYW4gY2xhc3M9ImM1
Ij5teV9vcHB0eTwvc3Bhbj48L3A+DQo8L3RkPg0KPC90cj4NCjx0ciBjbGFzcz0iYzkiPg0KPHRk
IHZhbGlnbj0idG9wIiBjbGFzcz0iYzMiPjxwIGNsYXNzPSJjMTAiPjxici8+PC9wPg0KPC90ZD4N
Cjx0ZCB2YWxpZ249InRvcCIgY2xhc3M9ImMzIj48cCBjbGFzcz0iYzExIj48YnIvPjwvcD4NCjwv
dGQ+DQo8L3RyPg0KPC90YWJsZT4NCjwvYm9keT4NCjwvaHRtbD4NCg==</ns2:reportBytes><ns2:reportContentType>text/html;charset=UTF-8</ns2:reportContentType><ns2:reportFileID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns2:reportLocale xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns2:metaDataList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/></ns2:runReportReturn></ns2:runReportResponse></env:Body></env:Envelope>

Thanks
kullai

Hi Firends,

I have to generating the Enterprice WSDL using the Soap also,then How to Create the Account in SOAP UI 

https://testdriv-dev-ed.my.salesforce.com/soap/wsdl.jsp?type=*&ver_sf_com_apps=1.7

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com">
   <soapenv:Header>
      <urn:EmailHeader>
         <urn:triggerAutoResponseEmail>?</urn:triggerAutoResponseEmail>
         <urn:triggerOtherEmail>?</urn:triggerOtherEmail>
         <urn:triggerUserEmail>?</urn:triggerUserEmail>
      </urn:EmailHeader>
      <urn:PackageVersionHeader>
         <!--Zero or more repetitions:-->
         <urn:packageVersions>
            <urn:majorNumber>?</urn:majorNumber>
            <urn:minorNumber>?</urn:minorNumber>
            <urn:namespace>?</urn:namespace>
         </urn:packageVersions>
      </urn:PackageVersionHeader>
      <urn:DebuggingHeader>
         <!--Zero or more repetitions:-->
         <urn:categories>
            <urn:category>?</urn:category>
            <urn:level>?</urn:level>
         </urn:categories>
         <urn:debugLevel>?</urn:debugLevel>
      </urn:DebuggingHeader>
      <urn:LocaleOptions>
         <!--Optional:-->
         <urn:language>?</urn:language>
         <!--Optional:-->
         <urn:localizeErrors>?</urn:localizeErrors>
      </urn:LocaleOptions>
      <urn:DuplicateRuleHeader>
         <urn:allowSave>?</urn:allowSave>
         <urn:includeRecordDetails>?</urn:includeRecordDetails>
         <urn:runAsCurrentUser>?</urn:runAsCurrentUser>
      </urn:DuplicateRuleHeader>
      <urn:AllOrNoneHeader>
         <urn:allOrNone>?</urn:allOrNone>
      </urn:AllOrNoneHeader>
      <urn:StreamingEnabledHeader>
         <urn:streamingEnabled>?</urn:streamingEnabled>
      </urn:StreamingEnabledHeader>
      <urn:DisableFeedTrackingHeader>
         <urn:disableFeedTracking>?</urn:disableFeedTracking>
      </urn:DisableFeedTrackingHeader>
      <urn:AllowFieldTruncationHeader>
         <urn:allowFieldTruncation>?</urn:allowFieldTruncation>
      </urn:AllowFieldTruncationHeader>
      <urn:MruHeader>
         <urn:updateMru>?</urn:updateMru>
      </urn:MruHeader>
      <urn:AssignmentRuleHeader>
         <urn:assignmentRuleId>?</urn:assignmentRuleId>
         <urn:useDefaultRule>?</urn:useDefaultRule>
      </urn:AssignmentRuleHeader>
      <urn:SessionHeader>
         <urn:sessionId>?</urn:sessionId>
      </urn:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <urn:create>
         <!--Zero or more repetitions:-->
         <urn:sObjects>
            <!--Zero or more repetitions:-->
            <urn1:fieldsToNull>?</urn1:fieldsToNull>
            <urn1:Id>?</urn1:Id>
         </urn:sObjects>
      </urn:create>
   </soapenv:Body>
</soapenv:Envelope>


Thanks
kullayappa
Hi Friends,

how to  salesforce WSDL or Rest  API Url creating please Help me

Thanks 
kullai
Hi Friends ,

I have to Integrate Salesforce to External Services 

Throwing the Error Is "Internal Server Error",Status Code :500 " Htttpresponse

External Services Has asking the JSON Format  in this Place Creating the XML Format How To resolve this Could Please Help me.



global class ResponseclsforFIC{
@future(callout=true)
    public static void Responsefrom3rdparty(string syncid){
    try{
      String endPointURL = 'https://cacf-test.crm.us2.oraclecloud.com/crmCommonApi/resources/latest/accounts';
      String userName = 'kullayappa.adapala@config-consultants.com';
      String password = 'Kull@i12345';
      
      // Specify the required user name and password to access the endpoint 
      // As well as the header and header information 
      Blob headerValue = Blob.valueOf(userName + ':' + password);
      String authorizationHeader = 'BASIC ' +EncodingUtil.base64Encode(headerValue);

        DOM.Document resDoc = new DOM.Document();        
            // Send the request
        HttpRequest req = new HttpRequest();   
     //   req.setTimeout(120000);         
        req.setMethod('POST'); 
        req.setEndpoint(endPointURL);
        req.setHeader('Authorization', authorizationHeader);
        sfdcFICxmlcreator genrate = new sfdcFICxmlcreator();
        String xml = genrate.xmlgenrate(syncid);
        req.setHeader('content-type', 'application/vnd.oracle.adf.resourceitem+json; charset=utf-8');
        req.setBody(xml);
        
         System.Debug('......... Body ...........'+xml);
        Http http = new Http();
          
       Transient HttpResponse res = new HttpResponse();
        res = http.send(req); 
          //HttpResponse res = http.send(request);  
           res = http.send(req); 
        system.debug('res.......'+res.getbody());
        Contact sfintegrate = new Contact();
       
        sfintegrate.Accountid=syncid;
        sfintegrate.LastName='ramgopalvarma';
        sfintegrate.Request_Status__c=res.getStatus();
         sfintegrate.Status_Code__c=string.valueof(res.getStatusCode());
         
         system.debug('>>>>>>>>>>>'+syncid);
         system.debug('????????????'+string.valueof(res.getStatusCode()));
         if(sfintegrate.Status_Code__c!='200'){
         sfintegrate.FIC_response__c=res.getbody();
         }
         sfintegrate.Execution_time__c=string.valueof(System.now());
         sfintegrate.Request_Body__c=xml;
         insert sfintegrate ;
      }catch(Exception e){
      System.debug('Error::'+e.getMessage());
    }
  }
 }


Thanks
kullayappa
Hi ,

How POST Account Information JSON format using Apex.Could You Please Help Me

Thanks 
kullayappa 
Hello,

I am working on integrating Salesforce.com and external system (ERP).  I am making a call out using SOAP API

What I have provided to third party?
- Create a user for integration and shared the username,password&securitytoken
-Created an global apex class with webservice methods.
-Generated WSDL from above class
-Generated Enterprise WSDL

What I received from third party?
-WSDL (https end point)
-.PEM certificate and .pfx format certifcate

Development process on Salesforce side

I have generated a single Apex class (Gnerate from WSDL) from the WSDL I recieved from third party.

One of the classes generated is below

public class HTTPS_Port {
        public String endpoint_x = ‘bhla bhla…’;
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;



            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://sap.com/xi/WebService/soap1.1',
              'urn:sap-com:document:sap:soap:functions:mc-style',
              'YRequest',
              'urn:sap-com:document:sap:soap:functions:mc-style',
              'YRequestResponse',
              'WebServiceClient.YRequestResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.FStatus;
        }
    }


I have generated an apex class to call the third party service (above generated class). In this class I have to provide the following

public String clientCertName_x;// may be this is required if the certificate is generated with in SAlesforce org. So I might not need to pass this info.
        public String clientCert_x; // This is the certifcate which has based64. I am good with this
        public String clientCertPasswd_x; // what is the password i need to enter  here. I asked third party to give this password but they say don't have it. Where do i get this password from?

My call fails if I don't enter the password. Error is - CertPasswd cannot be null
If the give a blank string for the password, the Error is "Error MessageIO Exception: DER input, Integer tag error"

I am stuck with the password issue here. Can someone help me out if there is something to be on Salesforce side? Am I missing something?

Any help is greatly appreciated.

Thank you!


Hi,

 

I am working on salesforce integration with SwipeClock Online Server. I am trying to call a method of SwipeClock API but receiving following error:

System.CalloutException: Unable to tunnel through proxy. Proxy returns "HTTP/1.0 404 Not Found

 

I have white listed the following IPs in Salesforce under Setup-> Security Controls -> Network Access :

204.14.232.0/23 East Coast Data Center (set one)
204.14.237.0/24 East Coast Data Center (set two)
96.43.144.0/22  MidWest Data Centers
96.43.148.0/22  MidWest Data Centers
204.14.234.0/23 West Coast Data Center (set one)
204.14.238.0/23 West Coast Data Center (set two)
182.50.76.0/22  Japan Data Center

 

But still facing the error.

 

Pls help me. I need to resolve this issue as a high priority item.

 

Thanks,

Pragati