You need to sign in to do that
Don't have an account?
Error: Failed to parse wsdl: attribute name can not be null
Hi,
I am getting "Error: Failed to parse wsdl: attribute name can not be null at 484:53" when i am trying to parse wsdl using Wsdl2Apex.The line where it seems to complain is in bold in the snippit below.
<s:complexType name="AssessmentResult">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ClientId" type="s1:EntityId"/>
<s:element minOccurs="0" maxOccurs="1" name="ProviderId" type="s1:EntityId"/>
<s:element minOccurs="0" maxOccurs="1" name="ClientOrderId" type="s1:EntityId"/>
<s:element minOccurs="0" maxOccurs="1" name="ReceiptId" type="s1:EntityId"/>
<s:element minOccurs="0" maxOccurs="unbounded" name="Results" type="s1:Results"/>
<s:element minOccurs="0" maxOccurs="1" name="AssessmentStatus" type="s1:AssessmentStatus"/>
<s:element minOccurs="0" maxOccurs="1" name="UserArea" type="s1:UserArea"/>
</s:sequence>
<s:attribute ref="xml:lang" use="optional"/>
<s:attribute name="validFrom" type="s:string"/>
<s:attribute name="validTo" type="s:string"/>
</s:complexType>
Any Idea?
Thanks
As this seems parse error mean you are missing some tag or attribute properties
Clearly the error says
so here you have to add attribute 'name'
Henceforth, something like this should work
<s:attribute ref="xml:lang" name="salesforce" use="optional"/> (add name Attribute)
Thanks ForceLabs, I fixed the error by giving name and type of the attribute.But now i am getting another Error "Error: Failed to parse wsdl: Found more than one wsdl:portType. WSDL with multiple portType not supported ". Any Idea?
Thanks
It would be great help, if you can paste here the exact xml you are trying to implement
But before you jump, I recommend you to read this to find the exact idea behind the xml and its attributes. This will be good refrence to keep on your right page.
http://www.w3.org/TR/wsdl
Please tag, reply as 'solution' if anyone of solution worked for you - this will help other to find. Your action would highly be appreciated.
I had similar problem few months back when I was trying to import wsdl from a .net application and ended up doing the following -
1. Wrote a java webservice wrapper on top of our .net webservice using Axis 1.0. This will eliminate the hassles around importing multiple port wsdls. Also, the other workaround to avoid this error is remove the additional port from xml editor tools like Altova (if you are xml expert you can use regular text pad to remove ports)
2. Though I could pretty much use the above workaround for all my other webservices, we thought its too cumbersome and took the following approach for the rest of the webservices.
Used http class and posted outbound messages to the endpoint. here is the quick example. You can find tons of information on salesforce.com wiki.
Thanks Raghu.
ForceLabs,
Here is the link to wsdl .http://integration.services.7-5.identifythebest.com/service.asmx?wsdl