You need to sign in to do that
Don't have an account?
![patelankurb patelankurb](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Problem with wsdl2Apex code generation - class relationship extension
Wsdl2java (Axis 2.0) generates class extension is properly. But in Apex, generate Apex from WSDL feature is not giving appropriate class relationship.
e.g. I have following xsd in wsdl
<xsd:complexType name="Profile">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="lang" type="xsd:string" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="UserProfile">
<xsd:simpleContent>
<xsd:extension base="Profile">
<xsd:attribute name="code" type="xsd:string"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
WSDL2Apex generates UserProfile and Profile classes, but dont have any relationship. In java Profile class has String _value containment. But Apex class does not have that containment too.
Any help would be appreciate.
Thanks.
Ankur
Hi Patel,
Did you ever found a solution for the problem you ran into?
After apex class generation, I changed generated code with entends.. I tweek generated code.. and that works for me..
Thanks Patel for the response.
Can you please paste the code snippet generated from the WSDL which you mentioned in your question and what changes you did to it?
That will be really helpful, as i am stuck with the similar issue.
Hello Patel,
Did you mean extends in your previous reply.
Will be really helpful if you can provide some insight on how you did that.
Hi Patel,
Can you please give some thoughts on this on how to proceed?
That will be really helpful if you can assist,
Hi, Imran did you figure out the answer to your question? I do have a similar issue. Thanks
Even i did not get the answer. Finally had to modify wsdl accordingly and generate the Apex code?
Looks like WSDL2Apex is not interpreting the complex type as the other tools does.