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
AshyAshy 

failed to parse wsdl

 

hi  canany one  help me out with this problem

where iam unable to parse mywsdl

its showing this error

 

Failed to parse wsdl:target Name space not specified in wsdl:definitions

what do we mean by it

thanks

Ashy

Best Answer chosen by Admin (Salesforce Developers) 
sfdcfoxsfdcfox

A wsdl's first line of code should look like this:

 

<wsdl:definitions name="nmtoken"? targetNamespace="uri"?>

(Web Services Description Language (WSDL) 1.1, http://www.w3.org/TR/wsdl, Section 2.1)

 

Your WSDL file is missing the targetNamespace attribute, which is required by salesforce.com to infer the correct namespace (note that WSDL 1.1 uses a ?, meaning it is an optional parameter). You will want to use the URI assigned to the service. For simplicity, you can set the targetNamespace to be the name of the service (e.g. http://www.contoso.com/services/soap/some-service). you should read the file I linked above for more details.

All Answers

sfdcfoxsfdcfox

A wsdl's first line of code should look like this:

 

<wsdl:definitions name="nmtoken"? targetNamespace="uri"?>

(Web Services Description Language (WSDL) 1.1, http://www.w3.org/TR/wsdl, Section 2.1)

 

Your WSDL file is missing the targetNamespace attribute, which is required by salesforce.com to infer the correct namespace (note that WSDL 1.1 uses a ?, meaning it is an optional parameter). You will want to use the URI assigned to the service. For simplicity, you can set the targetNamespace to be the name of the service (e.g. http://www.contoso.com/services/soap/some-service). you should read the file I linked above for more details.

This was selected as the best answer
AshyAshy

hi fox,

 

jus got anew one its this

 

Error: Failed to parse wsdl Found schema import from location ../Schema/OTPAuthenticationSchema.xsd. External schema import not supported


AshyAshy

 What do i do regarding this new one 

 

:smileyindifferent:

 

Thanks & Regards 

Ashy

 

sfdcfoxsfdcfox

As stated, you can't use external references. This means you'll have to download the external files, and copy and paste the correct nodes in-place into the original wsdl file. This can be a challenging task, but with a little effort, you should be able to create a single file with no external references. I'd recommend you read the WSDL specification (from w3c.org) to figure out how to do this. I'm not familiar with your specific service, but if you get stuck, I'll see what I can do to help.

AshyAshy

hi fox ,

thanx for the solution

 

its working and parsing the wsdl

 

after parsing im giving the class name and when i click genrate apex code button im getting this error after that



Error
Apex Generation FailedUnable to find schema for element AuthSupt_Type
AshyAshy

does this mean there is a problem with the element schema?

 

pls help

 

Thanx fox

AshyAshy



 

hi fox,

 

i have cleared the previous error also but  struck with this one

 

hope u dont mind 

thanx 

Ashy

Apex Generation FailedUnsupported schema type {http://www.w3.org/2001/XMLSchema}ID
sfdcfoxsfdcfox

salesforce.com doesn't support all schema types. Consider changing your WSDL to the "String" type instead for these parameters (which is a parent type of ID).

 

Edit: See http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html (Section 3) for a graphical map of built-in data types.