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
Unable to find element for {http://schemas.microsoft.com/dynamics/2008/01/services}ACTSFToAxServiceInsertContactResponse
However, If you put this url http ://schemas.microsoft.com/dynamics/2008/01/services 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 ://schemas.microsoft.com/dynamics/2008/01/services 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="http://schemas.microsoft.com/dynamics/2008/01/services" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://schemas.microsoft.com/dynamics/2008/01/services" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsp:Policy wsu:Id="BasicHttpBinding_ACTSFToAxService_policy">
<wsp:ExactlyOne>
<wsp:All>
<http:NegotiateAuthentication xmlns:http="http://schemas.microsoft.com/ws/06/2004/policy/http"/>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsdl:types>
<xsd:schema targetNamespace="http://schemas.microsoft.com/dynamics/2008/01/services/Imports">
<!-- <xsd:import namespace="http://schemas.microsoft.com/dynamics/2008/01/services" schemaLocation="http://XXXXX/MicrosoftDynamicsAXAif50/actsftoaxservice.svc?xsd=xsd0"/>
<xsd:import namespace="http://schemas.microsoft.com/dynamics/2008/01/documents/Fault" schemaLocation="http://XXXXX/MicrosoftDynamicsAXAif50/actsftoaxservice.svc?xsd=xsd3"/>
<xsd:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" schemaLocation="http://XXXXX/MicrosoftDynamicsAXAif50/actsftoaxservice.svc?xsd=xsd1"/>
<xsd:import namespace="http://schemas.datacontract.org/2004/07/Microsoft.Dynamics.IntegrationFramework.Service" schemaLocation="http://XXXXX/MicrosoftDynamicsAXAif50/actsftoaxservice.svc?xsd=xsd2"/> -->
</xsd:schema>
<xsd:schema targetNamespace="http://schemas.microsoft.com/dynamics/2008/01/services"></xsd:schema>
<xsd:schema targetNamespace="http://schemas.microsoft.com/dynamics/2008/01/documents/Fault"></xsd:schema>
<xsd:schema targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/"></xsd:schema>
<xsd:schema targetNamespace="http://schemas.datacontract.org/2004/07/Microsoft.Dynamics.IntegrationFramework.Service"></xsd:schema>
</wsdl:types>
<wsdl:message name="ACTSFToAxServiceInsertContactRequest">
<wsdl:part element="tns:ACTSFToAxServiceInsertContactRequest" name="parameters"/>
</wsdl:message>
<wsdl:message name="ACTSFToAxServiceInsertContactResponse">
<wsdl:part element="tns:ACTSFToAxServiceInsertContactResponse" name="parameters"/>
</wsdl:message>
<wsdl:message name="ACTSFToAxService_insertContact_AifFaultFault_FaultMessage">
<wsdl:part element="q1:AifFault" name="detail" xmlns:q1="http://schemas.microsoft.com/dynamics/2008/01/documents/Fault"/>
</wsdl:message>