• Hetal Sheth
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 6
    Replies
I have imported wsdl.So two class are created.
I am trying to call one method of that class.
For that I am using below code

public class soapWebserviceForHomeKeepers {
    public static long soapWebserviceForAgencyData(){        
        serviceArmHudGov.ArmServiceImplPort innerobj=new serviceArmHudGov.ArmServiceImplPort();
        innerobj.inputHttpHeaders_x = new Map<String, String>();
        //Request time out
        innerobj.timeout_x=30000;
        //Login information
        String username = '***';
        String password = '***';
        //Basic Authorization
        Blob headerValue = Blob.valueOf(username + ':' + password);        
        String authorizationHeader = 'Basic ' +EncodingUtil.base64Encode(headerValue);         
        innerobj.inputHttpHeaders_x.put('Authorization',authorizationHeader);   
        innerobj.clientCert_x ='*************zCCBXwGCSqGSIb**************IFZTCCBWEGCyqGSIb3DQEMCgECoIIE+jCCBPYwKAYKKoZIhvcNAQwBAzAaBBRFdkTv401sbTHedTUDT6dkkHKjiAICBAAEggTIQl+U7LgsdxiRyJJBk5QpVYgsLtoDeaDQlpL136gpoYY76JcM6WVQ5LxvKnpki/PXm+cNnKP7STtzutlkf30wWqkdvNQMQx1dZMZcUBtids+mQ+xbA3ZaKs8mPxzGwNmpDgmSGAi+cFEfVbrmbM/ez46xntHstu1X4Nc8pBZFOG17pngvo7JCZiO***********JT/Ac0M4SpACWlQKhtsIi4YHLgRoBILstJlPAQQbrIKsyEvDbb91HDYe8LiQcl1bPh3P6gyDibW15bkZA+71l21MNrNnJxAvL94Clw2vJLkHfDNXtuy0jFQ7C5itoCke2Bp/5DAreCx3rFZgEvZpxfUqYZIbPBUQIpbXCdGe6V/Asf1bZXzebO0mqwCtBvNnWSM3U/H9AuSxRThMRlUBBsADWZFT/plppkAWz944+FeXQsBR6xJppkQsDRswKJhNuI1V1bVRYGRKQUN6EfAaRTBKi0sHImYRCXSw3Fk/2wXw8+nrxHv8vUPQ9JtB7ch7+CXc43TM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gOBc5OCJLuIcQbYg+dHsp0UBltBAglElQCdMYnNKGrwMIGhf+1kqzdMlX+5kaT7CHENMyO54WJ+vKss+5ywi8cFCxPAI8n5BUV+VAI7X94j5jdghc/t9u1S0hCKunhQ5vIYjRo3cZb+RXZ9UA6671k4pjraHzk7MDjt1H8pLSnzKXVipgg/7+ZWLH+QyzcomvCNuzvAtQrx55Bi4AwSvTHdb7y2+mWj1lLBu8vKrv+Fuv/Zgf+qAS65iNQb2tluyZl1Fd/vWhT0nEZ8nFFbiXzbTzPnDVTKsSa3M0bFY9LrKQZVvZIu/eH5LJ7Cua+qrYynPSYH5dNJ7CQUc4Yoa9koQfwHXf6IJmc5VINT2C1zf3s0dPLxrGN6BI7rl9yuJQlO6CuJg9OJc3FeFbW5SAK8/vKkJ5ImyPuMxaEUTsA/cqmbD06eXV9ZQ2m7KPr1i7fs8YRXrlbS17MzMmMKngj50WxWGujhILPeSpxkt9dvXZrj37LXiovdA1SmngQo7frKZjz+mG4JI4lTCE5WdxfrMoSsO9mcMBs7S9L7JmR11KHBuxDuIpL2pDxN5ssjyW0m8q9y3IWNd4aM4TDoZWLmKW//I7whgzLUguA/B8KhYfJz8ijAU+0V2Gg+xoS74QG8Xj6SvU6iN79G7aG+aSA0ZHTA8CCUci7N4p1dYHHQJmoQXXpDmMHQRBfvqIkUE/IlSGM6swbHB5BepFpiRVNG0tSCovyow572NYk0ABmGkUvd3rnv/fzhuWkgLbBG7DjxzhYYIuEHhWj8JBRGnALAI+J2botqP6mjlrpIpcICsK9LS6MiWjnlfWcdFUW1AagKNArosATsDA9MCEwCQYFKw4DAhoFAAQUATvCALA0oIQdABecqAuwuB00UP4EFOdH1AncZeQHgxXzrQeh7ufqDSIkAgIEAA==';
        innerobj.clientCertPasswd_x = 'ouhud8120';    
         innerobj.inputHttpHeaders_x.put('username',username);
         innerobj.inputHttpHeaders_x.put('password',password);
        innerobj.inputHttpHeaders_x.put('host','armpilot.hud.gov');
        innerobj.inputHttpHeaders_x.put('domain','https://armpilot.hud.gov/ARM/ARM/');
        
        //Submission Header
        serviceArmHudGov.submissionHeader5_0_element submissionHeader5_0_elementObj= new serviceArmHudGov.submissionHeader5_0_element();      
                        
        submissionHeader5_0_elementObj.agcHcsId='****';
        submissionHeader5_0_elementObj.agcName='****';
        submissionHeader5_0_elementObj.cmsPassword='****';    
        submissionHeader5_0_elementObj.fiscalYearId='21';
        submissionHeader5_0_elementObj.cmsVendorId='79';  
        //End Point Url
            innerobj.endpoint_x='https://armpilot.hud.gov/ARM/ARM/';   
        //Agency Data in xml
        String submissionData = '<?xml version="1.0" encoding="UTF-8"?><tns:SubmissionData xsi:schemaLocation="http://gov.hud.arm/agency_profile_databag_5_0 agency_profile_databag_5_0.xsd" xmlns:tns="http://gov.hud.arm/agency_profile_databag_5_0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><tns:AgencyProfileData><tns:Agency_EIN>38-6142925</tns:Agency_EIN><tns:Reported_Month>6</tns:Reported_Month><tns:Agency_DUN_Nbr>172773500</tns:Agency_DUN_Nbr><tns:Agency_Physical_Address1>38505 Country Club Dr</tns:Agency_Physical_Address1><tns:Agency_Physical_Address2>Suite 210</tns:Agency_Physical_Address2><tns:Agency_Physical_City>Farmington Hills</tns:Agency_Physical_City><tns:Agency_Physical_State>28</tns:Agency_Physical_State><tns:Agency_Physical_Zip>48331</tns:Agency_Physical_Zip><tns:Agency_Website>http://www.greenpath.com</tns:Agency_Website><tns:Agency_Phone_Nbr>248-553-5400</tns:Agency_Phone_Nbr><tns:Agency_Tollfree_Phone_Nbr>888-860-4167</tns:Agency_Tollfree_Phone_Nbr><tns:Agency_Fax_Nbr>248-553-8970</tns:Agency_Fax_Nbr><tns:Agency_Email>N/A</tns:Agency_Email><tns:Agency_Faith_Based_Ind>N</tns:Agency_Faith_Based_Ind><tns:Agency_Colonias_Ind>N</tns:Agency_Colonias_Ind><tns:Agency_Migrfarm_Worker_Ind>N</tns:Agency_Migrfarm_Worker_Ind><tns:Agency_Counseling_Budget_Amount>0.00</tns:Agency_Counseling_Budget_Amount><tns:Agency_Counseling_Methods><tns:Counseling_Method>1</tns:Counseling_Method><tns:Counseling_Method>2</tns:Counseling_Method></tns:Agency_Counseling_Methods><tns:Agency_Languages><tns:Language>19</tns:Language><tns:Language>20</tns:Language></tns:Agency_Languages></tns:AgencyProfileData><tns:Agency_Contacts><tns:Agency_Contact><tns:Contact_Type>11</tns:Contact_Type><tns:Contact_Fname>Setina</tns:Contact_Fname><tns:Contact_Lname>Briggs</tns:Contact_Lname><tns:Contact_Title>1</tns:Contact_Title><tns:Contact_Address1>38505 Country Club Dr</tns:Contact_Address1><tns:Contact_Address2>Suite 210</tns:Contact_Address2><tns:Contact_City>Farmington Hills</tns:Contact_City><tns:Contact_State>28</tns:Contact_State><tns:Contact_Zip>48331</tns:Contact_Zip><tns:Contact_Phone_Nbr>248-553-5400</tns:Contact_Phone_Nbr><tns:Contact_Ext_Nbr>2463</tns:Contact_Ext_Nbr><tns:Contact_Fax_Nbr>248-553-8970</tns:Contact_Fax_Nbr><tns:Contact_Email>sbriggs@greenpath.com</tns:Contact_Email></tns:Agency_Contact><tns:Agency_Contact><tns:Contact_Type>2</tns:Contact_Type><tns:Contact_Fname>Setina</tns:Contact_Fname><tns:Contact_Lname>Briggs</tns:Contact_Lname><tns:Contact_Title>1</tns:Contact_Title><tns:Contact_Address1>38505 Country Club Dr</tns:Contact_Address1><tns:Contact_Address2>Suite 210</tns:Contact_Address2><tns:Contact_City>Farmington Hills</tns:Contact_City><tns:Contact_State>28</tns:Contact_State><tns:Contact_Zip>48331</tns:Contact_Zip><tns:Contact_Phone_Nbr>248-553-5400</tns:Contact_Phone_Nbr><tns:Contact_Ext_Nbr>2463</tns:Contact_Ext_Nbr><tns:Contact_Fax_Nbr>248-553-8970</tns:Contact_Fax_Nbr><tns:Contact_Email>sbriggs@greenpath.com</tns:Contact_Email></tns:Agency_Contact><tns:Agency_Contact><tns:Contact_Type>3</tns:Contact_Type><tns:Contact_Fname>Setina</tns:Contact_Fname><tns:Contact_Lname>Briggs</tns:Contact_Lname><tns:Contact_Title>1</tns:Contact_Title><tns:Contact_Address1>38505 Country Club Dr</tns:Contact_Address1><tns:Contact_Address2>Suite 210</tns:Contact_Address2><tns:Contact_City>Farmington Hills</tns:Contact_City><tns:Contact_State>28</tns:Contact_State><tns:Contact_Zip>48331</tns:Contact_Zip><tns:Contact_Phone_Nbr>248-553-5400</tns:Contact_Phone_Nbr><tns:Contact_Ext_Nbr>2463</tns:Contact_Ext_Nbr><tns:Contact_Fax_Nbr>248-553-8970</tns:Contact_Fax_Nbr><tns:Contact_Email>sbriggs@greenpath.com</tns:Contact_Email></tns:Agency_Contact></tns:Agency_Contacts></tns:SubmissionData>';        
        
        
        Blob submissionDataBlob = Blob.valueOf(submissionData);
        string submissionDataBlobvalue = EncodingUtil.base64Encode(submissionDataBlob);        
        //Call webservices
         innerobj.inputHttpHeaders_x.put('Content-Type', 'text/xml;charset=UTF-8');
         innerobj.inputHttpHeaders_x.put('Content-Length', String.valueOf(submissionDataBlobvalue.length()));
         innerobj.inputHttpHeaders_x.put('Accept-Encoding', 'gzip,deflate');
        
         long submissionId= innerobj.postAgencyData(submissionHeader5_0_elementObj,'TEXT/XML',submissionDataBlobvalue);
         return submissionId;   
    }
   
}
---------------------------------------------------------------------------------
It is giving me below error
System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: There was a problem parsing your XML submission. Please review and correct these errors, then resubmit. LINE: 1 : cvc-complex-type.2.4.a: Invalid content was found starting with element 'submissionHeader5.0'. One of '{"http://service.arm.hud.gov/":submissionHeader5.0}' is expected. faultcode=ns1:Receiver faultactor=
--------------------------------------------------------------
When I have debug I found that the xml is not created properly
it is created  like below
------------------------------------------------
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Header /><env:Body>

<m:postAgencyData xmlns:m="http://service.arm.hud.gov/">
<submissionHeader5.0>
<agcHcsId>****</agcHcsId>
<agcName>*****</agcName><fiscalYearId>21</fiscalYearId><cmsVendorId>79</cmsVendorId><cmsPassword>*****</cmsPassword></submissionHeader5.0><submissionDataEncoding>TEXT/XML</submissionDataEncoding>
<submissionData>data</submissionData>
</m:postAgencyData>
</env:Body></env:Envelope>
---------------------------------
But our server expeact xml like below so what change have to make in apex class

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Header /><env:Body>

<postAgencyData xmlns="http://service.arm.hud.gov/">
<submissionHeader5.0>
<agcHcsId>****</agcHcsId>
<agcName>*****</agcName><fiscalYearId>21</fiscalYearId><cmsVendorId>79</cmsVendorId><cmsPassword>*****</cmsPassword></submissionHeader5.0><submissionDataEncoding>TEXT/XML</submissionDataEncoding>
<submissionData>data</submissionData>
</postAgencyData>
</env:Body></env:Envelope>



 
We are building SF web service out bound clients.  For various reason we are stuck with the an important area. 

1) Is it mandatory to have web service to have a third party certificate as described here ( https://developer.salesforce.com/page/Outbound_Messaging_SSL_CA_Certificates). I am surprised with such a restriction as implementor never had certificate before and most of their web services clients are able to communicate just fine.

2) It would be great if someone can provide an official SF web service documentation where I can look at examples.

Thanks,
Unmesh
I have created below webservice to  call soap webservice but i cannot call the webservice.
I am getting below error while calling  the web service
---------------
Error
System.CalloutException: IO Exception: Detect premature EOF
-------------
Code

public class soapWebserviceForHomeKeepers {
    public static long soapWebserviceForAgencyData(){        
        serviceArmHudGov.ArmServiceImplPort innerobj=new serviceArmHudGov.ArmServiceImplPort();
        innerobj.inputHttpHeaders_x = new Map<String, String>();
        //Request time out
        innerobj.timeout_x=3000;
        
        //Login information
        String username = '*****';
        String password = '*****';
        
        //Basic Authorization
        Blob headerValue = Blob.valueOf(username + ':' + password);
        String authorizationHeader = 'Basic ' +EncodingUtil.base64Encode(headerValue);         
        innerobj.inputHttpHeaders_x.put('Authorization',authorizationHeader);  
      //  innerobj.inputHttpHeaders_x.put('Authorization','Basic TVgxNTg3OkFybTV0c3Q=');  
        
        
      
        // innerobj.clientCertName_x ='arm_test';
        innerobj.clientCert_x ='MFl6ajAwMDAwMDBFclo3ITQhMENrR1p2ZEZDMzVaQjhPV3NoZi8xRytRUTJtN3NsejAyS1gxSXdab1l2ST0=';
        innerobj.clientCertPasswd_x = '*****';    
        
        //Submission Header
        serviceArmHudGov.submissionHeader5_0_element submissionHeader5_0_elementObj= new serviceArmHudGov.submissionHeader5_0_element();
        submissionHeader5_0_elementObj.agcHcsId='******';
        submissionHeader5_0_elementObj.agcName='*****';
        submissionHeader5_0_elementObj.fiscalYearId='*****';
        submissionHeader5_0_elementObj.cmsVendorId='*****';
        submissionHeader5_0_elementObj.cmsPassword='*****';        
       
        //End Point Url
        innerobj.endpoint_x='https://armpilot.hud.gov/ARM/ARM/';   
                
        

        
        //Agency Data in xml
        String submissionData = '<?xml version="1.0" encoding="UTF-8"?><tns:SubmissionData xsi:schemaLocation="http://gov.hud.arm/agency_profile_databag_5_0 agency_profile_databag_5_0.xsd" xmlns:tns="http://gov.hud.arm/agency_profile_databag_5_0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><tns:AgencyProfileData><tns:Agency_EIN>38-6142925</tns:Agency_EIN><tns:Reported_Month>6</tns:Reported_Month><tns:Agency_DUN_Nbr>172773500</tns:Agency_DUN_Nbr><tns:Agency_Physical_Address1>38505 Country Club Dr</tns:Agency_Physical_Address1><tns:Agency_Physical_Address2>Suite 210</tns:Agency_Physical_Address2><tns:Agency_Physical_City>Farmington Hills</tns:Agency_Physical_City><tns:Agency_Physical_State>28</tns:Agency_Physical_State><tns:Agency_Physical_Zip>48331</tns:Agency_Physical_Zip><tns:Agency_Website>http://www.greenpath.com</tns:Agency_Website><tns:Agency_Phone_Nbr>248-553-5400</tns:Agency_Phone_Nbr><tns:Agency_Tollfree_Phone_Nbr>888-860-4167</tns:Agency_Tollfree_Phone_Nbr><tns:Agency_Fax_Nbr>248-553-8970</tns:Agency_Fax_Nbr><tns:Agency_Email>N/A</tns:Agency_Email><tns:Agency_Faith_Based_Ind>N</tns:Agency_Faith_Based_Ind><tns:Agency_Colonias_Ind>N</tns:Agency_Colonias_Ind><tns:Agency_Migrfarm_Worker_Ind>N</tns:Agency_Migrfarm_Worker_Ind><tns:Agency_Counseling_Budget_Amount>0.00</tns:Agency_Counseling_Budget_Amount><tns:Agency_Counseling_Methods><tns:Counseling_Method>1</tns:Counseling_Method><tns:Counseling_Method>2</tns:Counseling_Method></tns:Agency_Counseling_Methods><tns:Agency_Languages><tns:Language>19</tns:Language><tns:Language>20</tns:Language></tns:Agency_Languages></tns:AgencyProfileData><tns:Agency_Contacts><tns:Agency_Contact><tns:Contact_Type>11</tns:Contact_Type><tns:Contact_Fname>Setina</tns:Contact_Fname><tns:Contact_Lname>Briggs</tns:Contact_Lname><tns:Contact_Title>1</tns:Contact_Title><tns:Contact_Address1>38505 Country Club Dr</tns:Contact_Address1><tns:Contact_Address2>Suite 210</tns:Contact_Address2><tns:Contact_City>Farmington Hills</tns:Contact_City><tns:Contact_State>28</tns:Contact_State><tns:Contact_Zip>48331</tns:Contact_Zip><tns:Contact_Phone_Nbr>248-553-5400</tns:Contact_Phone_Nbr><tns:Contact_Ext_Nbr>2463</tns:Contact_Ext_Nbr><tns:Contact_Fax_Nbr>248-553-8970</tns:Contact_Fax_Nbr><tns:Contact_Email>sbriggs@greenpath.com</tns:Contact_Email></tns:Agency_Contact><tns:Agency_Contact><tns:Contact_Type>2</tns:Contact_Type><tns:Contact_Fname>Setina</tns:Contact_Fname><tns:Contact_Lname>Briggs</tns:Contact_Lname><tns:Contact_Title>1</tns:Contact_Title><tns:Contact_Address1>38505 Country Club Dr</tns:Contact_Address1><tns:Contact_Address2>Suite 210</tns:Contact_Address2><tns:Contact_City>Farmington Hills</tns:Contact_City><tns:Contact_State>28</tns:Contact_State><tns:Contact_Zip>48331</tns:Contact_Zip><tns:Contact_Phone_Nbr>248-553-5400</tns:Contact_Phone_Nbr><tns:Contact_Ext_Nbr>2463</tns:Contact_Ext_Nbr><tns:Contact_Fax_Nbr>248-553-8970</tns:Contact_Fax_Nbr><tns:Contact_Email>sbriggs@greenpath.com</tns:Contact_Email></tns:Agency_Contact><tns:Agency_Contact><tns:Contact_Type>3</tns:Contact_Type><tns:Contact_Fname>Setina</tns:Contact_Fname><tns:Contact_Lname>Briggs</tns:Contact_Lname><tns:Contact_Title>1</tns:Contact_Title><tns:Contact_Address1>38505 Country Club Dr</tns:Contact_Address1><tns:Contact_Address2>Suite 210</tns:Contact_Address2><tns:Contact_City>Farmington Hills</tns:Contact_City><tns:Contact_State>28</tns:Contact_State><tns:Contact_Zip>48331</tns:Contact_Zip><tns:Contact_Phone_Nbr>248-553-5400</tns:Contact_Phone_Nbr><tns:Contact_Ext_Nbr>2463</tns:Contact_Ext_Nbr><tns:Contact_Fax_Nbr>248-553-8970</tns:Contact_Fax_Nbr><tns:Contact_Email>sbriggs@greenpath.com</tns:Contact_Email></tns:Agency_Contact></tns:Agency_Contacts></tns:SubmissionData>';
       
        //base 64 encodding
       
         Blob submissionDataBlob = Blob.valueOf(submissionData);
         string submissionDataBlobvalue = EncodingUtil.base64Encode(submissionDataBlob);
        
        //Call webservices
        long submissionId= innerobj.postAgencyData(submissionHeader5_0_elementObj,'TEXT/XML',submissionDataBlobvalue);
        return submissionId;   
    }
    
    
    
}

---------------------------

Please help assoon as posible.
I have created salf signed certificate from salesforce and i have also installed that certificate on my
Server.
Can any one tell me what is the issue in my code?
We are building outbound webservice call. We have built a client that is invoking external web service. Our web service provider has created following JKS (and password). Unfortunately, when we import JKS file and password, we are seeing following error.

You've created 0 non-expired certificates out of a limit of 50.

Here is how we created certificate

Keystore type: jks
Keystore provider: SUN
 
Your keystore contains 1 entry
 
Alias name: sfcert
Creation date: Jun 8, 2015
Entry type: trustedCertEntry
 
Owner: CN=armpilot.hud.gov, OU='TMD', O='US Department of Housing and Urban Development', L='Washington D.C.', ST='District Of Columbia', C=US
Issuer: C=US, ST=West Virginia, L=Charleston, O=HP-HUD, OU=Opensystems,EMAILADDRESS=charles.swiger@hp.com, CN=hwvalap3222.hud.gov
Serial number: 4c
Valid from: Mon Jun 01 15:16:12 EDT 2015 until: Thu May 29 15:16:12 EDT 2025
Certificate fingerprints:
         MD5:  7E:21:1E:A4:C0:ED:5E:4D:D0:2C:58:58:8B:AF:E3:A9
         SHA1: 12:C2:95:C3:EA:A7:91:89:75:4D:D6:E5:95:AF:71:E8:AD:B4:CB:CD
 
I have one java based server in tomcat.
I have installed self-signed certificate on that.
Now I have created soap webservice client for that server in salesforce.
Some where I have read that I have to install that certificate in salesforce to complete the call.
So I have export that certificate as .jks   file and trying to install it on salesforce instance.
From
Security Controls>Certificate and Key Management>Import From Keystore.
When I am importing that .jks file at that time I am getting below notification
You've created 0 non-expired certificates out of a limit of 50.
I don’t know what is the meaning of this message.
I need to know what I have to do to install this .jks file.
I am not getting any issue while I am installing .jks file which I have generated from salesforce. It is imported successfully.
 
 
 
 
Hi

We are working to integrate Salesforce with an external web services provided by a federal system.   First of all it seems that we must web service must create with a certificate - or else Salesforce throws error.

My questions is related what is a requirement for a certificate FORMAT (self-signed or third party) on web services side.  It seems that Salesforce only accepts JKS format (See below   https://www.dropbox.com/s/92fcjstihqi57bb/Screenshot%202015-06-07%2022.20.44.png?dl=0). So, do I request webservice provider to build web services and provide us JKS and password?  Or Is it possible to accept other format.

Webservice provider was wondering if other format can be used and we can convert to JKS?






 
We are using third party web service in salesforce but our third party instance has self-signed certificate. I need to call soap web service of third party.
But when I am trying to call web service at that time I am receiving  below error
System.CalloutException: IO Exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Please Provide me way to by pass this error.
I have used self-signed certificate in third party server.
I have done below code to call third party server. I can access that tried party servers WSDL  by providing username and password in browser. It is using SOAP as webservice.
I can also access and post the data by soap ui.I can success fully post request on third party server with below information.
Code
-----------
public class soapWebserviceForHomeKeepers {
    public static long soapWebserviceForAgencyData(){        
     serviceArmHudGov.ArmServiceImplPort innerobj=new serviceArmHudGov.ArmServiceImplPort();
        innerobj.inputHttpHeaders_x = new Map<String, String>();
        String username = 'sdfsdf';
        String password = 'sdfsdf';
        Blob headerValue = Blob.valueOf(username + ':' + password);
        String authorizationHeader = 'Basic ' +EncodingUtil.base64Encode(headerValue);        
        innerobj.inputHttpHeaders_x.put('Authorization',authorizationHeader);
        innerobj.inputHttpHeaders_x.put('Cookie', 'name=value');
        serviceArmHudGov.submissionHeader5_0_element submissionHeader5_0_elementObj= new serviceArmHudGov.submissionHeader5_0_element();
        submissionHeader5_0_elementObj.agcHcsId='123123';
        submissionHeader5_0_elementObj.agcName='123123';
        submissionHeader5_0_elementObj.fiscalYearId='21';
        submissionHeader5_0_elementObj.cmsVendorId='79';
        submissionHeader5_0_elementObj.cmsPassword='113223';
        innerobj.endpoint_x='https://armpilot.hud.gov/ARM/ARM/';
        long submissionId= innerobj.postAgencyData(submissionHeader5_0_elementObj,'TEXT/XML','http://island.zymr.com/rohit/testAgencyProfileData.xml');
        return submissionId;   
    }
    
}
---------
end

But when I am using same information in apex code it giving me error below error.
IO Exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

So can any let me know where i am doing mistake ?
 

public class A{
  public class B {
  }
  public class C {
       public A.B show(){}
  }
}

------------
Look above exampe. I have one inner class C.I need to create instance of that class.
Can any one help me to create instance of class C and call method show of class C.

 
An internal server error has occurred An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience.

Thank you again for your patience and assistance. And thanks for using salesforce.com!

Error ID: 552287135-164949 (1910618002)
I have imported wsdl.So two class are created.
I am trying to call one method of that class.
For that I am using below code

public class soapWebserviceForHomeKeepers {
    public static long soapWebserviceForAgencyData(){        
        serviceArmHudGov.ArmServiceImplPort innerobj=new serviceArmHudGov.ArmServiceImplPort();
        innerobj.inputHttpHeaders_x = new Map<String, String>();
        //Request time out
        innerobj.timeout_x=30000;
        //Login information
        String username = '***';
        String password = '***';
        //Basic Authorization
        Blob headerValue = Blob.valueOf(username + ':' + password);        
        String authorizationHeader = 'Basic ' +EncodingUtil.base64Encode(headerValue);         
        innerobj.inputHttpHeaders_x.put('Authorization',authorizationHeader);   
        innerobj.clientCert_x ='*************zCCBXwGCSqGSIb**************IFZTCCBWEGCyqGSIb3DQEMCgECoIIE+jCCBPYwKAYKKoZIhvcNAQwBAzAaBBRFdkTv401sbTHedTUDT6dkkHKjiAICBAAEggTIQl+U7LgsdxiRyJJBk5QpVYgsLtoDeaDQlpL136gpoYY76JcM6WVQ5LxvKnpki/PXm+cNnKP7STtzutlkf30wWqkdvNQMQx1dZMZcUBtids+mQ+xbA3ZaKs8mPxzGwNmpDgmSGAi+cFEfVbrmbM/ez46xntHstu1X4Nc8pBZFOG17pngvo7JCZiO***********JT/Ac0M4SpACWlQKhtsIi4YHLgRoBILstJlPAQQbrIKsyEvDbb91HDYe8LiQcl1bPh3P6gyDibW15bkZA+71l21MNrNnJxAvL94Clw2vJLkHfDNXtuy0jFQ7C5itoCke2Bp/5DAreCx3rFZgEvZpxfUqYZIbPBUQIpbXCdGe6V/Asf1bZXzebO0mqwCtBvNnWSM3U/H9AuSxRThMRlUBBsADWZFT/plppkAWz944+FeXQsBR6xJppkQsDRswKJhNuI1V1bVRYGRKQUN6EfAaRTBKi0sHImYRCXSw3Fk/2wXw8+nrxHv8vUPQ9JtB7ch7+CXc43TMRqaNCwntUJJTXVfyAssqARZJk0MKx/7u6tvJlmKkJvscHPL4ydkHgMBUqKk1NbA+1p+6TUMkjvf2GnuaeHKcOXCr9UMeSi73aqoK3a+w5YV1aHrTz8JuD6J3SKy+tvhZNnZIe7F9Ep/iV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UA6671k4pjraHzk7MDjt1H8pLSnzKXVipgg/7+ZWLH+QyzcomvCNuzvAtQrx55Bi4AwSvTHdb7y2+mWj1lLBu8vKrv+Fuv/Zgf+qAS65iNQb2tluyZl1Fd/vWhT0nEZ8nFFbiXzbTzPnDVTKsSa3M0bFY9LrKQZVvZIu/eH5LJ7Cua+qrYynPSYH5dNJ7CQUc4Yoa9koQfwHXf6IJmc5VINT2C1zf3s0dPLxrGN6BI7rl9yuJQlO6CuJg9OJc3FeFbW5SAK8/vKkJ5ImyPuMxaEUTsA/cqmbD06eXV9ZQ2m7KPr1i7fs8YRXrlbS17MzMmMKngj50WxWGujhILPeSpxkt9dvXZrj37LXiovdA1SmngQo7frKZjz+mG4JI4lTCE5WdxfrMoSsO9mcMBs7S9L7JmR11KHBuxDuIpL2pDxN5ssjyW0m8q9y3IWNd4aM4TDoZWLmKW//I7whgzLUguA/B8KhYfJz8ijAU+0V2Gg+xoS74QG8Xj6SvU6iN79G7aG+aSA0ZHTA8CCUci7N4p1dYHHQJmoQXXpDmMHQRBfvqIkUE/IlSGM6swbHB5BepFpiRVNG0tSCovyow572NYk0ABmGkUvd3rnv/fzhuWkgLbBG7DjxzhYYIuEHhWj8JBRGnALAI+J2botqP6mjlrpIpcICsK9LS6MiWjnlfWcdFUW1AagKNArosATsDA9MCEwCQYFKw4DAhoFAAQUATvCALA0oIQdABecqAuwuB00UP4EFOdH1AncZeQHgxXzrQeh7ufqDSIkAgIEAA==';
        innerobj.clientCertPasswd_x = 'ouhud8120';    
         innerobj.inputHttpHeaders_x.put('username',username);
         innerobj.inputHttpHeaders_x.put('password',password);
        innerobj.inputHttpHeaders_x.put('host','armpilot.hud.gov');
        innerobj.inputHttpHeaders_x.put('domain','https://armpilot.hud.gov/ARM/ARM/');
        
        //Submission Header
        serviceArmHudGov.submissionHeader5_0_element submissionHeader5_0_elementObj= new serviceArmHudGov.submissionHeader5_0_element();      
                        
        submissionHeader5_0_elementObj.agcHcsId='****';
        submissionHeader5_0_elementObj.agcName='****';
        submissionHeader5_0_elementObj.cmsPassword='****';    
        submissionHeader5_0_elementObj.fiscalYearId='21';
        submissionHeader5_0_elementObj.cmsVendorId='79';  
        //End Point Url
            innerobj.endpoint_x='https://armpilot.hud.gov/ARM/ARM/';   
        //Agency Data in xml
        String submissionData = '<?xml version="1.0" encoding="UTF-8"?><tns:SubmissionData xsi:schemaLocation="http://gov.hud.arm/agency_profile_databag_5_0 agency_profile_databag_5_0.xsd" xmlns:tns="http://gov.hud.arm/agency_profile_databag_5_0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><tns:AgencyProfileData><tns:Agency_EIN>38-6142925</tns:Agency_EIN><tns:Reported_Month>6</tns:Reported_Month><tns:Agency_DUN_Nbr>172773500</tns:Agency_DUN_Nbr><tns:Agency_Physical_Address1>38505 Country Club Dr</tns:Agency_Physical_Address1><tns:Agency_Physical_Address2>Suite 210</tns:Agency_Physical_Address2><tns:Agency_Physical_City>Farmington Hills</tns:Agency_Physical_City><tns:Agency_Physical_State>28</tns:Agency_Physical_State><tns:Agency_Physical_Zip>48331</tns:Agency_Physical_Zip><tns:Agency_Website>http://www.greenpath.com</tns:Agency_Website><tns:Agency_Phone_Nbr>248-553-5400</tns:Agency_Phone_Nbr><tns:Agency_Tollfree_Phone_Nbr>888-860-4167</tns:Agency_Tollfree_Phone_Nbr><tns:Agency_Fax_Nbr>248-553-8970</tns:Agency_Fax_Nbr><tns:Agency_Email>N/A</tns:Agency_Email><tns:Agency_Faith_Based_Ind>N</tns:Agency_Faith_Based_Ind><tns:Agency_Colonias_Ind>N</tns:Agency_Colonias_Ind><tns:Agency_Migrfarm_Worker_Ind>N</tns:Agency_Migrfarm_Worker_Ind><tns:Agency_Counseling_Budget_Amount>0.00</tns:Agency_Counseling_Budget_Amount><tns:Agency_Counseling_Methods><tns:Counseling_Method>1</tns:Counseling_Method><tns:Counseling_Method>2</tns:Counseling_Method></tns:Agency_Counseling_Methods><tns:Agency_Languages><tns:Language>19</tns:Language><tns:Language>20</tns:Language></tns:Agency_Languages></tns:AgencyProfileData><tns:Agency_Contacts><tns:Agency_Contact><tns:Contact_Type>11</tns:Contact_Type><tns:Contact_Fname>Setina</tns:Contact_Fname><tns:Contact_Lname>Briggs</tns:Contact_Lname><tns:Contact_Title>1</tns:Contact_Title><tns:Contact_Address1>38505 Country Club Dr</tns:Contact_Address1><tns:Contact_Address2>Suite 210</tns:Contact_Address2><tns:Contact_City>Farmington Hills</tns:Contact_City><tns:Contact_State>28</tns:Contact_State><tns:Contact_Zip>48331</tns:Contact_Zip><tns:Contact_Phone_Nbr>248-553-5400</tns:Contact_Phone_Nbr><tns:Contact_Ext_Nbr>2463</tns:Contact_Ext_Nbr><tns:Contact_Fax_Nbr>248-553-8970</tns:Contact_Fax_Nbr><tns:Contact_Email>sbriggs@greenpath.com</tns:Contact_Email></tns:Agency_Contact><tns:Agency_Contact><tns:Contact_Type>2</tns:Contact_Type><tns:Contact_Fname>Setina</tns:Contact_Fname><tns:Contact_Lname>Briggs</tns:Contact_Lname><tns:Contact_Title>1</tns:Contact_Title><tns:Contact_Address1>38505 Country Club Dr</tns:Contact_Address1><tns:Contact_Address2>Suite 210</tns:Contact_Address2><tns:Contact_City>Farmington Hills</tns:Contact_City><tns:Contact_State>28</tns:Contact_State><tns:Contact_Zip>48331</tns:Contact_Zip><tns:Contact_Phone_Nbr>248-553-5400</tns:Contact_Phone_Nbr><tns:Contact_Ext_Nbr>2463</tns:Contact_Ext_Nbr><tns:Contact_Fax_Nbr>248-553-8970</tns:Contact_Fax_Nbr><tns:Contact_Email>sbriggs@greenpath.com</tns:Contact_Email></tns:Agency_Contact><tns:Agency_Contact><tns:Contact_Type>3</tns:Contact_Type><tns:Contact_Fname>Setina</tns:Contact_Fname><tns:Contact_Lname>Briggs</tns:Contact_Lname><tns:Contact_Title>1</tns:Contact_Title><tns:Contact_Address1>38505 Country Club Dr</tns:Contact_Address1><tns:Contact_Address2>Suite 210</tns:Contact_Address2><tns:Contact_City>Farmington Hills</tns:Contact_City><tns:Contact_State>28</tns:Contact_State><tns:Contact_Zip>48331</tns:Contact_Zip><tns:Contact_Phone_Nbr>248-553-5400</tns:Contact_Phone_Nbr><tns:Contact_Ext_Nbr>2463</tns:Contact_Ext_Nbr><tns:Contact_Fax_Nbr>248-553-8970</tns:Contact_Fax_Nbr><tns:Contact_Email>sbriggs@greenpath.com</tns:Contact_Email></tns:Agency_Contact></tns:Agency_Contacts></tns:SubmissionData>';        
        
        
        Blob submissionDataBlob = Blob.valueOf(submissionData);
        string submissionDataBlobvalue = EncodingUtil.base64Encode(submissionDataBlob);        
        //Call webservices
         innerobj.inputHttpHeaders_x.put('Content-Type', 'text/xml;charset=UTF-8');
         innerobj.inputHttpHeaders_x.put('Content-Length', String.valueOf(submissionDataBlobvalue.length()));
         innerobj.inputHttpHeaders_x.put('Accept-Encoding', 'gzip,deflate');
        
         long submissionId= innerobj.postAgencyData(submissionHeader5_0_elementObj,'TEXT/XML',submissionDataBlobvalue);
         return submissionId;   
    }
   
}
---------------------------------------------------------------------------------
It is giving me below error
System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: There was a problem parsing your XML submission. Please review and correct these errors, then resubmit. LINE: 1 : cvc-complex-type.2.4.a: Invalid content was found starting with element 'submissionHeader5.0'. One of '{"http://service.arm.hud.gov/":submissionHeader5.0}' is expected. faultcode=ns1:Receiver faultactor=
--------------------------------------------------------------
When I have debug I found that the xml is not created properly
it is created  like below
------------------------------------------------
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Header /><env:Body>

<m:postAgencyData xmlns:m="http://service.arm.hud.gov/">
<submissionHeader5.0>
<agcHcsId>****</agcHcsId>
<agcName>*****</agcName><fiscalYearId>21</fiscalYearId><cmsVendorId>79</cmsVendorId><cmsPassword>*****</cmsPassword></submissionHeader5.0><submissionDataEncoding>TEXT/XML</submissionDataEncoding>
<submissionData>data</submissionData>
</m:postAgencyData>
</env:Body></env:Envelope>
---------------------------------
But our server expeact xml like below so what change have to make in apex class

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Header /><env:Body>

<postAgencyData xmlns="http://service.arm.hud.gov/">
<submissionHeader5.0>
<agcHcsId>****</agcHcsId>
<agcName>*****</agcName><fiscalYearId>21</fiscalYearId><cmsVendorId>79</cmsVendorId><cmsPassword>*****</cmsPassword></submissionHeader5.0><submissionDataEncoding>TEXT/XML</submissionDataEncoding>
<submissionData>data</submissionData>
</postAgencyData>
</env:Body></env:Envelope>



 
We are building outbound webservice call. We have built a client that is invoking external web service. Our web service provider has created following JKS (and password). Unfortunately, when we import JKS file and password, we are seeing following error.

You've created 0 non-expired certificates out of a limit of 50.

Here is how we created certificate

Keystore type: jks
Keystore provider: SUN
 
Your keystore contains 1 entry
 
Alias name: sfcert
Creation date: Jun 8, 2015
Entry type: trustedCertEntry
 
Owner: CN=armpilot.hud.gov, OU='TMD', O='US Department of Housing and Urban Development', L='Washington D.C.', ST='District Of Columbia', C=US
Issuer: C=US, ST=West Virginia, L=Charleston, O=HP-HUD, OU=Opensystems,EMAILADDRESS=charles.swiger@hp.com, CN=hwvalap3222.hud.gov
Serial number: 4c
Valid from: Mon Jun 01 15:16:12 EDT 2015 until: Thu May 29 15:16:12 EDT 2025
Certificate fingerprints:
         MD5:  7E:21:1E:A4:C0:ED:5E:4D:D0:2C:58:58:8B:AF:E3:A9
         SHA1: 12:C2:95:C3:EA:A7:91:89:75:4D:D6:E5:95:AF:71:E8:AD:B4:CB:CD
 
I have one java based server in tomcat.
I have installed self-signed certificate on that.
Now I have created soap webservice client for that server in salesforce.
Some where I have read that I have to install that certificate in salesforce to complete the call.
So I have export that certificate as .jks   file and trying to install it on salesforce instance.
From
Security Controls>Certificate and Key Management>Import From Keystore.
When I am importing that .jks file at that time I am getting below notification
You've created 0 non-expired certificates out of a limit of 50.
I don’t know what is the meaning of this message.
I need to know what I have to do to install this .jks file.
I am not getting any issue while I am installing .jks file which I have generated from salesforce. It is imported successfully.
 
 
 
 
We are using third party web service in salesforce but our third party instance has self-signed certificate. I need to call soap web service of third party.
But when I am trying to call web service at that time I am receiving  below error
System.CalloutException: IO Exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Please Provide me way to by pass this error.

public class A{
  public class B {
  }
  public class C {
       public A.B show(){}
  }
}

------------
Look above exampe. I have one inner class C.I need to create instance of that class.
Can any one help me to create instance of class C and call method show of class C.

 
An internal server error has occurred An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience.

Thank you again for your patience and assistance. And thanks for using salesforce.com!

Error ID: 552287135-164949 (1910618002)