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
burdenburden 

WSDL import questions

I'm mangling this WSDL trying to import it into my project and would really like the community's input since i know that's a bad idea, but my only option.  

 

1. When i import my WSDL into the WSDL2APEX dealy, it complains:

 

Error: Failed to parse wsdl: attribute name can not be null at: 27:79


I don't need help deciphering the error message, but i do need help understanding why it's complaining. i'm pretty sure this is SUPPOSED to be null.

  <complexType name="ArrayOfSessionField">
    <complexContent>
      <restriction base="soapenc:Array">
        <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SessionField[]"/>
      </restriction>
    </complexContent>
  </complexType>

 

2. It is my understanding that Salesforce doesn't allow me to use encoding, so is it going to be safe to just omit that? Why was that a good idea, anyways? is it the threat of obfuscation? 

 

<wsdl:operation name="logon">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="logonRequest">
        <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="Sessions"/>
      </wsdl:input>
      <wsdl:output name="logonResponse">
        <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="Sessions"/>
      </wsdl:output>
    </wsdl:operation>

 

3. It is my understanding that imports are not supported. Does that mean i'm supposed to just paste that schema in it's place? 

 

  <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="Sessions">

        <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
 

4. I've been searching for a guide but have yet to find much more than the following page

 http://wiki.developerforce.com/index.php/Apex_Web_Services_and_Callouts

 

any other documentation anyone's willing to share will be very much appreciated. 

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell
You won't get this to work, you have a soap section-5 rpc/encoded WSDL/Service, and they have significant differences to doc/lit based WSDL/Services. Your only real hope is to manually build / parse the soap messages yourself.

All Answers

SuperfellSuperfell
You won't get this to work, you have a soap section-5 rpc/encoded WSDL/Service, and they have significant differences to doc/lit based WSDL/Services. Your only real hope is to manually build / parse the soap messages yourself.
This was selected as the best answer
JNajeraJNajera

Smion,

 

Could you please let me know where can I found documentation for how to build manualy and parse the soap msg in SF, because Im a starter developer so I dont really know how to do it. Any help will be appreciated.

 

Regards,

Jorge