Skip to content

Instantly share code, notes, and snippets.

@dhonig
Created June 5, 2012 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhonig/2876186 to your computer and use it in GitHub Desktop.
Save dhonig/2876186 to your computer and use it in GitHub Desktop.
Working soap post from VB.net
POST /sugarcrm/soap.php
HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.5456)
VsDebuggerCausalityData: uIDPo2z1cKrlF5pJgK/hqZ7Gtv8AAAAAVPDNsbnt0Umeut+DYp/UoFUOSsvuQ/hKsPvZ9JOBHKsACQAA
Content-Type: text/xml; charset=utf-8 SOAPAction: "http://209.61.142.162/sugarcrm/soap.php/set_entry"
Host: tfmmanit01:2020 Content-Length: 3990 Expect: 100-continue
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.sugarcrm.com/sugarcrm"
xmlns:types="http://www.sugarcrm.com/sugarcrm/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:set_entry>
<session xsi:type="xsd:string">qb7tf8dg53afo12rg3m0eod010</session>
<module_name xsi:type="xsd:string">Contacts</module_name>
<name_value_list href="#id1"/>
</tns:set_entry>
<soapenc:Array id="id1" soapenc:arrayType="tns:name_value[18]">
<Item href="#id2"/>
<Item href="#id3"/>
<Item href="#id4"/>
<Item href="#id5"/>
<Item href="#id6"/>
<Item href="#id7"/>
<Item href="#id8"/>
<Item href="#id9"/>
<Item href="#id10"/>
<Item href="#id11"/>
<Item href="#id12"/>
<Item href="#id13"/>
<Item href="#id14"/>
<Item href="#id15"/>
<Item href="#id16"/>
<Item href="#id17"/>
<Item href="#id18"/>
<Item href="#id19"/>
</soapenc:Array>
<tns:name_value id="id2" xsi:type="tns:name_value">
<name xsi:type="xsd:string">description</name>
<value xsi:type="xsd:string">sample contact</value>
</tns:name_value>
<tns:name_value id="id3" xsi:type="tns:name_value">
<name xsi:type="xsd:string">first_name</name>
<value xsi:type="xsd:string">John</value>
</tns:name_value>
<tns:name_value id="id4" xsi:type="tns:name_value">
<name xsi:type="xsd:string">last_name</name>
<value xsi:type="xsd:string">Doe</value>
</tns:name_value>
<tns:name_value id="id5" xsi:type="tns:name_value">
<name xsi:type="xsd:string">title</name>
<value xsi:type="xsd:string">clerk</value>
</tns:name_value>
<tns:name_value id="id6" xsi:type="tns:name_value">
<name xsi:type="xsd:string">department</name>
<value xsi:type="xsd:string">Ramsey</value>
</tns:name_value>
<tns:name_value id="id7" xsi:type="tns:name_value">
<name xsi:type="xsd:string">salutation</name>
<value xsi:type="xsd:string">Ramsey</value>
</tns:name_value>
<tns:name_value id="id8" xsi:type="tns:name_value">
<name xsi:type="xsd:string">phone_home</name>
<value xsi:type="xsd:string">1234567890</value>
</tns:name_value>
<tns:name_value id="id9" xsi:type="tns:name_value">
<name xsi:type="xsd:string">phone_mobile</name>
<value xsi:type="xsd:string"/>
</tns:name_value>
<tns:name_value id="id10" xsi:type="tns:name_value">
<name xsi:type="xsd:string">phone_work</name>
<value xsi:type="xsd:string"/>
</tns:name_value>
<tns:name_value id="id11" xsi:type="tns:name_value">
<name xsi:type="xsd:string">phone_other</name>
<value xsi:type="xsd:string"/>
</tns:name_value>
<tns:name_value id="id12" xsi:type="tns:name_value">
<name xsi:type="xsd:string">phone_fax</name>
<value xsi:type="xsd:string"/>
</tns:name_value>
<tns:name_value id="id13" xsi:type="tns:name_value">
<name xsi:type="xsd:string">primary_address_street</name>
<value xsi:type="xsd:string">primary_address_street</value>
</tns:name_value>
<tns:name_value id="id14" xsi:type="tns:name_value">
<name xsi:type="xsd:string">primary_address_city</name>
<value xsi:type="xsd:string">city</value>
</tns:name_value>
<tns:name_value id="id15" xsi:type="tns:name_value">
<name xsi:type="xsd:string">primary_address_state</name>
<value xsi:type="xsd:string">state</value>
</tns:name_value>
<tns:name_value id="id16" xsi:type="tns:name_value">
<name xsi:type="xsd:string">primary_address_postalcode</name>
<value xsi:type="xsd:string">zip</value>
</tns:name_value>
<tns:name_value id="id17" xsi:type="tns:name_value">
<name xsi:type="xsd:string">primary_address_country</name>
<value xsi:type="xsd:string">country</value>
</tns:name_value>
<tns:name_value id="id18" xsi:type="tns:name_value">
<name xsi:type="xsd:string">birthdate</name>
<value xsi:type="xsd:string">1/1/2000</value>
</tns:name_value>
<tns:name_value id="id19" xsi:type="tns:name_value">
<name xsi:type="xsd:string">assigned_user_id</name>
<value xsi:type="xsd:string">27ef5819-f3ac-bcfd-2f2e-4fb383782b97</value>
</tns:name_value>
</soap:Body>
</soap:Envelope>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment