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
navy1.3947124627151147E12navy1.3947124627151147E12 

xsd:extension of WSDL not parsing in Salesforce

We have been working on an integration, wherein we imported the WSDL provided by Middleware. We are facing an issue wherein multiple values are being sent by middleware but not recieved by Salesforce.
For example Middleware is sending 'contract price' with type as 'cpf:amountType' . Corresponding WSDL snippet –
<xsd:complexType name = "contractHeaderType">
    <xsd:sequence>
        <xsd:element name = "ContractPrice" type = "cpf:amountType" minOccours = "1" maxOccours = "1" />
        <xsd:element name = "localCurrency" type = "cpf:string" minOccours = "0" maxOccours = "1" />
    </xsd:sequence>
</xsd:complexType>

<xsd:complexType name = "amountType">
    <xsd:simpleContent>
        <xsd:extension base = "xsd:double">
            <xsd:attribute name = "currency" type = "xsd:string" />
        </xsd:extension>
    </xsd:simpleContent>
</xsd:complexType>

So essentially middleware is sending something like - 
<contractPrice currency="XYZ">86400.00</contractPrice>

Now when we import the WSDL, the class automatically created doesnot have attribute for the ContractPrice (Double), it only has attribute for currency(string).
public class amountType {
     public String currency_x;
     private String[] currency_x_att_info = new String[]{'currency'};
     private String[] apex_schema_type_info = new String[]{'https://mwb2b.pb.com/CommonInterface/Contract-2.0','false','false'};
     private String[] field_order_type_info = new String[]{};
}
 
Did anyone come across this kind of issue before? Any input around reading the extension type will be helpful.