You need to sign in to do that
Don't have an account?
hylim1215
How do i call out to this web service in APEX?
Hi i have this wsdl from my webservice provided and i converted in to apex class and this is what i get.
What parameter should i input for the method
SI_Test_Out_Sync(String Operacao,mttest.Rows_element[] Rows)
?
Thanks
//Generated by wsdl2apex public class mttest { public class Rows_element { public String Valor; private String[] Valor_type_info = new String[]{'Valor','http://mtbr/test',null,'0','1','false'}; private String[] apex_schema_type_info = new String[]{'http://mtbr/test','false','false'}; private String[] field_order_type_info = new String[]{'Valor'}; } public class DT_Test_Req { public String Operacao; public mttest.Rows_element[] Rows; private String[] Operacao_type_info = new String[]{'Operacao','http://mtbr/test',null,'0','1','false'}; private String[] Rows_type_info = new String[]{'Rows','http://mtbr/test',null,'0','-1','false'}; private String[] apex_schema_type_info = new String[]{'http://mtbr/test','false','false'}; private String[] field_order_type_info = new String[]{'Operacao','Rows'}; } public class DT_Test_Resp { public String Resultado; private String[] Resultado_type_info = new String[]{'Resultado','http://mtbr/test',null,'0','1','false'}; private String[] apex_schema_type_info = new String[]{'http://mtbr/test','false','false'}; private String[] field_order_type_info = new String[]{'Resultado'}; } public class HTTPS_Port { public String endpoint_x = 'http://service/service'; 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://mtbr/test', 'mttest'}; public String SI_Test_Out_Sync(String Operacao,mttest.Rows_element[] Rows) { mttest.DT_Test_Req request_x = new mttest.DT_Test_Req(); request_x.Operacao = Operacao; request_x.Rows = Rows; mttest.DT_Test_Resp response_x; Map<String, mttest.DT_Test_Resp> response_map_x = new Map<String, mttest.DT_Test_Resp>(); response_map_x.put('response_x', response_x); WebServiceCallout.invoke( this, request_x, response_map_x, new String[]{endpoint_x, 'http://sap.com/xi/WebService/soap1.1', 'http://mtbr/test', 'MT_Test_Req', 'http://mtbr/test', 'MT_Test_Resp', 'mttest.DT_Test_Resp'} ); response_x = response_map_x.get('response_x'); return response_x.Resultado; } public String rettt(String vla){ return vla; } } }Then i tried to calll the webservice using:-
mttest.HTTPS_Port si_test = new mttest.HTTPS_Port(); List<String> fillers = new String[]{'2','5'}; String opera = '+'; String output = si_test.SI_Test_Out_Sync(opera,fillers);But it give me error:-
Method does not exist or incorrect signature: [mttest.HTTPS_Port].SI_Test_Out_Sync(String, List<String>)
What parameter should i input for the method
SI_Test_Out_Sync(String Operacao,mttest.Rows_element[] Rows)
?
Thanks
You need to pass mttest.Rows_element[] Rows parameter rather than list of string in the method.
Regards
Tej Pal Kumawat
Skype : tejpalkumawat1991
If this answers your question mark Best Answer it as solution and then hit Like!
Try this with your parameter. Regards
Tej Pal Kumawat
Skype : tejpalkumawat1991
If this answers your question mark Best Answer it as solution and then hit Like!
How can i modify the row element? Because this webservice is like a simple calculation, you provide 2 numbers and an operator and will return the result. This is the sample request from SoapUI