PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Posting form data to third party (NGP/VAN)

  1. I've read through the documentation regarding posting to a third party, as well as the relavent posts, and I'm still having trouble with this.

    I need to post the data collected in a volunteer signup form to NGP, our campaign database. This is from their documentation:

    2.2 VolunteerSignUp
    For signing people up as volunteers, NGP provides an XML Web service. The service WSDL is
    http://services.myngp.com/ngpservices/VolunteerSignUpService.asmx?wsdl and takes credential and data parameters.
    The credential parameter is an encrypted string (provided by us) used to authenticate and authorize the request data.
    The data parameter has the following schema:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="NGP:VolunteerSignUp-schema"
    elementFormDefault="qualified" targetNamespace="NGP:VolunteerSignUp-schema">
    <xsd:element name="VolunteerSignUp" type="VolunteerSignUpType" />
    <xsd:complexType name="VolunteerSignUpType">
    <xsd:sequence>
    <xsd:element name="ContactInfo" type="ContactInfoType" minOccurs="1" />
    <xsd:element name="VolunteerInfo" type="VolunteerInfoType" minOccurs="1" />
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="ContactInfoType">
    <xsd:sequence>
    <xsd:element name="LastName" type="xsd:string" />
    <xsd:element name="FirstName" type="xsd:string" />
    <xsd:element name="MiddleName" type="xsd:string" />
    <xsd:element name="Prefix" type="xsd:string" />
    <xsd:element name="Suffix" type="xsd:string" />
    <xsd:element name="Address1" type="xsd:string" />
    <xsd:element name="Address2" type="xsd:string" />
    <xsd:element name="Address3" type="xsd:string" />
    <xsd:element name="City" type="xsd:string" />
    <xsd:element name="State" type="xsd:string" />
    <xsd:element name="Zip" type="xsd:string" />
    <xsd:element name="Salutation" type="xsd:string" />
    <xsd:element name="Email" type="xsd:string" />
    <xsd:element name="HomePhone" type="xsd:string" />
    <xsd:element name="WorkPhone" type="xsd:string" />
    <xsd:element name="WorkExtension" type="xsd:string" />
    <xsd:element name="FaxPhone" type="xsd:string" />
    <xsd:element name="Employer" type="xsd:string" />
    <xsd:element name="Occupation" type="xsd:string" />
    <xsd:element name="OptIn" type="xsd:boolean" default="true" minOccurs="0" maxOccurs="1" />
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="VolunteerInfoType">
    <xsd:sequence>
    <xsd:element name="Code" type="xsd:string" minOccurs="1" maxOccurs="1" />
    <xsd:element name="Note" type="xsd:string" minOccurs="1" maxOccurs="1" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    An example of the data element in the SOAP body that conforms to the above schema is:
    <VolunteerSignUp>
    <ContactInfo>
    <LastName>Smith</LastName>
    <FirstName>Joe</FirstName>
    <MiddleName>A</MiddleName>
    <Prefix>Mr.</Prefix>
    <Suffix></Suffix>
    <Address1>997 West River Road</Address1>
    <Address2></Address2>
    <Address3></Address3>
    <City>Gansevoort</City>
    <State>NY</State>
    <Zip>12831</Zip>
    <Salutation></Salutation>
    <Email>joe@smith.com</Email>
    <HomePhone>202-555-1212</HomePhone>
    <WorkPhone></WorkPhone>
    <WorkExtension></WorkExtension>
    <FaxPhone></FaxPhone>
    <Employer>NGP</Employer>
    <Occupation>programmer</Occupation>
    </ContactInfo>
    <VolunteerInfo>AA<Note>Needs help with this</Note></VolunteerInfo>
    <VolunteerInfo>BB<Note>Might not come</Note></VolunteerInfo>
    </VolunteerSignUp>
    The XML returned from the volunteer sign-up services will conform to the following schema:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="NGP:VolunteerSignUpResponse-schema"
    elementFormDefault="qualified" targetNamespace="NGP:VolunteerSignUpResponse-schema">
    <xsd:element name="VolunteerSignUpResponse" type="VolunteerSignUpResponse" />
    <xsd:complexType name="VolunteerSignupResponse">
    <xsd:sequence>
    <xsd:element name="errorMsg" type="xsd:string" minOccurs="0" maxOccurs="1" />
    <xsd:element name="successMsg" type="xsd:integer" minOccurs="0" maxOccurs="1" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    Either the errorMsg or successMsg will be returned. The errorMsg element will explain why the server processing did not proceed, while the successMsg will be the contact ID of the volunteer that has been entered into NGP's database. For a volunteer who matches the record in the myngp.com database, that record will be match merged and registered as a volunteer and the record's contact ID will be returned.

    Any pointers here would be greatly appreciated...I know when I'm out of my depth.

    Posted 12 years ago on Tuesday March 6, 2012 | Permalink
  2. More info here on a PHP implementation if that helps....I'm still lost.

    http://www.pastie.org/private/kta0artk8f5grds6dr5na

    Posted 12 years ago on Wednesday March 7, 2012 | Permalink