1

I am trying to parse a wsdl (this one) using the FuseIT SFDC Explorer tool, as the wsdl has some xsd imports.

I am getting an error that I dont understand, not sure if it is wsdl related or parser related. Has anyone seen this or similar? I have searched the wsdl for a parameter of that name but dont find.

enter image description here

1

The error message about objectToConvert being a null argument is coming out of the T4 templates that are used to generate the Apex code.

Underlying this, the FuseIT parser code was failing to determine the targetNamespace of the imported type used for the return parameters by the web methods. I've updated the code base to use the imported targetNamespace in preference of searching for a namespace with the name "tns".

Here are the generated Apex classes that you can use until an update is released. I've deployed them to an Org but haven't tested calling them.

//Generated by FuseIT WSDL2Apex (http://www.fuseit.com/Solutions/SFDC-Explorer/Help-WSDL-Parser.aspx)

public class schemasMicrosoftCom200310Serializat1 {
    public class ArrayOfdateTime {
        public DateTime[] dateTime_x;
        private String[] dateTime_x_type_info = new String[]{'dateTime','http://schemas.microsoft.com/2003/10/Serialization/Arrays','dateTime','0','-1','false'};
        private String[] apex_schema_type_info = new String[]{'http://schemas.microsoft.com/2003/10/Serialization/Arrays','true','false'};
        private String[] field_order_type_info = new String[]{'dateTime_x'};
    }
    public class ArrayOfdouble {
        public Double[] double_x;
        private String[] double_x_type_info = new String[]{'double','http://schemas.microsoft.com/2003/10/Serialization/Arrays','double','0','-1','false'};
        private String[] apex_schema_type_info = new String[]{'http://schemas.microsoft.com/2003/10/Serialization/Arrays','true','false'};
        private String[] field_order_type_info = new String[]{'double_x'};
    }
    public class ArrayOfguid {
        public String[] guid;
        private String[] guid_type_info = new String[]{'guid','http://schemas.microsoft.com/2003/10/Serialization/Arrays','guid','0','-1','false'};
        private String[] apex_schema_type_info = new String[]{'http://schemas.microsoft.com/2003/10/Serialization/Arrays','true','false'};
        private String[] field_order_type_info = new String[]{'guid'};
    }
    public class ArrayOfKeyValueOfstringboolean {
        public schemasMicrosoftCom200310Serializat1.ArrayOfKeyValueOfstringboolean_KeyValueOfstringboolean_element[] KeyValueOfstringboolean;
        private String[] KeyValueOfstringboolean_type_info = new String[]{'KeyValueOfstringboolean','http://schemas.microsoft.com/2003/10/Serialization/Arrays','','0','-1','false'};
        private String[] apex_schema_type_info = new String[]{'http://schemas.microsoft.com/2003/10/Serialization/Arrays','true','false'};
        private String[] field_order_type_info = new String[]{'KeyValueOfstringboolean'};
    }
    public class ArrayOfKeyValueOfstringboolean_KeyValueOfstringboolean_element {
        public String Key;
        public Boolean Value;
        private String[] Key_type_info = new String[]{'Key','http://schemas.microsoft.com/2003/10/Serialization/Arrays','string','1','1','true'};
        private String[] Value_type_info = new String[]{'Value','http://schemas.microsoft.com/2003/10/Serialization/Arrays','boolean','1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://schemas.microsoft.com/2003/10/Serialization/Arrays','true','false'};
        private String[] field_order_type_info = new String[]{'Key','Value'};
    }
    public class ArrayOfKeyValueOfstringstring {
        public schemasMicrosoftCom200310Serializat1.ArrayOfKeyValueOfstringstring_KeyValueOfstringstring_element[] KeyValueOfstringstring;
        private String[] KeyValueOfstringstring_type_info = new String[]{'KeyValueOfstringstring','http://schemas.microsoft.com/2003/10/Serialization/Arrays','','0','-1','false'};
        private String[] apex_schema_type_info = new String[]{'http://schemas.microsoft.com/2003/10/Serialization/Arrays','true','false'};
        private String[] field_order_type_info = new String[]{'KeyValueOfstringstring'};
    }
    public class ArrayOfKeyValueOfstringstring_KeyValueOfstringstring_element {
        public String Key;
        public String Value;
        private String[] Key_type_info = new String[]{'Key','http://schemas.microsoft.com/2003/10/Serialization/Arrays','string','1','1','true'};
        private String[] Value_type_info = new String[]{'Value','http://schemas.microsoft.com/2003/10/Serialization/Arrays','string','1','1','true'};
        private String[] apex_schema_type_info = new String[]{'http://schemas.microsoft.com/2003/10/Serialization/Arrays','true','false'};
        private String[] field_order_type_info = new String[]{'Key','Value'};
    }
    public class ArrayOfstring {
        public String[] string_x;
        private String[] string_x_type_info = new String[]{'string','http://schemas.microsoft.com/2003/10/Serialization/Arrays','string','0','-1','true'};
        private String[] apex_schema_type_info = new String[]{'http://schemas.microsoft.com/2003/10/Serialization/Arrays','true','false'};
        private String[] field_order_type_info = new String[]{'string_x'};
    }
    public class ArrayOfunsignedInt {
        public Integer[] unsignedInt;
        private String[] unsignedInt_type_info = new String[]{'unsignedInt','http://schemas.microsoft.com/2003/10/Serialization/Arrays','unsignedInt','0','-1','false'};
        private String[] apex_schema_type_info = new String[]{'http://schemas.microsoft.com/2003/10/Serialization/Arrays','true','false'};
        private String[] field_order_type_info = new String[]{'unsignedInt'};
    }
}

You can get wwwId3globalComId3gws201304 from the DropBox link. It was too large to embed in the answer.


As per your comments, this particular WSDL contains multiple valid ports within the service definition. Previous versions of the FuseIT tool accept the first valid port and then ignore the rest.

Out of interest, I did a quick modification to the code so that it would generate all the valid port classes. The code did deploy and compile, but I can't guarantee that it will work as most of the assumptions were made about only having a single port class.

If you don't mind being a guinea pig you can try the multiple port version from wwwId3globalComId3gws201304.

| improve this answer | |
  • Thanks @Daniel, that is perfect, way beyond the call of duty!... I have not tested the calls yet, as I'm awaiting credentials, but this looks good. – dacology Jan 12 '15 at 10:38
  • Hi Daniel, were there more than these 2 classes generated? I have the schemas as above and the dropbox class. The class on dropbox only contains a single binding, the 'basicHttpBinding_GlobalCredentials'. But there are 4 others also: basicHttpBinding_GlobalAuthenticate, basicHttpBinding_GlobalConfig,  basicHttpBinding_GlobalDocImage, basicHttpBinding_GlobalProfile. Thanks for any direction you can give.. – dacology Jan 13 '15 at 12:26
  • @dacology There were two other empty classes for namespaces that didn't get any inner classes - schemasMicrosoftCom200310Serializat and schemasMicrosoftComMessage. I can see in the wsdl:service element the additional ports you are referring to. Currently the tool only generates for the first port encountered. You would need to manually comment out each section and regenerate separate Apex classes. Potentially we could extend our tool to handle this, but this is the first case I've encountered with this structure. – Daniel Ballinger Jan 13 '15 at 19:10
  • Ok, thanks for info. Will try. Is your new version of sfdc explorer available for download yet? – dacology Jan 13 '15 at 19:13
  • @dacology No, not yet. I'll update the answer with something I just tried and then start a new build. – Daniel Ballinger Jan 13 '15 at 19:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.