Consuming Webservice with 3CX and VAD

503 views Asked by At

I am using 3CX (http://www.3cx.com/) and the VAD(Voice Application Designer http://www.3cx.com/voice-application-designer/) to consume a Webservice.

I am using the Web Interaction to make a POST, I supose to get a XML as the result, just like that:

<PID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://example.com.br/">
<CodigoRetorno>0</CodigoRetorno>
<DescricaoRetorno>PID OK</DescricaoRetorno>
<Id_Conta>99</Id_Conta>
</PID>

BUT, instead, I am getting:

'<' replaced by '&lt ;' and '>' replaced by '&gt ;'

QUESTIONS:

1 - How can I get the result XML properly formatted?

2 - Does the 3CX has some internal library to read xml or I will have to use the 'External Code Execution'?

2

There are 2 answers

0
Shahzad Qureshi On
  1. Use a web service component instead of a web interaction.
  2. But I recommend using an external code component to call and process web service results for SOAP or XML web services.
0
Jaco Botha On

Also make sure you are using an .asmx web-service and not WCF. VAD cannot handle the headers sent by WCF.

I had the exact same error message and my solution was to change from WCF to asmx. Once I did that, VAD worked beautifully.