Services Warnings

If you enable service warnings on a service, the response payload returns the warning messages generated during operation execution along with the service data object. The data type of the element in the response payload extends the service data object and captures the warning messages.

For example, suppose service warnings are enabled on Location Service. The create operation accepts the Location business object to be defined and returns the newly created object along with the service warnings generated during the operation. The LocationResult data type acts as a wrapper that allows the result to store both location type and warning messages.

<element name="createLocation">
    <complexType>
        <sequence>
            <element name="location" type="ns1:Location"/>
        </sequence>
    </complexType>
</element>

element name="createLocationResponse">
    <complexType>
        <sequence>
            <element name="result" type="ns1:LocationResult"/>
        </sequence>
    </complexType>
</element>

The LocationResult data type extends the MethodResult type. For the definition of the MethodResult type, see Sample BC4JService.xsd. The maxOccurs parameter is set to unbounded instead of to 1 because the same data type is used for the find and process operations, which return multiple objects.

<xsd:complexType name="LocationResult">
    <xsd:complexContent>
        <xsd:extension base="ns0:MethodResult">
            <xsd:sequence>
                <xsd:element name="Value" type="Location" minOccurs="0"
                maxOccurs="unbounded"/>
            </xsd:sequence>
        </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>

If you don't enable service warnings on a service, the response payload returns the business object service itself. For example, the createSalesLead operation defined on the Sales Lead service has a request and response payload that accepts and returns the Sales Lead object, which is of MklLead type.

The following example request payload is for the createLocation operation that is defined on http://xmlns.oracle.com/apps/cdm/foundation/parties/locationService/applicationModule/}LocationService. This XML fragment creates 1 Oracle Parkway, Redwood Shores, CA 94065, US location object by using the AMS module. This module is registered as a lookup code for the HZ_CREATED_BY_MODULES lookup type. See Using Lookups.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns1:createLocation 
        xmlns:ns1="http://xmlns.oracle.com/apps/cdm/foundation/parties/
        locationService/applicationModule/types/">
            <ns1:location
            xmlns:ns2="http://xmlns.oracle.com/apps/cdm/foundation/parties/locationService/">
                <ns2:Address1>1 Oracle Parkway</ns2:Address1>
                <ns2:City>Redwood Shores</ns2:City>
                <ns2:State>CA</ns2:State>
                <ns2:Country>US</ns2:Country>
                <ns2:PostalCode>94065</ns2:PostalCode>
                <ns2:CreatedByModule>AMS</ns2:CreatedByModule>
            </ns1:location>
        </ns1:createLocation>
    </soap:Body>
</soap:Envelope>

The response payload for the createLocation operation contains the complete definition of the newly created location business object.

<ns0:createLocationResponse xmlns=""
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ns0="http://xmlns.oracle.com/apps/cdm/foundation/parties/locationService/
applicationModule/types/" xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-
utility-1.0.xsd">
    <ns2:result xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/" 
xmlns:ns1="http://xmlns.oracle.com/apps/cdm/foundation/parties/locationService/"
xmlns:ns2="http://xmlns.oracle.com/apps/cdm/foundation/parties/locationService/
applicationModule/types/"
xmlns:ns3="http://xmlns.oracle.com/apps/cdm/foundation/parties/partyService/"
xmlns:ns4="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/location/"
xmlns:tns="http://xmlns.oracle.com/adf/svc/errors/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ns1:LocationResult">
    <ns1:Value>
        <ns1:LocationId>300100039119119</ns1:LocationId>
        <ns1:LastUpdateDate>2014-04-22T23:43:17.153-07:00</ns1:LastUpdateDate>
        <ns1:LastUpdatedBy>SALES_ADMIN</ns1:LastUpdatedBy>
        <ns1:CreationDate>2014-04-22T23:43:17.001-07:00</ns1:CreationDate>
        <ns1:CreatedBy>SALES_ADMIN</ns1:CreatedBy>
        <ns1:LastUpdateLogin>F7B103E144504B3CE0433A90F50A0448
        </ns1:LastUpdateLogin>
        <ns1:RequestId xsi:nil="true"/>
        <ns1:OrigSystem xsi:nil="true"/>
        <ns1:OrigSystemReference>300100039119119</ns1:OrigSystemReference>
        <ns1:Country>US</ns1:Country>
        <ns1:Address1>1 Oracle Parkway</ns1:Address1>
        <ns1:Address2 xsi:nil="true"/>
        <ns1:Address3 xsi:nil="true"/>
        <ns1:Address4 xsi:nil="true"/>
        <ns1:City>Redwood Shores</ns1:City>
        <ns1:PostalCode>94065</ns1:PostalCode>
        <ns1:State>CA</ns1:State>
        <ns1:Province xsi:nil="true"/>
        <ns1:County xsi:nil="true"/>
        <ns1:AddressStyle xsi:nil="true"/>
        <ns1:ValidatedFlag>false</ns1:ValidatedFlag>
        <ns1:AddressLinesPhonetic xsi:nil="true"/>
        <ns1:PostalPlus4Code xsi:nil="true"/>
        <ns1:Position xsi:nil="true"/>
        <ns1:LocationDirections xsi:nil="true"/>
        <ns1:AddressEffectiveDate xsi:nil="true"/>
        <ns1:AddressExpirationDate xsi:nil="true"/>
        <ns1:ClliCode xsi:nil="true"/>
        <ns1:Language xsi:nil="true"/>
        <ns1:ShortDescription xsi:nil="true"/>
        <ns1:Description xsi:nil="true"/>
        <ns1:SalesTaxGeocode xsi:nil="true"/>
        <ns1:SalesTaxInsideCityLimits>1</ns1:SalesTaxInsideCityLimits>
        <ns1:FaLocationId xsi:nil="true"/>
        <ns1:ObjectVersionNumber>1</ns1:ObjectVersionNumber>
        <ns1:CreatedByModule>AMS</ns1:CreatedByModule>
        <ns1:GeometryStatusCode>DIRTY</ns1:GeometryStatusCode>
        <ns1:ValidationStatusCode xsi:nil="true"/>
        <ns1:DateValidated xsi:nil="true"/>
        <ns1:DoNotValidateFlag xsi:nil="true"/>
        <ns1:Comments xsi:nil="true"/>
        <ns1:HouseType xsi:nil="true"/>
        <ns1:EffectiveDate>2014-04-22</ns1:EffectiveDate>
        <nsl:AddrElementAttribute1 xsi:nil="true"/>
        <ns1:AddrElementAttribute2 xsi:nil="true"/>
        <ns1:AddrElementAttribute3 xsi:nil="true"/>
        <ns1:AddrElementAttribute4 xsi:nil="true"/>
        <ns1:AddrElementAttribute5 xsi:nil="true"/>
        <ns1:Building xsi:nil="true"/>
        <ns1:FloorNumber xsi:nil="true"/>
        <ns1:StatusFlag>true</ns1:StatusFlag>
        <ns1:InternalFlag>false</ns1:InternalFlag>
        <ns1:TimezoneCode xsi:nil="true"/>
        <ns1:Latitude xsi:nil="true"/>
        <ns1:Longitude xsi:nil="true"/>
        <ns1:Distance xsi:nil="true"/>
        </ns1:Value>
    </ns2:result>
</ns0:createLocationResponse>
Related Topics
  • create Operation
  • Request Payload Element Behavior
  • find Operation Examples
  • Using Lookups