+ Start a Discussion
Hetal ShethHetal Sheth 

SOAP ERROR

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+6TUMkj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+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>



 
RatanRatan
Hi.
Plz refer this link http://sforcedc.blogspot.in/2015/06/execute-territory-assignment-rules-when.html
May be this will solve your problem.
Hetal ShethHetal Sheth
 This is not helpfull.Thanks for replay.