1

I have got a WSDL file and i have generated respective classes from provided WSDL using Apex -> Generate from WSDL functionality.

Sub has been generated without any issue. I have wrote a class to consume stub methods. I am able to call GetSession() method and it is returning session id correctly. There is one more method getTender() when i call this method i get -

Line: 917, Column: 1 System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element EMPLOYEE_ID

exception. EMPLOYEE_ID is defined as below in WSDL file -

              <s:complexType>
                <s:sequence>
                  <s:element minOccurs="0" maxOccurs="1" name="TENDER_ID" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="EMPLOYEE_ID" type="s:long" />
                  <s:element minOccurs="0" maxOccurs="1" name="REFERENCE" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="SHARING" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="STATUS" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="DEADLINE_DATE" type="s:date" />
                  <s:element minOccurs="0" maxOccurs="1" name="DECISION_DATE" type="s:date" />
                  <s:element minOccurs="0" maxOccurs="1" name="REVIEW_DATE" type="s:date" />
                  <s:element minOccurs="0" maxOccurs="1" name="PHASE" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="PROCEDURE_TYPE" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="BID_TYPE" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="SUBJECT" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="CONDITIONS" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="LIMITATIONS" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="AWARD_CRITERIA" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="ALIGNMENT_ID" type="s:long" />
                  <s:element minOccurs="0" maxOccurs="1" name="REGION_ID" type="s:long" />
                  <s:element minOccurs="0" maxOccurs="1" name="BUSINESS_UNIT_ID" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="EXTERNAL_ID_1" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="CREATION_DATE" type="s:date" />
                  <s:element minOccurs="0" maxOccurs="1" name="LEAD_OR_OPPORTUNITY" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="OPPORTUNITY_TYPE" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="OPPORTUNITY_SOURCE" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="SOURCE_DESCRIPTION" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="SELLING_MODEL" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="UPSALES_PERCENTAGE" type="s:double" />
                  <s:element minOccurs="0" maxOccurs="1" name="FORECAST_TYPE" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="GLOBAL_VALUE" type="s:double" />
                  <s:element minOccurs="0" maxOccurs="1" name="PROBABILITY_TO_CLOSE" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="CLOSING_REASON" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="REASON_DESCRIPTION" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="LOST_AGAINST" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="1" name="LEAD_STATUS" type="s:string" />
                  <s:element minOccurs="0" maxOccurs="unbounded" name="RefreshResTenderBuyingProcess">
                    <s:complexType>
                      <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" name="STEP" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="DESCRIPTION" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="START_DATE" type="s:date" />
                        <s:element minOccurs="0" maxOccurs="1" name="END_DATE" type="s:date" />
                        <s:element minOccurs="0" maxOccurs="1" name="TENDER_BUYING_PROCESS_EXTERNAL_ID_1" type="s:string" />
                      </s:sequence>
                      <s:attribute name="primary_key" type="s:long" />
                    </s:complexType>
                  </s:element>
                  <s:element minOccurs="0" maxOccurs="unbounded" name="RefreshResTenderComment">
                    <s:complexType>
                      <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" name="EMPLOYEE_ID" type="s:long" />
                        <s:element minOccurs="0" maxOccurs="1" name="CREATE_DATE" type="s:dateTime" />
                        <s:element minOccurs="0" maxOccurs="1" name="TYPE" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="BID_IMPACT" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="TEXT" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="ALIGNMENT_ID" type="s:long" />
                        <s:element minOccurs="0" maxOccurs="1" name="TENDER_COMMENT_EXTERNAL_ID_1" type="s:string" />
                      </s:sequence>
                      <s:attribute name="primary_key" type="s:long" />
                    </s:complexType>
                  </s:element>
                  <s:element minOccurs="0" maxOccurs="unbounded" name="RefreshResTenderCompetition">
                    <s:complexType>
                      <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" name="STAGE" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="COMPETITOR" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="POSITION" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="STATUS" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="DESCRIPTION" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="TENDER_COMPETITION_EXTERNAL_ID_1" type="s:string" />
                      </s:sequence>
                      <s:attribute name="primary_key" type="s:long" />
                    </s:complexType>
                  </s:element>
                  <s:element minOccurs="0" maxOccurs="unbounded" name="RefreshResTenderCustomer">
                    <s:complexType>
                      <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" name="TENDER_ROLE" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="ORGANIZATION_TYPE" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="ORGANIZATION_NAME" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="ORGANIZATION_ADDRESS" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="ORGANIZATION_ID" type="s:long" />
                        <s:element minOccurs="0" maxOccurs="1" name="CONTACT_NAME" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="CONTACT_ROLE" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="CONTACT_PHONE" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="CONTACT_EMAIL" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="CONTACT_ID" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="PRICELIST_ID" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="STATUS" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="COMMENTS" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="PHASE" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="TENDER_CUSTOMER_EXTERNAL_ID_1" type="s:string" />
                      </s:sequence>
                      <s:attribute name="primary_key" type="s:long" />
                    </s:complexType>
                  </s:element>
                  <s:element minOccurs="0" maxOccurs="unbounded" name="RefreshResTenderDocument">
                    <s:complexType>
                      <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" name="EMPLOYEE_ID" type="s:long" />
                        <s:element minOccurs="0" maxOccurs="1" name="CREATE_DATE" type="s:dateTime" />
                        <s:element minOccurs="0" maxOccurs="1" name="ATTACHMENT_TYPE" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="ATTACHMENT_NAME" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="ATTACHMENT_URL" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="DESCRIPTION" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="DOCUMENT_FILE" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="CHANGE_DATE" type="s:date" />
                        <s:element minOccurs="0" maxOccurs="1" name="ALIGNMENT_ID" type="s:long" />
                        <s:element minOccurs="0" maxOccurs="1" name="TENDER_DOCUMENT_EXTERNAL_ID_1" type="s:string" />
                      </s:sequence>
                      <s:attribute name="primary_key" type="s:long" />
                    </s:complexType>
                  </s:element>
                  <s:element minOccurs="0" maxOccurs="unbounded" name="RefreshResTenderProduct">
                    <s:complexType>
                      <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" name="PRODUCT_ID" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="OVERALL_VALUE" type="s:double" />
                        <s:element minOccurs="0" maxOccurs="1" name="OVERALL_QUANTITY" type="s:long" />
                        <s:element minOccurs="0" maxOccurs="1" name="BIDDING_PRICE" type="s:double" />
                        <s:element minOccurs="0" maxOccurs="1" name="WINNING_PRICE" type="s:double" />
                        <s:element minOccurs="0" maxOccurs="1" name="CURRENCY" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="STATUS" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="PERIOD" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="TENDER_COPARTICIPANT_ID" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="NUMBER_OF_PERIODS" type="s:long" />
                        <s:element minOccurs="0" maxOccurs="1" name="TENDER_PRODUCT_EXTERNAL_ID_1" type="s:string" />
                      </s:sequence>
                      <s:attribute name="primary_key" type="s:long" />
                    </s:complexType>
                  </s:element>
                  <s:element minOccurs="0" maxOccurs="unbounded" name="RefreshResTenderStage">
                    <s:complexType>
                      <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" name="STAGE" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="CREATION_DATE" type="s:date" />
                        <s:element minOccurs="0" maxOccurs="1" name="START_DATE" type="s:date" />
                        <s:element minOccurs="0" maxOccurs="1" name="END_DATE" type="s:date" />
                        <s:element minOccurs="0" maxOccurs="1" name="DUE_DATE" type="s:date" />
                        <s:element minOccurs="0" maxOccurs="1" name="UPDATE_DATE" type="s:date" />
                        <s:element minOccurs="0" maxOccurs="1" name="STATUS" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="DESCRIPTION" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="TENDER_STAGE_EXTERNAL_ID_1" type="s:string" />
                      </s:sequence>
                      <s:attribute name="primary_key" type="s:long" />
                    </s:complexType>
                  </s:element>
                  <s:element minOccurs="0" maxOccurs="unbounded" name="RefreshResTenderTeamMember">
                    <s:complexType>
                      <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" name="TEAM_ROLE" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="EMPLOYEE_NAME" type="s:string" />
                        <s:element minOccurs="0" maxOccurs="1" name="EMPLOYEE_ID" type="s:long" />
                        <s:element minOccurs="0" maxOccurs="1" name="ALIGNMENT_ID" type="s:long" />
                        <s:element minOccurs="0" maxOccurs="1" name="TENDER_TEAM_MEMBER_EXTERNAL_ID_1" type="s:string" />
                      </s:sequence>
                      <s:attribute name="primary_key" type="s:long" />
                    </s:complexType>
                  </s:element>
                </s:sequence>
                <s:attribute name="primary_key" type="s:long" />
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element minOccurs="0" maxOccurs="1" name="Parameters" type="tns:WS_RefreshTenderParameters" />
    </s:sequence>
  </s:complexType>

can anyone please suggest me how can i fix this issue?

  • try to change Employee_id into "type="s:string"" – Tushar Sharma Sep 16 '15 at 8:37
  • @TusharSharma I have tried this but exception is same – Pramod Kumar Sep 16 '15 at 9:09
  • Can you add the full SOAP response that is failing and a link to the WSDL? – Daniel Ballinger Sep 21 '15 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.