I have the below apex class as a SOAP Webservice

global class TestingWebService {

    webservice static List<ContentDocument> getContentNotes(date startDate, date endDate) {
        ContentDocument[] ContentDocumentToReturn = new ContentDocument[0];
        for(ContentDocument contentDoc : [SELECT Id, LatestPublishedVersion.title,LatestPublishedVersion.textPreview, LastModifiedDate,
                                          (SELECT LinkedEntityId FROM ContentDocumentLinks WHERE LinkedEntity.Type='Contact')
                                          FROM ContentDocument WHERE LastModifiedDate >=:startDate AND LastModifiedDate <=:endDate  order by lastModifiedDate desc LIMIT 1000]) {

                                              if(!contentDoc.ContentDocumentLinks.isEmpty()) {
        return ContentDocumentToReturn;

I have generated the WSDL from the apex classes page in Salesforce but when I add the WSDL in SOAP UI to test the web service I got the below list of errors:

enter image description here

After wasting hours on google I got the below link

https://success.salesforce.com/issues_view?id=a1p3A000000eatxQAA this solved all error except the first two as shown in the above picture

Could someone please help me either merge this wsdl with the enterprise WSDL or how to solve the first two errors as shown in the image


Here is the complex Type for StringList (From the Enterprise WSDL):

<complexType name="StringList">
    <element name="values" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>

And ChangeEventHeader (From the Partner WSDL):

<simpleType name="changeEventType">
  <restriction base="xsd:string">
    <enumeration value="CREATE"/>
    <enumeration value="UPDATE"/>
    <enumeration value="DELETE"/>
    <enumeration value="UNDELETE"/>
    <enumeration value="GAP_CREATE"/>
    <enumeration value="GAP_UPDATE"/>
    <enumeration value="GAP_DELETE"/>
    <enumeration value="GAP_UNDELETE"/>
<complexType name="ChangeEventHeader">
    <element name="entityName" type="xsd:string"/>
    <element name="recordIds" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/>
    <element name="commitTimestamp" type="xsd:long"/>
    <element name="commitNumber" type="xsd:long"/>
    <element name="commitUser" type="xsd:string"/>
    <element name="diffFields" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
    <element name="changeType" type="tns:changeEventType"/>
    <element name="changeOrigin" type="xsd:string"/>
    <element name="transactionKey" type="xsd:string"/>
    <element name="sequenceNumber" type="xsd:int"/>
    <element name="isTransactionEnd" type="xsd:boolean"/>
    <element name="nulledFields" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
  • Thank you so much! – gs650x Jun 2 '19 at 9:31

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.