• JNajera
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

For my case,i have to integrate salesforce with magento which uses a wsdl with format RPC/encoded.

I have the architecture of the wsdl, and i also have the url which end with the extension wsdl.

As salesforce do not understand RPC/encoded , i was skipping the part of wsdl2Apex and i am trying the HTTP callout as suggested but many user, but i do not know where to start.I need to call a method from the wsdl with 3 parameters a username,a pwd and an id ,and expect to get a list of info.

 

 So my questions are:

 

1. which url to use for the endpoint? the same as wsdl soap:address e.g http://192.168.1.31/soap/xx_reservation.php or to the wsdl itself : http://arianetest.smartbox.com/soap/xx_reservation.wsdl??

 

2. How do i call the method from HTTP Callout???

 

3. How do i pass a parameter to the function call??

 

thanks in anticipation for future replies.

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. 

  • November 20, 2009
  • Like
  • 0