+ Start a Discussion
vikramkkvikramkk 

Not getting results from web service

Hi

 

I am trying to call a web service on click of a button from VF page. and display the results using a page block table and results are of a wrapper class type. I am posting the debug log below. If you can find where I am getting wrong that would be a great help. Many thanx.

 

24.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WORKFLOW,INFO 16:26:44.012 (12799000)|EXECUTION_STARTED 16:26:44.012 (12834000)|CODE_UNIT_STARTED|[EXTERNAL]|066Q00000000sfm|VF: /apex/returnlistpage 16:26:44.012 (12997000)|VF_DESERIALIZE_VIEWSTATE_BEGIN|066Q00000000sfm 16:26:44.017 (17359000)|VF_DESERIALIZE_VIEWSTATE_END 16:26:44.022 (22642000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ0000000A0de|ReturnListController get(myResults) 16:26:44.022 (22671000)|SYSTEM_MODE_ENTER|true 16:26:44.022 (22691000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ0000000A0de|myResults 16:26:44.022 (22727000)|METHOD_ENTRY|[1]|01pQ0000000A0de|ReturnListController.ReturnListController() 16:26:44.022 (22854000)|METHOD_EXIT|[1]|ReturnListController 16:26:44.022 (22868000)|CODE_UNIT_FINISHED|myResults 16:26:44.022 (22875000)|CODE_UNIT_FINISHED|ReturnListController get(myResults) 16:26:44.025 (25104000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ0000000A0de|ReturnListController get(searchTextPONumber) 16:26:44.025 (25116000)|SYSTEM_MODE_ENTER|true 16:26:44.025 (25124000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ0000000A0de|searchTextPONumber 16:26:44.025 (25552000)|CODE_UNIT_FINISHED|searchTextPONumber 16:26:44.025 (25560000)|CODE_UNIT_FINISHED|ReturnListController get(searchTextPONumber) 16:26:44.025 (25618000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ0000000A0de|ReturnListController get(searchTextOrderNumber) 16:26:44.025 (25627000)|SYSTEM_MODE_ENTER|true 16:26:44.025 (25634000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ0000000A0de|searchTextOrderNumber 16:26:44.025 (25674000)|CODE_UNIT_FINISHED|searchTextOrderNumber 16:26:44.025 (25681000)|CODE_UNIT_FINISHED|ReturnListController get(searchTextOrderNumber) 16:26:44.025 (25732000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ0000000A0de|ReturnListController get(searchTextPartNumber) 16:26:44.025 (25740000)|SYSTEM_MODE_ENTER|true 16:26:44.025 (25747000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ0000000A0de|searchTextPartNumber 16:26:44.025 (25784000)|CODE_UNIT_FINISHED|searchTextPartNumber 16:26:44.025 (25792000)|CODE_UNIT_FINISHED|ReturnListController get(searchTextPartNumber) 16:26:44.026 (26018000)|CODE_UNIT_STARTED|[EXTERNAL]|ReturnListController set(searchTextPONumber,) 16:26:44.026 (26029000)|SYSTEM_MODE_ENTER|true 16:26:44.026 (26042000)|CODE_UNIT_STARTED|[EXTERNAL]|ReturnListController set(searchTextPONumber,) 16:26:44.026 (26077000)|CODE_UNIT_FINISHED|ReturnListController set(searchTextPONumber,) 16:26:44.026 (26087000)|CODE_UNIT_FINISHED|ReturnListController set(searchTextPONumber,) 16:26:44.026 (26118000)|CODE_UNIT_STARTED|[EXTERNAL]|ReturnListController set(searchTextOrderNumber,197533) 16:26:44.026 (26125000)|SYSTEM_MODE_ENTER|true 16:26:44.026 (26134000)|CODE_UNIT_STARTED|[EXTERNAL]|ReturnListController set(searchTextOrderNumber,197533) 16:26:44.026 (26153000)|CODE_UNIT_FINISHED|ReturnListController set(searchTextOrderNumber,197533) 16:26:44.026 (26159000)|CODE_UNIT_FINISHED|ReturnListController set(searchTextOrderNumber,197533) 16:26:44.026 (26187000)|CODE_UNIT_STARTED|[EXTERNAL]|ReturnListController set(searchTextPartNumber,) 16:26:44.026 (26194000)|SYSTEM_MODE_ENTER|true 16:26:44.026 (26203000)|CODE_UNIT_STARTED|[EXTERNAL]|ReturnListController set(searchTextPartNumber,) 16:26:44.026 (26220000)|CODE_UNIT_FINISHED|ReturnListController set(searchTextPartNumber,) 16:26:44.026 (26226000)|CODE_UNIT_FINISHED|ReturnListController set(searchTextPartNumber,) 16:26:44.028 (28503000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ0000000A0de|ReturnListController invoke(Credit) 16:26:44.028 (28573000)|METHOD_ENTRY|[79]|01pQ0000000A0de|ReturnListController.searchCreditInquiry() 16:26:44.030 (30350000)|METHOD_ENTRY|[118]|01pQ0000000A0de|ReturnListController.__sfdc_searchTextPartNumber() 16:26:44.030 (30376000)|METHOD_EXIT|[118]|01pQ0000000A0de|ReturnListController.__sfdc_searchTextPartNumber() 16:26:44.030 (30386000)|METHOD_ENTRY|[119]|01pQ0000000A0de|ReturnListController.__sfdc_searchTextPONumber() 16:26:44.030 (30407000)|METHOD_EXIT|[119]|01pQ0000000A0de|ReturnListController.__sfdc_searchTextPONumber() 16:26:44.030 (30416000)|METHOD_ENTRY|[121]|01pQ0000000A0de|ReturnListController.__sfdc_searchTextOrderNumber() 16:26:44.030 (30434000)|METHOD_EXIT|[121]|01pQ0000000A0de|ReturnListController.__sfdc_searchTextOrderNumber() 16:26:44.030 (30955000)|CONSTRUCTOR_ENTRY|[128]|01pQ0000000A0EK|<init>() 16:26:44.031 (31032000)|SYSTEM_METHOD_ENTRY|[12]|LIST.add(ANY) 16:26:44.032 (32705000)|SYSTEM_METHOD_EXIT|[12]|LIST.add(ANY) 16:26:44.032 (32727000)|SYSTEM_METHOD_ENTRY|[12]|LIST.add(ANY) 16:26:44.032 (32736000)|SYSTEM_METHOD_EXIT|[12]|LIST.add(ANY) 16:26:44.032 (32751000)|CONSTRUCTOR_EXIT|[128]|01pQ0000000A0EK|<init>() 16:26:44.032 (32804000)|SYSTEM_METHOD_ENTRY|[132]|system.Test.isRunningTest() 16:26:44.032 (32852000)|SYSTEM_METHOD_EXIT|[132]|system.Test.isRunningTest() 16:26:44.032 (32887000)|METHOD_ENTRY|[133]|01pQ0000000A0EK|wsdevSensusCom.InquiriesSoap.SFDC_RMA(String, String, String, String, String) 16:26:44.033 (33335000)|CONSTRUCTOR_ENTRY|[36]|01pQ0000000A0EK|<init>()

16:26:44.033 (33394000)|SYSTEM_METHOD_ENTRY|[139]|LIST.add(ANY) 16:26:44.033 (33420000)|SYSTEM_METHOD_EXIT|[139]|LIST.add(ANY) 16:26:44.033 (33435000)|SYSTEM_METHOD_ENTRY|[139]|LIST.add(ANY) 16:26:44.033 (33446000)|SYSTEM_METHOD_EXIT|[139]|LIST.add(ANY) 16:26:44.033 (33459000)|SYSTEM_METHOD_ENTRY|[139]|LIST.add(ANY) 16:26:44.033 (33467000)|SYSTEM_METHOD_EXIT|[139]|LIST.add(ANY) 16:26:44.033 (33478000)|SYSTEM_METHOD_ENTRY|[139]|LIST.add(ANY) 16:26:44.033 (33485000)|SYSTEM_METHOD_EXIT|[139]|LIST.add(ANY) 16:26:44.033 (33496000)|SYSTEM_METHOD_ENTRY|[139]|LIST.add(ANY) 16:26:44.033 (33503000)|SYSTEM_METHOD_EXIT|[139]|LIST.add(ANY) 16:26:44.033 (33514000)|SYSTEM_METHOD_ENTRY|[139]|LIST.add(ANY) 16:26:44.033 (33521000)|SYSTEM_METHOD_EXIT|[139]|LIST.add(ANY)

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

16:26:44.034 (34211000)|CONSTRUCTOR_EXIT|[36]|01pQ0000000A0EK|<init>() 16:26:44.034 (34458000)|SYSTEM_METHOD_ENTRY|[44]|MAP.put(ANY, ANY) 16:26:44.034 (34489000)|SYSTEM_METHOD_EXIT|[44]|MAP.put(ANY, ANY) 16:26:44.034 (34508000)|SYSTEM_METHOD_ENTRY|[45]|LIST.add(ANY) 16:26:44.034 (34528000)|SYSTEM_METHOD_EXIT|[45]|LIST.add(ANY) 16:26:44.034 (34541000)|SYSTEM_METHOD_ENTRY|[45]|LIST.add(ANY) 16:26:44.034 (34549000)|SYSTEM_METHOD_EXIT|[45]|LIST.add(ANY) 16:26:44.034 (34557000)|SYSTEM_METHOD_ENTRY|[45]|LIST.add(ANY) 16:26:44.034 (34563000)|SYSTEM_METHOD_EXIT|[45]|LIST.add(ANY) 16:26:44.034 (34574000)|SYSTEM_METHOD_ENTRY|[45]|LIST.add(ANY) 16:26:44.034 (34580000)|SYSTEM_METHOD_EXIT|[45]|LIST.add(ANY) 16:26:44.034 (34589000)|SYSTEM_METHOD_ENTRY|[45]|LIST.add(ANY) 16:26:44.034 (34595000)|SYSTEM_METHOD_EXIT|[45]|LIST.add(ANY) 16:26:44.034 (34605000)|SYSTEM_METHOD_ENTRY|[45]|LIST.add(ANY) 16:26:44.034 (34611000)|SYSTEM_METHOD_EXIT|[45]|LIST.add(ANY) 16:26:44.034 (34621000)|SYSTEM_METHOD_ENTRY|[45]|LIST.add(ANY) 16:26:44.034 (34627000)|SYSTEM_METHOD_EXIT|[45]|LIST.add(ANY) 16:26:44.034 (34646000)|SYSTEM_METHOD_ENTRY|[45]|WebServiceCallout.invoke(APEX_OBJECT, APEX_OBJECT, MAP, LIST) 16:26:44.039 (39943000)|CALLOUT_REQUEST|[45]|SFDC_RMA_element:[Invoice=null, Invoice_type_info=(Invoice, http://www.w3.org/2001/XMLSchema, string, 0, 1, false), Order=197533, Order_type_info=(Order, http://www.w3.org/2001/XMLSchema, string, 0, 1, false), PO=, PO_type_info=(PO, http://www.w3.org/2001/XMLSchema, string, 0, 1, false), apex_schema_type_info=(http://wsdev.sensus.com/, true, false), field_order_type_info=(strCust, strPart, PO, Invoice, Order), strCust=null, strCust_type_info=(strCust, http://www.w3.org/2001/XMLSchema, string, 0, 1, false), strPart=, strPart_type_info=(strPart, http://www.w3.org/2001/XMLSchema, string, 0, 1, false)]::SFDC_STACK_DEPTH=1 SOAPAction="http://wsdev.sensus.com/SFDC_RMA" User-Agent=SFDC-Callout/24.0 Accept=text/xml Content-Type=text/xml; charset=UTF-8 16:26:47.009 (3009256000)|SYSTEM_METHOD_ENTRY|[155]|LIST.add(ANY) 16:26:47.009 (3009307000)|SYSTEM_METHOD_EXIT|[155]|LIST.add(ANY) 16:26:47.009 (3009323000)|SYSTEM_METHOD_ENTRY|[155]|LIST.add(ANY) 16:26:47.009 (3009331000)|SYSTEM_METHOD_EXIT|[155]|LIST.add(ANY) 16:26:47.009 (3009343000)|SYSTEM_METHOD_ENTRY|[155]|LIST.add(ANY) 16:26:47.009 (3009350000)|SYSTEM_METHOD_EXIT|[155]|LIST.add(ANY) 16:26:47.009 (3009362000)|SYSTEM_METHOD_ENTRY|[155]|LIST.add(ANY) 16:26:47.009 (3009369000)|SYSTEM_METHOD_EXIT|[155]|LIST.add(ANY) 16:26:47.009 (3009380000)|SYSTEM_METHOD_ENTRY|[155]|LIST.add(ANY) 16:26:47.009 (3009387000)|SYSTEM_METHOD_EXIT|[155]|LIST.add(ANY) 16:26:47.009 (3009398000)|SYSTEM_METHOD_ENTRY|[155]|LIST.add(ANY) 16:26:47.009 (3009406000)|SYSTEM_METHOD_EXIT|[155]|LIST.add(ANY) 16:26:47.009 (3009423000)|SYSTEM_METHOD_ENTRY|[156]|LIST.add(ANY) 16:26:47.009 (3009444000)|SYSTEM_METHOD_EXIT|[156]|LIST.add(ANY) 16:26:47.009 (3009460000)|SYSTEM_METHOD_ENTRY|[156]|LIST.add(ANY) 16:26:47.009 (3009470000)|SYSTEM_METHOD_EXIT|[156]|LIST.add(ANY) 16:26:47.009 (3009480000)|SYSTEM_METHOD_ENTRY|[156]|LIST.add(ANY) 16:26:47.009 (3009488000)|SYSTEM_METHOD_EXIT|[156]|LIST.add(ANY) 16:26:47.009 (3009503000)|SYSTEM_METHOD_ENTRY|[157]|LIST.add(ANY) 16:26:47.009 (3009522000)|SYSTEM_METHOD_EXIT|[157]|LIST.add(ANY)

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

16:26:47.011 (3011610000)|CALLOUT_RESPONSE|[45]| 16:26:47.011 (3011685000)|SYSTEM_METHOD_EXIT|[45]|WebServiceCallout.invoke(APEX_OBJECT, APEX_OBJECT, MAP, LIST) 16:26:47.011 (3011706000)|SYSTEM_METHOD_ENTRY|[57]|MAP.get(ANY) 16:26:47.011 (3011736000)|SYSTEM_METHOD_EXIT|[57]|MAP.get(ANY) 16:26:47.011 (3011759000)|METHOD_EXIT|[133]|01pQ0000000A0EK|wsdevSensusCom.InquiriesSoap.SFDC_RMA(String, String, String, String, String) 16:26:47.011 (3011768000)|METHOD_EXIT|[79]|01pQ0000000A0de|ReturnListController.searchCreditInquiry() 16:26:47.011 (3011785000)|METHOD_ENTRY|[80]|01pQ0000000A0de|ReturnListController.ShowResults(wsdevSensusCom.ArrayOfCreditInquiry) 16:26:47.011 (3011837000)|SYSTEM_METHOD_ENTRY|[105]|LIST.iterator() 16:26:47.015 (3015973000)|SYSTEM_METHOD_EXIT|[105]|LIST.iterator() 16:26:47.016 (3016218000)|SYSTEM_METHOD_ENTRY|[105]|system.ListIterator.hasNext() 16:26:47.016 (3016235000)|SYSTEM_METHOD_EXIT|[105]|system.ListIterator.hasNext() 16:26:47.016 (3016244000)|SYSTEM_METHOD_ENTRY|[105]|system.ListIterator.next() 16:26:47.016 (3016252000)|SYSTEM_METHOD_EXIT|[105]|system.ListIterator.next() 16:26:47.016 (3016264000)|SYSTEM_METHOD_ENTRY|[107]|LIST.iterator() 16:26:47.016 (3016447000)|SYSTEM_METHOD_EXIT|[107]|LIST.iterator() 16:26:47.017 (3017946000)|SYSTEM_METHOD_ENTRY|[107]|system.ListIterator.hasNext() 16:26:47.017 (3017960000)|SYSTEM_METHOD_EXIT|[107]|system.ListIterator.hasNext() 16:26:47.017 (3017970000)|SYSTEM_METHOD_ENTRY|[105]|system.ListIterator.hasNext() 16:26:47.017 (3017978000)|SYSTEM_METHOD_EXIT|[105]|system.ListIterator.hasNext() 16:26:47.017 (3017991000)|METHOD_EXIT|[80]|01pQ0000000A0de|ReturnListController.ShowResults(wsdevSensusCom.ArrayOfCreditInquiry) 16:26:47.018 (3018009000)|METHOD_ENTRY|[80]|01pQ0000000A0de|ReturnListController.__sfdc_myResults(LIST<RMAItemWrapper>) 16:26:47.018 (3018024000)|METHOD_EXIT|[80]|01pQ0000000A0de|ReturnListController.__sfdc_myResults(LIST<RMAItemWrapper>) 16:26:47.018 (3018058000)|CODE_UNIT_FINISHED|ReturnListController invoke(Credit) 16:26:47.019 (3019048000)|VF_APEX_CALL|j_id4|{!Credit}|PageReference: none 16:26:47.023 (3023940000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ0000000A0de|ReturnListController get(myResults) 16:26:47.023 (3023956000)|SYSTEM_MODE_ENTER|true 16:26:47.023 (3023966000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ0000000A0de|myResults 16:26:47.023 (3023977000)|CODE_UNIT_FINISHED|myResults 16:26:47.023 (3023984000)|CODE_UNIT_FINISHED|ReturnListController get(myResults) 16:26:47.044 (3044820000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ0000000A0de|ReturnListController get(searchTextPONumber) 16:26:47.044 (3044839000)|SYSTEM_MODE_ENTER|true 16:26:47.044 (3044848000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ0000000A0de|searchTextPONumber 16:26:47.044 (3044911000)|CODE_UNIT_FINISHED|searchTextPONumber 16:26:47.044 (3044920000)|CODE_UNIT_FINISHED|ReturnListController get(searchTextPONumber) 16:26:47.045 (3045102000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ0000000A0de|ReturnListController get(searchTextOrderNumber) 16:26:47.045 (3045113000)|SYSTEM_MODE_ENTER|true 16:26:47.045 (3045120000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ0000000A0de|searchTextOrderNumber 16:26:47.045 (3045151000)|CODE_UNIT_FINISHED|searchTextOrderNumber 16:26:47.045 (3045158000)|CODE_UNIT_FINISHED|ReturnListController get(searchTextOrderNumber) 16:26:47.045 (3045317000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ0000000A0de|ReturnListController get(searchTextPartNumber) 16:26:47.045 (3045327000)|SYSTEM_MODE_ENTER|true 16:26:47.045 (3045334000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ0000000A0de|searchTextPartNumber 16:26:47.045 (3045365000)|CODE_UNIT_FINISHED|searchTextPartNumber 16:26:47.045 (3045372000)|CODE_UNIT_FINISHED|ReturnListController get(searchTextPartNumber) 16:26:47.049 (3049325000)|VF_SERIALIZE_VIEWSTATE_BEGIN|066Q00000000sfm 16:26:47.052 (3052173000)|VF_SERIALIZE_VIEWSTATE_END 16:26:47.380 (3055358000)|CUMULATIVE_LIMIT_USAGE 16:26:47.380|LIMIT_USAGE_FOR_NS|(default)|   Number of SOQL queries: 0 out of 100   Number of query rows: 0 out of 50000   Number of SOSL queries: 0 out of 20   Number of DML statements: 0 out of 150   Number of DML rows: 0 out of 10000   Number of script statements: 88 out of 200000   Maximum heap size: 0 out of 6000000   Number of callouts: 1 out of 10   Number of Email Invocations: 0 out of 10   Number of fields describes: 0 out of 100   Number of record type describes: 0 out of 100   Number of child relationships describes: 0 out of 100   Number of picklist describes: 0 out of 100   Number of future calls: 0 out of 10

 

16:26:47.380|CUMULATIVE_LIMIT_USAGE_END

 

16:26:47.055 (3055386000)|CODE_UNIT_FINISHED|VF: /apex/returnlistpage 16:26:47.055 (3055392000)|EXECUTION_FINISHED

 



Best Answer chosen by Admin (Salesforce Developers) 
James LoghryJames Loghry

I don't see any obvious exceptions thrown, but I would take a step back first.

 

If you don't have it already, grab soapui and test your WSDL with your inputs and make sure you're getting the expected outputs back.

 

Also, throw as many System.debug statements around the callout you can.  If you have a try/catch surrounding the callout, then throw a System.debug with the exception as well.

 

Hope that helps and happy debugging.

All Answers

James LoghryJames Loghry

I don't see any obvious exceptions thrown, but I would take a step back first.

 

If you don't have it already, grab soapui and test your WSDL with your inputs and make sure you're getting the expected outputs back.

 

Also, throw as many System.debug statements around the callout you can.  If you have a try/catch surrounding the callout, then throw a System.debug with the exception as well.

 

Hope that helps and happy debugging.

This was selected as the best answer
vikramkkvikramkk

Did test with soap UI. I am getting expected results. But couldn't figure what going wrong from debug log.

vikramkkvikramkk

Thanks James. Actually I didn't display results from web service on visual force page correctly. Now I fixed it.