Documentation and example requests of the shop WPS

The shop WPS interface exposes 2 methods:

  • getOrders: Retrieve pending orders for a supplied furnisher.
  • setOrder: Fill in the order to make it available for the customer.

getOrders

Method signature:

  • status: [String] Order having this status will be returned. Matches the "code" column in jos_sdi_list_orderstatus table.

Example:



<?xml version="1.0" encoding="UTF-8"?>

<wps:Execute service="WPS" version="1.0.0" 
    xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" 
    xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.opengis.net/wps/1.0.0../wpsExecute_request.xsd">
    <ows:Identifier>getOrders</ows:Identifier>
    <wps:DataInputs>
                <!-- Obsolete param userName, taking user from Spring authentication.
                 Will be removed when all clients will support this. -->
        <wps:Input>
            <ows:Identifier>userName</ows:Identifier>
            <wps:Data>
                <wps:LiteralData>joomlaUser1</wps:LiteralData>
            </wps:Data>
        </wps:Input>
        <wps:Input>
            <ows:Identifier>status</ows:Identifier>
            <wps:Data>
                <wps:LiteralData>SENT</wps:LiteralData>
            </wps:Data>
        </wps:Input>
    </wps:DataInputs>
</wps:Execute>

setOrder

Method signature:

  • VERSION: [Numeric] Deprecated.
  • REQUEST_ID: [Numeric] The Joomla ID of the order to respond to.
  • CLIENT_ID: [Numeric] Deprecated.
  • BILL: [Numeric] The price of this order.
  • REMARK: [String] Any description associated to this order.
  • DATE: [TIMESTAMP] The response timestamp
  • PRODUCT_ID: [Numeric] The product ID of the order to respond to.
  • FILENAME: [String] The file name if there is a supplied file.
  • DATA : [String] The file content if there is a supplied file. The String is Base64 encoded (see Apache commons tools).

Example:


<?xml version="1.0" encoding="UTF-8"?>
<wps:Execute service="WPS" version="1.0.0" 
    xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" 
    xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.opengis.net/wps/1.0.0../wpsExecute_request.xsd">
    <ows:Identifier>setOrder</ows:Identifier>
    <wps:DataInputs>
        <wps:Input>
            <ows:Identifier>VERSION</ows:Identifier>
            <wps:Data>
                <wps:LiteralData></wps:LiteralData>
            </wps:Data>
        </wps:Input>
        <wps:Input>
            <ows:Identifier>REQUEST_ID</ows:Identifier>
            <wps:Data>
                <wps:LiteralData>125163</wps:LiteralData>
            </wps:Data>
        </wps:Input>
        <wps:Input>
            <ows:Identifier>CLIENT_ID</ows:Identifier>
            <wps:Data>
                <wps:LiteralData>1</wps:LiteralData>
            </wps:Data>
        </wps:Input>
        <wps:Input>
            <ows:Identifier>BILL</ows:Identifier>
            <wps:Data>
                <wps:LiteralData>212.50</wps:LiteralData>
            </wps:Data>
        </wps:Input>
        <wps:Input>
            <ows:Identifier>REMARK</ows:Identifier>
            <wps:Data>
                <wps:LiteralData>My remark</wps:LiteralData>
            </wps:Data>
        </wps:Input>
        <wps:Input>
            <ows:Identifier>DATE</ows:Identifier>
            <wps:Data>
                <wps:LiteralData>16.12.2008 16:23:22</wps:LiteralData>
            </wps:Data>
        </wps:Input>
        <wps:Input>
            <ows:Identifier>PRODUCT_ID</ows:Identifier>
            <wps:Data>
                <wps:LiteralData>9720</wps:LiteralData>
            </wps:Data>
        </wps:Input>
        <wps:Input>
            <ows:Identifier>FILENAME</ows:Identifier>
            <wps:Data>
                <wps:LiteralData>fichier.txt</wps:LiteralData>
            </wps:Data>
        </wps:Input>
        <wps:Input>
            <ows:Identifier>DATA</ows:Identifier>
            <wps:Data>
                <wps:ComplexData>OM8R4....</wps:ComplexData>
            </wps:Data>
        </wps:Input>
    </wps:DataInputs>
</wps:Execute>

For futher examples, please take a look at the package ch.depth.services.wps