UpdateFacadeObject

Initial Build

2006.02

xWEB

Web Method

Response Type

XmlNode

The UpdateFacadeObject web method updates a NetForum Facade object and returns the modified NetForum Facade object record.

Parameters

  • szObjectName (string). The textual display name of the object (Individual, Address, etc.) See XWeb:GetFacadeObjectList#Object_Name for more direction on this parameter.
  • szObjectKey (string). The GUID representing an object's unique identity (primary key)
  • oNode (XmlNode). An XmlNode containing elements that correspond to the Facade object's fields used to update the netFORUM data store. The XML passed to this parameter requires the following pattern: an outer node that encloses an inner node which contains one or more elements for the properties you want to update:
<oNode>
<!-- begin OUTER node -->
<CourseParticipants>
<!-- begin INNER node -->
<CourseParticipant>
<!-- within inner node, one element for each property to update -->
<cup_score>90</cup_score>
<cup_grade>A</cup_grade>
<cup_success_flag>1</cup_success_flag>
</CourseParticipant>
<!-- end INNER node -->
</CourseParticipants>
<!-- end OUTER node -->
</oNode>

See InsertFacadeObject for a more detailed example of how to construct this XmlNode.

Response

XmlNode.

Sample Request

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Header>
<m:AuthorizationToken xmlns:m="http://www.avectra.com/2005/">
<m:Token>28574f4d-20fb-48c9-8cb2-64d1a49e03a4</m:Token>
</m:AuthorizationToken>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:UpdateFacadeObject xmlns:m="http://www.avectra.com/2005/">
<m:szObjectName>CourseParticipant</m:szObjectName>
<m:szObjectKey>c2e78f52-ff3b-4412-813e-c8f8d8e25e1c</m:szObjectKey>
<m:oNode>
<m:CourseParticipants>
<m:CourseParticipant>
<m:cup_score>90</m:cup_score>
<m:cup_grade>A</m:cup_grade>
<m:cup_success_flag>1</m:cup_success_flag>
</m:CourseParticipant>
</m:CourseParticipants>
</m:oNode>
</m:UpdateFacadeObject>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Sample Response

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soap:Header>
<AuthorizationToken xmlns="http://www.avectra.com/2005/">
<Token>ae637447-5b42-4979-9608-a1fe437c1a2e</Token>
</AuthorizationToken>
<wsa:Action>http://www.avectra.com/2005/UpdateFacadeObjectResponse</wsa:Action>
<wsa:MessageID>uuid:7daf893f-7846-4a08-9e3d-f323ab888889</wsa:MessageID>
<wsa:RelatesTo>uuid:6ff39452-c80e-4475-9033-e9b39744fffc</wsa:RelatesTo>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</wsa:To>
<wsse:Security>
<wsu:Timestamp wsu:Id="Timestamp-b66b1a20-e71f-43c7-ac23-3c3cf0be29b9">
<wsu:Created>2006-09-26T13:30:05Z</wsu:Created>
<wsu:Expires>2006-09-26T13:35:05Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soap:Header>
<soap:Body>
<UpdateFacadeObjectResponse xmlns="http://www.avectra.com/2005/">
<UpdateFacadeObjectResult>
<CourseParticipantObjects xsi:schemaLocation="http://www.avectra.com/2005/ CourseParticipant.xsd" recordReturn="1">
<CourseParticipantObject>
<cup_key>c2e78f52-ff3b-4412-813e-c8f8d8e25e1c</cup_key>
</CourseParticipantObject>
</CourseParticipantObjects>
</UpdateFacadeObjectResult>
</UpdateFacadeObjectResponse>
</soap:Body>
</soap:Envelope>
   

JSON Method

POST /xWeb/JSON/UpdateFacadeObject

Copy
DATA: JSON
{
    "UpdateFacadeObject" : {
        "szObjectName": "Individual",
        "szObjectKey": "{{indCstKeySample}}",
        "oNode": {
            "IndividualObjects": {
                "IndividualObject": {
                    "ind_mid_name": "{{indMidNameTempValue}}"
                }
            }
        }
    }
}

 

Copy
SAMPLE RESULT
HTTP STATUS: 200
DATA: JSON
{
    "IndividualObjects": {
        "@schemaLocation": "http://www.avectra.com/2005/ Individual.xsd",
        "@recordReturn": "1",
        "IndividualObject": [
            {
                "ind_cst_key": "ab692079-0472-45ae-ab5d-e3b967d9952f"
            }
        ]
    }
}

 

 

FAQ

Change in 2010.01

Q. My InsertFacadeObject and UpdateFacadeObject method calls suddenly stopped working after upgrading to 2010.01. Why?

A. See InsertFacadeObject for one possible explanation.

Using InsertFacadeObject/UpdateFacadeObject versus specific Methods

Q. When should I use a method like WEBPhoneUpdate versus UpdateFacadeObject? How do I know when to use a method other than InsertFacadeObject or UpdateFacadeObject to insert or update information?”

A. InsertFacadeObject/UpdateFacadeObject will work for virtually any NetForum object, depending on exactly what you're attempting to insert or update. Abila developed many specialized web methods for specific functionality, such as methods for inserting or updating individuals, phones, faxes, emails, communication preferences, eCommerce, etc. These methods are less abstract and typically have a defined schema so integrators will be able to get and set specific properties rather than working with XML. To see a list of these methods, see xWeb Method Documentation.

Abila generally recommends using the defined web methods rather than InsertFacadeObject/UpdateFacadeObject, if a specific web method for the function exists.

Updating HTML fields

Q. Can I update a Web Page Detail with this method?

A. Yes. Be sure that if you're trying to update wbd_html that you HTML encode the content. If you try to pass straight HTML, it will not update properly. For example, this request will successfully update the Page Detail:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.avectra.com/2005/">
<soapenv:Header>
<ns:AuthorizationToken>
<ns:Token>***************************</ns:Token>
</ns:AuthorizationToken>
</soapenv:Header>
<soapenv:Body>
<ns:UpdateFacadeObject>
<ns:szObjectName>WebPageDetail</ns:szObjectName>
<ns:szObjectKey>e11a983a-efdc-4a38-a0d4-f37037d7e8fe</ns:szObjectKey>
<ns:oNode>
<ns:WebPageDetails>
<ns:WebPageDetail>
<ns:wbd_html>&lt;div class=&quot;right height40 margt10&quot;&gt;
&lt;a class=&quot;edit size14&quot; title=&quot;&quot; href=&quot;dynamicpage.aspx?webcode=AddRevWiz&amp;amp;rxs_abs_key={abs_key}&amp;amp;abr_ind_cst_key={CustomerKey}&amp;amp;action=add&quot;&gt;&lt;strong&gt;Assign a reviewer&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;</ns:wbd_html>
</ns:WebPageDetail>
</ns:WebPageDetails>
</ns:oNode>
</ns:UpdateFacadeObject>
</soapenv:Body>
</soapenv:Envelope>