Re: [OpenSPP-project] First pass at gSOAP client for OpenSPP server
Status: Planning
Brought to you by:
deanwillis
From: Dean W. <dea...@so...> - 2011-08-23 23:41:07
|
On 8/23/11 10:34 AM, Cartwright, Ken wrote: > Hi Dean, > > Thanks for the examples. I have used the Add Dest Group and the Get > Dest Group request examples you've provided within the examples > section of the SPPP SOAP "Transport" document. Can the team also > provide the corresponding _response_ SOAP messages for the Add Dest > Group and the Get Dest Group examples? I'd like to include the > example requests and the corresponding example responses in the > document. Sure. Or you can use the free SoapUI tool to send your example requests to our test/dev server at: http://openspp.softarmor.com:8080/OpenSPPService/services/spppPort SoapUI will let you copy-and-paste the response string directly into something else. I'll paste some samples, which will probably get linewrapped oddly. AddDestGrpRqst Request <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ietf:params:xml:ns:sppp:base:1"> <soapenv:Header/> <soapenv:Body> <urn:spppUpdateRequest xsi:schemaLocation="urn:ietf:params:xml:ns:sppp:base:1 sppp.xsd" xmlns="urn:ietf:params:xml:ns:sppp:base:1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <!--Optional:--> <urn:clientTransId>888</urn:clientTransId> <!--Optional:--> <urn:minorVer>4</urn:minorVer> <!--1 or more repetitions:--> <urn:rqst xsi:type="ns1:AddDestGrpRqstType" xmlns:ns1="urn:ietf:params:xml:ns:sppp:base:1"> <destGrp> <ns1:rant>rant2</ns1:rant> <dgName>DEST_GRP_SPPP_5</dgName> </destGrp> </urn:rqst> </urn:spppUpdateRequest> </soapenv:Body> </soapenv:Envelope> AddDestGrpRqst Response <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <spppUpdateResponse xmlns="urn:ietf:params:xml:ns:sppp:base:1"> <clientTransId>888</clientTransId> <serverTransId>84d1bbb6-ec8e-4381-b936-1ba2d235aee3</serverTransId> <overallResult> <code>1000</code> <msg>Overall Success</msg> </overallResult> <rqstObjResult> <code>1000</code> <msg>Succeeded</msg> <rqstObj xsi:type="AddDestGrpRqstType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <destGrp> <rant>rant2</rant> <dgName>DEST_GRP_SPPP_5</dgName> </destGrp> </rqstObj> </rqstObjResult> </spppUpdateResponse> </soap:Body> </soap:Envelope> GetDestGrpsRqst Request (for non-existent group) <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ietf:params:xml:ns:sppp:base:1"> <soapenv:Header/> <soapenv:Body> <urn:spppQueryRequest xsi:schemaLocation="urn:ietf:params:xml:ns:sppp:base:1 sppp.xsd" xmlns="urn:ietf:params:xml:ns:sppp:base:1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <urn:rqst xsi:type="ns1:GetDestGrpsRqstType" xmlns:ns1="urn:ietf:params:xml:ns:sppp:base:1"> <urn:objKey> <urn:rant>rant2</urn:rant> <urn:name>DEST_GRP_SSP3_2</urn:name> </urn:objKey> </urn:rqst> </urn:spppQueryRequest> </soapenv:Body> </soapenv:Envelope> GetDestGrpsRqst Response (for non-existent group) <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <spppQueryResponse xmlns="urn:ietf:params:xml:ns:sppp:base:1"> <overallResult> <code>2105</code> <msg>Object Does Not Exist</msg> </overallResult> </spppQueryResponse> </soap:Body> </soap:Envelope> GetDestGrps Request (for existing group, created by above Add request) <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ietf:params:xml:ns:sppp:base:1"> <soapenv:Header/> <soapenv:Body> <urn:spppQueryRequest xsi:schemaLocation="urn:ietf:params:xml:ns:sppp:base:1 sppp.xsd" xmlns="urn:ietf:params:xml:ns:sppp:base:1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <urn:rqst xsi:type="ns1:GetDestGrpsRqstType" xmlns:ns1="urn:ietf:params:xml:ns:sppp:base:1"> <urn:objKey> <urn:rant>rant2</urn:rant> <urn:name>DEST_GRP_SPPP_5</urn:name> </urn:objKey> </urn:rqst> </urn:spppQueryRequest> </soapenv:Body> </soapenv:Envelope> GetDestGrpsRqst Response (for existing group) <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <spppQueryResponse xmlns="urn:ietf:params:xml:ns:sppp:base:1"> <overallResult> <code>1000</code> <msg>Succeeded</msg> </overallResult> <resultSet xsi:type="DestGrpType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <cDate>2011-08-23T00:00:00.000Z</cDate> <mDate>2011-08-23T00:00:00.000Z</mDate> <dgName>DEST_GRP_SPPP_5</dgName> </resultSet> </spppQueryResponse> </soap:Body> </soap:Envelope> DelDestGrpRqst Request (for existing group_ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ietf:params:xml:ns:sppp:base:1"> <soapenv:Header/> <soapenv:Body> <urn:spppUpdateRequest xsi:schemaLocation="urn:ietf:params:xml:ns:sppp:base:1 sppp.xsd" xmlns="urn:ietf:params:xml:ns:sppp:base:1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <!--Optional:--> <urn:clientTransId>777</urn:clientTransId> <!--Optional:--> <urn:minorVer>4</urn:minorVer> <!--1 or more repetitions:--> <urn:rqst xsi:type="ns1:DelDestGrpRqstType" xmlns:ns1="urn:ietf:params:xml:ns:sppp:base:1"> <urn:objKey> <urn:rant>rant2</urn:rant> <urn:name>DEST_GRP_SPPP_5</urn:name> </urn:objKey> </urn:rqst> </urn:spppUpdateRequest> </soapenv:Body> </soapenv:Envelope> DelDestGrpRqst response (for existing group): <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <spppUpdateResponse xmlns="urn:ietf:params:xml:ns:sppp:base:1"> <clientTransId>777</clientTransId> <serverTransId>40234fa0-7e4f-43a4-9884-35e0e3fb0da1</serverTransId> <overallResult> <code>1000</code> <msg>Overall Success</msg> </overallResult> <rqstObjResult> <code>1000</code> <msg>Succeeded</msg> <rqstObj xsi:type="DelDestGrpRqstType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <objKey> <rant>rant2</rant> <name>DEST_GRP_SPPP_5</name> </objKey> </rqstObj> </rqstObjResult> </spppUpdateResponse> </soap:Body> </soap:Envelope> Oddly enough, DelDestGrpRqst keeps returning happy response for deletion of groups that don't exist. Not sure that's right. |