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
JaksonJakson 

web service

WSDL2APEX Parse error - Unable to find schema for element; {http://www.w3.org/2001/XMLSchema}string

Ashish_SFDCAshish_SFDC

Hi Jakson, 

 

 

This issue arises when the element is not wrapped under the Complex type.

 

So, in your WSDL file, you are trying to use a primitive at the top level, which is the cause of the issue. 

However, when you wrap the same with the element wrapped in complex type, it works correctly. 

 

The wrapping of the Primitive type element under the complex type works correctly with Salesforce.

 

Even if you see the WSDL's generated by Salesforce (either Enterprise or Partner), you will be able to see that all the primitive type elements are wrapped within the Complex Type. 

 

 

 

 

Ashish_SFDCAshish_SFDC

In the documentation, it is mentioned that "Apex supports only the document literal wrapped WSDL style". You can see this statement under the heading "Supported WSDL Features" 

 

However, the link below provides more detail:

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex.htm#invoking

The WSDLs that we support must follow these guidelines:

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex.htm#supported_wsdls

 

Regards,

Ashish