Axapta Wsdl2Apex Error

I am trying to import a WSDL in order to create the apex wrapper for a Dynamics Axapta SOAP Service.

Firstly, I’ve commented ‘xsd:import’ elements because Salesforce not support them.
After this, I choose the wsdl document, I click the Parse WSDL button and parse it successfully.
But when I want to generate Apex code I get this error
enter image description here

Unable to find element for

However, If you put this url http :// in the browser, you will see the next message

‘The resource you are looking for has been removed, had its name
changed, or is temporarily unavailable.’.

I’ve tried to create a Soap Project with the SoapUI application and it was created successfully.

I’ve also googled unsuccessfully about why this url http :// is unavailable.

Could it be the WSDL document malformed?
Should I replace that schema url by the service ?

This is a WSDL snippet:

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="ACTSFToAxService" targetNamespace="" xmlns:msc="" xmlns:soap="" xmlns:soap12="" xmlns:soapenc="" xmlns:tns="" xmlns:wsa="" xmlns:wsa10="" xmlns:wsam="" xmlns:wsap="" xmlns:wsaw="" xmlns:wsdl="" xmlns:wsp="" xmlns:wsu="" xmlns:wsx="" xmlns:xsd="">
    <wsp:Policy wsu:Id="BasicHttpBinding_ACTSFToAxService_policy">
                <http:NegotiateAuthentication xmlns:http=""/>
        <xsd:schema targetNamespace="">
            <!-- <xsd:import namespace="" schemaLocation="http://XXXXX/MicrosoftDynamicsAXAif50/actsftoaxservice.svc?xsd=xsd0"/>
            <xsd:import namespace="" schemaLocation="http://XXXXX/MicrosoftDynamicsAXAif50/actsftoaxservice.svc?xsd=xsd3"/>
            <xsd:import namespace="" schemaLocation="http://XXXXX/MicrosoftDynamicsAXAif50/actsftoaxservice.svc?xsd=xsd1"/>
            <xsd:import namespace="" schemaLocation="http://XXXXX/MicrosoftDynamicsAXAif50/actsftoaxservice.svc?xsd=xsd2"/> -->
        <xsd:schema targetNamespace=""></xsd:schema>
        <xsd:schema targetNamespace=""></xsd:schema>
        <xsd:schema targetNamespace=""></xsd:schema>
        <xsd:schema targetNamespace=""></xsd:schema>
    <wsdl:message name="ACTSFToAxServiceInsertContactRequest">
        <wsdl:part element="tns:ACTSFToAxServiceInsertContactRequest" name="parameters"/>
    <wsdl:message name="ACTSFToAxServiceInsertContactResponse">
        <wsdl:part element="tns:ACTSFToAxServiceInsertContactResponse" name="parameters"/>
    <wsdl:message name="ACTSFToAxService_insertContact_AifFaultFault_FaultMessage">
        <wsdl:part element="q1:AifFault" name="detail" xmlns:q1=""/>


Can you share the WSDL in question? I’ve made a free alternative version of WSDL2Apex that can process xsd imports directly – See FuseIT SFDC Explorer.

Generally speaking with imports (as Keith commented), if you are doing it manually you need to flatten the contents of the commented out import into the main WSDL.

Also, the schema you want won’t be at That is the namespace for the import. Confusingly this namespace takes the form of the URL. Instead the imports contents will be at http://XXXXX/MicrosoftDynamicsAXAif50/actsftoaxservice.svc?xsd=xsd0

Source : Link , Question Author : Alberto Sanchez , Answer Author : Daniel Ballinger

Leave a Comment