Summary

Objective

Provide a simple mechanism for echoing a string passed to the service. Used for developer testing of basic interaction with a very simple BeVocal Platform service.

WSDL URL https://cafe.services.bevocal.com/EchoService_v1/services/EchoService_v1?WSDL
Endpoint URL https://cafe.services.bevocal.com/EchoService_v1/services/EchoService_v1
Namespace URI http://www.bevocal.com/soap/services
Service Name EchoService
Port EchoService_v1

Methods

Note: For simplicity, this document describes methods as though you used a language such as Java or JavaScript to access the service. In particular, the parameter types are described as Java equivalents. See Using BeVocal Platform Services for the correspondence between Java types and XML Schema built-ins.

String
echo (
   String toEcho
)
Attachment
echoAttachment (
   Attachment input
)
Attachment[]
echoAttachmentArray (
   Attachment[] inputArray
)

Data Types

Attachment

An attachment is a MIME type, such as a graphic file, binary data, or audio. The specific mechanics of sending and receiving attachments (MIME data) are up to the Web Services software you use to develop your application. For information on using attachments with BeVocal Platform services, see Using BeVocal Platform Services.

How to Use this Service

The Echo Service provides a simple mechanism to return strings or attachments passed to it. This service helps developers ensure that their software is interacting correctly with the BeVocal Platform services infrastructure.

echo

Returns the string that was passed to it.

Syntax

 String echo (
   String toEcho
 )

Parameters

Parameter Description
toEcho

The string to be returned.

Returns

String, an exact copy of the toEcho parameter.

Description

If the toEcho parameter contains the word fault, a sample SOAP fault is returned. This mechanism is provided for testing the handling of SOAP faults.

Faults

Fault Number Description
1001

Invalid parameter

Examples

VoiceXML

 ...
 var service = bevocal.soap.serviceFromWSDL(
   "https://cafe.services.bevocal.com/EchoService_v1/services/EchoService_v1?WSDL",
   "EchoService", // WSDL Port Name
   "EchoService", // Service Namespace
   "EchoService", // Service Name
   "https://cafe.services.bevocal.com/EchoService_v1/services/EchoService_v1" // Endpoint
 );
 var result = service.echo("Please return this string.");
 ...

SOAP Request

 POST /echoService/services/echoService_v1 HTTP/1.0
 Host: https://cafe.services.bevocal.com
 Content-Type: text/xml; charset=utf-8
 SOAPAction: ""
 Content-Length: 691
 
 <?xml version="1.0" encoding="UTF-8"?>
 <soapenv:Envelope 
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
   <soapenv:Header>
     <ns1:platformServicesSessionID xsi:type="xsd:string"
 xmlns:ns1="http://www.bevocal.com/soap/headers/">some_dummy_session</ns1:platf
ormServicesSessionID>
   </soapenv:Header>
   <soapenv:Body>
     <ns2:echo xmlns:ns2="EchoService">
       <arg0 xsi:type="xsd:string">Please echo this.</arg0>
     </ns2:echo>
   </soapenv:Body>
 </soapenv:Envelope>

SOAP Response

 HTTP/1.0 200 OK
 Server: Resin/2.1.4
 Content-Type: text/xml; charset=utf-8
 Date: Tue, 10 Sep 2002 19:34:44 GMT
 
 <?xml version="1.0" encoding="UTF-8"?>
 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
     <ns1:echoResponse 
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:ns1="EchoService">
       <echoReturn xsi:type="xsd:string">Please echo this.</echoReturn>
     </ns1:echoResponse>
   </soapenv:Body>
 </soapenv:Envelope>

echoAttachment

Returns an attachment sent to the method. Useful for testing sending and receiving attachments.

Syntax

 Attachment echoAttachment (
   Attachment input
 )

Parameters

Parameter Description
input

An attachment is a MIME type, such as a graphic file, binary data, or audio. For information on using attachments with BeVocal Platform services, see Using BeVocal Platform Services.

Returns

Attachment, an exact copy of the input parameter.

Faults

Fault Number Description
1001

Invalid parameter

echoAttachmentArray

Returns an array of the attachments sent to the method. Useful for testing sending and receiving arrays of attachments.

Syntax

 Attachment[] echoAttachmentArray (
   Attachment[] inputArray
 )

Parameters

Parameter Description
inputArray

An array of attachments, each of which is a MIME type, such as a graphic file, binary data, or audio. For information on using attachments with BeVocal Platform services, see Using BeVocal Platform Services.

Returns

Attachment, an exact copy of the inputArray parameter.

Faults

Fault Number Description
1001

Invalid parameter



Part No. 520-0019-01 | ©1999-2007 BeVocal, Inc. All Rights Reserved