function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
john3john3 

req on web services.....its urgent please somebody can help me out.??

Hi,

 

currently i am working on web serivces.

i inserted the generated wsdl into class. it is saved successfully. this is soap file that i have in the web serivces..

 

public class TaxwareServiceSoap {
        public String endpoint_x = 'http://www.webservicex.net:9400/webservices/TaxwareService/TaxwareService.asmx';
        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://tempuri.org/TaxwareService/TaxwareService', 'tempuriOrgTaxwareserviceTaxwareservic'};
        public String OpenFiles() {
            tempuriOrgTaxwareserviceTaxwareservic.OpenFiles_element request_x = new tempuriOrgTaxwareserviceTaxwareservic.OpenFiles_element();
            tempuriOrgTaxwareserviceTaxwareservic.OpenFilesResponse_element response_x;
            Map<String, tempuriOrgTaxwareserviceTaxwareservic.OpenFilesResponse_element> response_map_x = new Map<String, tempuriOrgTaxwareserviceTaxwareservic.OpenFilesResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://tempuri.org/TaxwareService/TaxwareService/OpenFiles',
              'http://tempuri.org/TaxwareService/TaxwareService',
              'OpenFiles',
              'http://tempuri.org/TaxwareService/TaxwareService',
              'OpenFilesResponse',
              'tempuriOrgTaxwareserviceTaxwareservic.OpenFilesResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.OpenFilesResult;

        }
        public String CloseFiles() {
            tempuriOrgTaxwareserviceTaxwareservic.CloseFiles_element request_x = new tempuriOrgTaxwareserviceTaxwareservic.CloseFiles_element();
            tempuriOrgTaxwareserviceTaxwareservic.CloseFilesResponse_element response_x;
            Map<String, tempuriOrgTaxwareserviceTaxwareservic.CloseFilesResponse_element> response_map_x = new Map<String, tempuriOrgTaxwareserviceTaxwareservic.CloseFilesResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://tempuri.org/TaxwareService/TaxwareService/CloseFiles',
              'http://tempuri.org/TaxwareService/TaxwareService',
              'CloseFiles',
              'http://tempuri.org/TaxwareService/TaxwareService',
              'CloseFilesResponse',
              'tempuriOrgTaxwareserviceTaxwareservic.CloseFilesResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.CloseFilesResult;
        }

this is soap file i have.

i wrote a class and visualforce page to get response for openfile and closefile 

 

the class is like this...

 

public class openfiledemo{

Account acc;
tempuriOrgTaxwareserviceTaxwareservic.TaxwareServiceSoap stub = 
        new tempuriOrgTaxwareserviceTaxwareservic.TaxwareServiceSoap();

String response;

public openfiledemo(ApexPages.StandardController stdController){
    this.acc = (Account)stdController.getRecord();
}    



public String getresponse(){
system.debug('output>>>>>>>>>>>>>>>>'+stub.OpenFiles());
return stub.OpenFiles();                                                            
}
    
/*
tempuriOrgTaxwareserviceTaxwareservic.OpenFilesResponse_element response= 
        new tempuriOrgTaxwareserviceTaxwareservic.OpenFilesResponse_element();
            
public tempuriOrgTaxwareserviceTaxwareservic.OpenFilesResponse_element 
                                                            getresponse(){
response = stub.OpenFiles();
return response;                                                            
}

*/   
    
}

and i created a custom button in the visualforce page to call the response,

and the visualforce page is 

 

<apex:page standardController="Account" extensions="openfiledemo">
<apex:form >
    <apex:commandButton action="getresponse" value="Openfile"/>
</apex:form>
</apex:page>

and i check the apex debug log details, it says successful.

debug details are
StatusSuccessApplicationBrowser
Request TypeApplicationOperation/apex/smk__openfile
Duration (ms)77Log Size (bytes)1,774
Log
19.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;VALIDATION,INFO;WORKFLOW,INFO
22:28:41.488|EXECUTION_STARTED
22:28:41.488|CODE_UNIT_STARTED|[EXTERNAL]|066A0000000NWYU|VF: /apex/smk__openfile
22:28:41.488|CODE_UNIT_STARTED|[EXTERNAL]|01pA0000000TIG8|openfiledemo <init>
22:28:41.488|METHOD_ENTRY|[3,8]|01pA0000000THZH|tempuriOrgTaxwareserviceTaxwareservic.tempuriOrgTaxwareserviceTaxwareservic()
22:28:41.489|METHOD_EXIT|[3,8]|tempuriOrgTaxwareserviceTaxwareservic
22:28:41.489|CONSTRUCTOR_ENTRY|[5,9]|01pA0000000THZH|new: tempuriOrgTaxwareserviceTaxwareservic.TaxwareServiceSoap
22:28:41.489|CONSTRUCTOR_EXIT|[5,9]|new: tempuriOrgTaxwareserviceTaxwareservic.TaxwareServiceSoap
22:28:41.489|METHOD_ENTRY|[10,25]|ApexPages.StandardController.getRecord()
22:28:41.505|METHOD_EXIT|[10,25]|ApexPages.StandardController.getRecord()
22:28:41.505|CODE_UNIT_FINISHED|openfiledemo <init>
22:28:41.560|CUMULATIVE_LIMIT_USAGE
22:28:41.560|LIMIT_USAGE_FOR_NS|smk|
  Number of SOQL queries: 0 out of 100
  Number of query rows: 0 out of 10000
  Number of SOSL queries: 0 out of 20
  Number of DML statements: 0 out of 100
  Number of DML rows: 0 out of 10000
  Number of script statements: 12 out of 200000
  Maximum heap size: 0 out of 3000000
  Number of callouts: 0 out of 10
  Number of Email Invocations: 0 out of 10
  Number of fields describes: 0 out of 10
  Number of record type describes: 0 out of 10
  Number of child relationships describes: 0 out of 10
  Number of picklist describes: 0 out of 10
  Number of future calls: 0 out of 10
  Number of find similar calls: 0 out of 10
  Number of System.runAs() invocations: 0 out of 20

22:28:41.560|CUMULATIVE_LIMIT_USAGE_END

22:28:41.560|CODE_UNIT_FINISHED|VF: /apex/smk__openfile
22:28:41.560|EXECUTION_FINISHED

i tried all these things but i am not getting the openfile getresponse from the webservices.

the error will be like this.... Illegal view ID getresponse. The ID must begin with /
can anybody help me out with the solutions.its urgent
thank you
MandyKoolMandyKool

Hi,

 

The problem is with your syntax.

 

The action for the commandButton should be "{!getresponse}".

 

Hope, this works.

 

Thanks,

Kulkarni.

john2john2

thanks kulakarni,

 

i already tried in that way, then also its not working

 

is their any other way?

 

thank you

john2john2

while i am trying in that way, i am getting the error like this 

 


IO Exception: Read timed out

An unexpected error has occurred. Your development organization has been notified.

 

thank you