• SFDCkumar
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Hi Guys,

I have generated Apex stub from WSDL shared by other application.I am trying to invoke this service from salesforce but its getting errored out with 'Web service callout failed: Failed to get next element'.  When we are trying to hit the service through SOAPUI with below request its working. It seems issue is with some namespace binding  for InvoiceID
For SOAP UI:  <typ:invoiceId>90153875888</typ:invoiceId>
For Salesforce:  <invoiceId>90153875888</invoiceId>
How can i fix this issue?

SOAPUI Soap Message:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://cxf.apache.org/mime/types">
   <soapenv:Header/>
   <soapenv:Body>
      <typ:invoiceFileRequest>
         <!--Optional:-->
         <typ:invoiceId>90153875888</typ:invoiceId>
      </typ:invoiceFileRequest>
   </soapenv:Body>
</soapenv:Envelope>
Salesforce generated Soap meesage:
 
<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:invoiceFileRequest xmlns:m="http://cxf.apache.org/mime/types">
   <invoiceId>90153875888</invoiceId>
   </m:invoiceFileRequest>
   </env:Body>
   </env:Envelope>

Below is generated apex code.
public class TarkkicxfApacheOrgMimeTypes {
    public class invoiceFileRequest {
        public String invoiceId;
        private String[] invoiceId_type_info = new String[]{'invoiceId','http://cxf.apache.org/mime/types',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://cxf.apache.org/mime/types','false','false'};
        private String[] field_order_type_info = new String[]{'invoiceId'};
    }
    public class invoiceFileResponse {
        public String invoiceId;
        public TarkkiabpWsTarkkiElisaFi.tarkkiAbpInvoice invoice;
        public String fileContent;
        private String[] invoiceId_type_info = new String[]{'invoiceId','http://cxf.apache.org/mime/types',null,'0','1','false'};
        private String[] invoice_type_info = new String[]{'invoice','http://cxf.apache.org/mime/types',null,'0','1','false'};
        private String[] fileContent_type_info = new String[]{'fileContent','http://cxf.apache.org/mime/types',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://cxf.apache.org/mime/types','false','false'};
        private String[] field_order_type_info = new String[]{'invoiceId','invoice','fileContent'};
    }
}
public class TarkkiabpWsTarkkiElisaFi {
    
    public class tarkkiAbpInvoice {
        private String[] apex_schema_type_info = new String[]{'http://abp.ws.tarkki.elisa.fi/','false','false'};
        private String[] field_order_type_info = new String[]{};
    }
    
    public class AbpCorporateInvoiceServiceImplPort {
        public String endpoint_x = 'http://xxx.xxx.xx.7x:4xx/services/viewArchi';
        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;
        private String[] ns_map_type_info = new String[]{'http://cxf.apache.org/mime/types', 'TarkkicxfApacheOrgMimeTypes', 'http://abp.ws.tarkki.elisa.fi/', 'TarkkiabpWsTarkkiElisaFi'};
              
        public TarkkicxfApacheOrgMimeTypes.invoiceFileResponse getInvoiceFile(String invoiceId) {
            TarkkicxfApacheOrgMimeTypes.invoiceFileRequest request_x = new TarkkicxfApacheOrgMimeTypes.invoiceFileRequest();
            request_x.invoiceId = invoiceId;
            TarkkicxfApacheOrgMimeTypes.invoiceFileResponse response_x;
            Map<String, TarkkicxfApacheOrgMimeTypes.invoiceFileResponse> response_map_x = new Map<String, TarkkicxfApacheOrgMimeTypes.invoiceFileResponse>();
            response_map_x.put('response_x', response_x);
            system.debug('--------------------------'+request_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              '',
              'http://cxf.apache.org/mime/types',
              'invoiceFileRequest',
              'http://cxf.apache.org/mime/types',
              'invoiceFileResponse',
              'TarkkicxfApacheOrgMimeTypes.invoiceFileResponse'}
            );
            response_x = response_map_x.get('response_x');
            return response_x;
        }
        
       
    }
}
Thank you in advance!

 

Hi guys,

 

i am experiencing different kind of issue when trying to reload the current page. i am telling u my requirement in very brief..

 

I have two Buttons  "SAVE" and "QUICKSAVE",only difference between both is when user hit SAVE button it will be redirected to details page of record but when user hit QUICKSAVE button it needs to be redirected to current page.After first QUICKSAVE button hit, data are getting saved and system are redirecting User to current page , but when user are hitting QUICKSAVE button again, Insted of current page blank page is getting appeared  but data are getting saved correctly.

it seems issue is related to view state but i am not getting how to get rid off. In debug Log below URL are being generated:-

 

https://c.cs11.visual.force.com/apex/ManageShow?com.salesforce.visualforce
.ViewStateCSRF=..U1trDVlHl9qkwbs9Xb9y2.X3uiMN8JgaDnTHQdrTH_ciJqwoZLH.ufo6a
3ylGlcPPPLNBP7sPUpWkX9O9jUlDwyS8I6Lbsz0ovy2pM9hIi5Pg_rxlhauabl1JabyU_9_wO4
Lf1KFEkSH8IxEebBaAzgNI%3D&core.apexpages.devmode.url=1&j_id0%3AShowBuilder
Form=j_id0%3AShowBuilderForm&j_id0%3AShowBuilderForm%3AshowBuilderPbBlock%3
AartistFilterSection%3Aj_id46%3Aj_id49=selectone&j_id0%3AShowBuilderForm%3A
showBuilderPbBlock%3AartistsPbSection%3AartistTable%3A0%3Aj_id55=on&j_id0%3
AShowBuilderForm%3AshowBuilderPbBlock%3AartistsPbSection%3AartistTable%3A0%3
Aj_id65=80000.0&j_id0%3AShowBuilderForm%3AshowBuilderPbBlock%3AartistsPbSect
ion%3AartistTable%3A1%3Aj_id65=1500.0&j_id0%3AShowBuilderForm%3AshowBuilder
PbBlock%3AcbButtons%3AquicksaveBtn=QuickSave&j_id0%3AShowBuilderForm%3Ashow
BuilderPbBlock%3AmanageShowPbSection%3Aj_id36=Hyd_infosysshow3&j_id0%3AShow
BuilderForm%3AshowBuilderPbBlock%3AmanageShowPbSection%3Aj_id37=Kukatpully&
j_id0%3AShowBuilderForm%3AshowBuilderPbBlock%3AmanageShowPbSection%3Aj_id
37_lkid=a0DZ000000BnvRp&j_id0%3AShowBuilderForm%3AshowBuilderPbBlock%3Amana
geShowPbSection%3Aj_id37_lkold=Kukatpully&j_id0%3AShowBuilderForm%3AshowBuil
derPbBlock%3AmanageShowPbSection%3Aj_id37_lktp=a0D&j_id0%3AShowBuilderForm%3
AshowBuilderPbBlock%3AmanageShowPbSection%3Aj_id37_lspf=0&j_id0%3AShowBuilder
Form%3AshowBuilderPbBlock%3AmanageShowPbSection%3Aj_id37_lspfsub=0&j_id0%3ASho
wBuilderForm%3AshowBuilderPbBlock%3AmanageShowPbSection%3Aj_id37_mod=0&j_id0%3
AShowBuilderForm%3AshowBuilderPbBlock%3AmanageShowPbSection%3Aj_id38=10%2F16%2
F2012+6%3A53+AM&j_id0%3AShowBuilderForm%3AshowBuilderPbBlock%3AmanageShowPbSect
ion%3Aj_id39=Alternative&j_id0%3AShowBuilderForm%3AshowBuilderPbBlock%3AmanageShowPbSection%3Aj_id40=Proposed

 

 


My visual force code which are invoking controller extension method:-

           

<apex:pageBlockButtons id="cbButtons">
                <apex:commandButton action="{!saveShowAndPerformance}" value="Save" id="saveBtn" status="savingStatus" reRender="hiddenBlock">
                    <apex:param name="saveId" value="{!showobj.Id}" assignTo="{!savepage }" />
                </apex:commandButton>
                
                <apex:commandButton action="{!saveShowAndPerformance}" value="QuickSave" id="quicksaveBtn" status="savingStatus,ShowBuilderForm" />

                <apex:commandButton action="{!cancel}" value="Cancel" immediate="true" />
            </apex:pageBlockButtons>

 

 

My Controller extension method where i am setting the Page reference:-

 

 public PageReference saveAndquicksaveaction() {

      //.................. DML operation code here..............
          
         

   //Below are the page reference Code.

             PageReference showDetailPage;   
            if(ApexPages.currentPage().getParameters().get('saveId')!= null) {
               // Return on the object detail Page.
               showDetailPage = new ApexPages.StandardController(showobj).view();
                 showDetailPage.setRedirect(true);
            }else{
               // Return on the object entry  visualforce Page.
                 showDetailPage = new PageReference(System.currentPageReference().getUrl());
                 showDetailPage.setRedirect(true);
               //  system.debug('@@@@@Save button++++++'+ApexPages.currentPage().getParameters().get('saveId'));
           }     
        return showDetailPage;    
     }

 

 

Guys,Please help me out......Eagerly waiting for your response......

 

Thanks,