" /> Composer and WS - Genesys CTI User Forum

Author Topic: Composer and WS  (Read 9251 times)

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Composer and WS
« on: December 16, 2012, 07:34:43 PM »
Advertisement
Hi guys,
Having an issue with composer...
The customer web service expects the data to be requested like this:

<arg0>
<input1></input1>
<input2></input2>
</arg0>

but composer is requesting the WS like this:

<arg0.input1></arg0.input1>
<arg0.input2></arg0.input2>

So far not been able to modify the way it is build...I see some JSon functions but don't have time to investigate them and modify...also I think Composer should be able to do it so...I remember a similar issue on IRD and was able to manage it...

Some idea?

Thanks!
« Last Edit: December 16, 2012, 07:53:43 PM by cavagnaro »

Offline Timur Karimov

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: 2
Re: Composer and WS
« Reply #1 on: December 17, 2012, 10:09:51 AM »
Hi Cav
In composer you can operate two web request blocks. One is standart HTTP web request to any supported web-service with out any data conversion. Second one used to invoke web-services and convert input/output data to JSON format.

I don't try it before, but i belive that first one use native SOAP 1.x compatable request as WEB-service block in IRD. And it's must be compatable with you customer web service. did you try it ?

WBR Timur

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Composer and WS
« Reply #2 on: December 17, 2012, 11:41:19 AM »
Ah! Will try it! I thought it was only for HTTP requests but worth to try :D

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Composer and WS
« Reply #3 on: December 18, 2012, 07:31:34 PM »
Nop, didn't work neither...
The issue is that the ASPX page by some reason adds the main node as a parent...I'm trying to see if there is any parameter on how to control this behavior but MS documentation is useless...

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: Composer and WS
« Reply #4 on: December 18, 2012, 08:02:38 PM »
Hi Cav,

Can you post here WSDL of web service that you're calling?

R.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Composer and WS
« Reply #5 on: December 18, 2012, 08:07:45 PM »
Sure, here it is:

The one I'm now trying to test is dadosPessoa which is a complex of a complex...and there is the arg0

Thanks


[quote]

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


-<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://soap.soa.zerohora.ura.com.br/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://cxf.apache.org/bindings/xformat" targetNamespace="http://soap.soa.zerohora.ura.com.br/" name="PersonServiceImplService">
-<wsdl:types>
-
<xs:schema xmlns:tns="http://soap.soa.zerohora.ura.com.br/" targetNamespace="http://soap.soa.zerohora.ura.com.br/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" elementFormDefault="unqualified">
<xs:element name="dadosPessoa" type="tns:dadosPessoa"/>
<xs:element name="dadosPessoaResponse" type="tns:dadosPessoaResponse"/>
<xs:element name="prcDadosPessoaURA" type="tns:prcDadosPessoaURA"/>
<xs:element name="prcRegistraOcorrenciaURA" type="tns:prcRegistraOcorrenciaURA"/>
<xs:element name="registraOcorrencia" type="tns:registraOcorrencia"/>
<xs:element name="registraOcorrenciaResponse" type="tns:registraOcorrenciaResponse"/>
-
<xs:complexType name="dadosPessoa">
-
<xs:sequence>
<xs:element name="arg0" type="tns:prcDadosPessoaURA" minOccurs="0"/> </xs:sequence> </xs:complexType>
-
<xs:complexType name="prcDadosPessoaURA">
-
<xs:sequence>
<xs:element name="codigoJornal" type="xs:int"/>
<xs:element name="numeroDocumento" type="xs:string"/>
<xs:element name="codigoPessoa" type="xs:long" minOccurs="0" nillable="true"/>
<xs:element name="nomePessoa" type="xs:string" minOccurs="0" nillable="true"/>
<xs:element name="boId" type="xs:string" minOccurs="0" nillable="true"/>
<xs:element name="codigoAssinatura" type="xs:long" minOccurs="0" nillable="true"/>
<xs:element name="result" type="xs:int" minOccurs="0" nillable="true"/> </xs:sequence> </xs:complexType>
-
<xs:complexType name="dadosPessoaResponse">
-
<xs:sequence>
<xs:element name="return" type="tns:prcDadosPessoaURA" minOccurs="0"/> </xs:sequence> </xs:complexType>
-
<xs:complexType name="registraOcorrencia">
-
<xs:sequence>
<xs:element name="arg0" type="tns:prcRegistraOcorrenciaURA" minOccurs="0"/> </xs:sequence> </xs:complexType>
-
<xs:complexType name="prcRegistraOcorrenciaURA">
-
<xs:sequence>
<xs:element name="codigoJornal" type="xs:int"/>
<xs:element name="codigoAssinatura" type="xs:long"/>
<xs:element name="codigoPessoa" type="xs:long"/>
<xs:element name="dataOcorrencia" type="xs:date"/>
<xs:element name="texto" type="xs:string"/>
<xs:element name="codigoMotivo" type="xs:long"/>
<xs:element name="result" type="xs:int" minOccurs="0" nillable="true"/> </xs:sequence> </xs:complexType>
-
<xs:complexType name="registraOcorrenciaResponse">
-
<xs:sequence>
<xs:element name="return" type="tns:prcRegistraOcorrenciaURA" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:schema> </wsdl:types>
-<wsdl:message name="registraOcorrencia"> <wsdl:part name="parameters" element="tns:registraOcorrencia"> </wsdl:part> </wsdl:message>
-<wsdl:message name="dadosPessoaResponse"> <wsdl:part name="parameters" element="tns:dadosPessoaResponse"> </wsdl:part> </wsdl:message>
-<wsdl:message name="registraOcorrenciaResponse"> <wsdl:part name="parameters" element="tns:registraOcorrenciaResponse"> </wsdl:part> </wsdl:message>
-<wsdl:message name="dadosPessoa"> <wsdl:part name="parameters" element="tns:dadosPessoa"> </wsdl:part> </wsdl:message>
-<wsdl:portType name="PersonService">
-<wsdl:operation name="dadosPessoa"> <wsdl:input name="dadosPessoa" message="tns:dadosPessoa"> </wsdl:input> <wsdl:output name="dadosPessoaResponse" message="tns:dadosPessoaResponse"> </wsdl:output> </wsdl:operation>
-<wsdl:operation name="registraOcorrencia"> <wsdl:input name="registraOcorrencia" message="tns:registraOcorrencia"> </wsdl:input> <wsdl:output name="registraOcorrenciaResponse" message="tns:registraOcorrenciaResponse"> </wsdl:output> </wsdl:operation> </wsdl:portType>
-<wsdl:binding name="PersonServiceImplServiceSoapBinding" type="tns:PersonService"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> +<wsdl:operation name="dadosPessoa">--
-<wsdl:operation name="registraOcorrencia"> <soap:operation style="document" soapAction=""/>
-<wsdl:input name="registraOcorrencia"> <soap:body use="literal"/> </wsdl:input>
-<wsdl:output name="registraOcorrenciaResponse"> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding>
-<wsdl:service name="PersonServiceImplService">
-<wsdl:port name="PersonServiceImplPort" binding="tns:PersonServiceImplServiceSoapBinding"> <soap:address location="http://192.168.50.232:8081/ws_ura_hlg/personService"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
[/quote]

Offline bublepaw

  • Sr. Member
  • ****
  • Posts: 283
  • Karma: 10
Re: Composer and WS
« Reply #6 on: December 18, 2012, 10:37:27 PM »
Can You use backend block? It will create aspx/jsp page where You can invoke any code You wish - in Your case stub class for handling this comples WS and return result after processing in json format back to vxml.

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: Composer and WS
« Reply #7 on: December 18, 2012, 10:49:43 PM »
Cav,

I did quick test using provided WSDL and Composer generates correct SOAP message IMHO

[code]
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
  <p:dadosPessoa xmlns:p="http://soap.soa.zerohora.ura.com.br/"><arg0><codigoJornal/><numeroDocumento/><codigoPessoa/><nomePessoa/><boId/><codigoAssinatura/><result/></arg0></p:dadosPessoa>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>[/code]

R.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Composer and WS
« Reply #8 on: December 19, 2012, 01:22:37 AM »
Which version of Composer René?? Can you share a screenshot?? I tried several ways and not single one worked for me...
The backend yes, is another idea, but I need to show the customer this working without many external tools and show him how GVP can work with them without 3rd party software...aka, fucked...

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Composer and WS
« Reply #9 on: December 19, 2012, 01:54:32 AM »
ah! forgot to mention that I'm using a Net project...don't if the Net libraries are the responsible ones in any case...

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: Composer and WS
« Reply #10 on: December 19, 2012, 05:32:08 PM »
Hi Cav,

I did my test using Java Composer project. I repeated the test with .NET Composer project and got same result as you >:(. It means there exists discrepancy in how Java and .NET web service blocks handle input parameters. It is evident that .NET web service block doesn't support parameters of xs:complexType/xs:sequence type even Release Notes saying that such parameters are supported.

You have several options how to 'fix' the issue:

1/ Switch to Java Composer project
2/ Modify web service interface so complex type/sequences are not used
3/ Use Backend block and write you own web service call implementation
4/ Modify Composer's getWebServiceData.aspx page to support complex types/sequences
5/ Raise ticket with Genesys Support to get a fix

R.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Composer and WS
« Reply #11 on: December 19, 2012, 07:43:35 PM »
[quote author=René link=topic=7558.msg32543#msg32543 date=1355938328]
Hi Cav,

I did my test using Java Composer project. I repeated the test with .NET Composer project and got same result as you >:(. It means there exists discrepancy in how Java and .NET web service blocks handle input parameters. It is evident that .NET web service block doesn't support parameters of xs:complexType/xs:sequence type even Release Notes saying that such parameters are supported.

You have several options how to 'fix' the issue:

1/ Switch to Java Composer project
2/ Modify web service interface so complex type/sequences are not used
3/ Use Backend block and write you own web service call implementation
4/ Modify Composer's getWebServiceData.aspx page to support complex types/sequences
5/ Raise ticket with Genesys Support to get a fix

R.
[/quote]

Yup, I have all this options on road right now

1. Not an option, customer wants to use Net
2. Already being done...but will take some time as it is 3rd party provider and $$$
3. The idea is avoid this as we are selling the GVP and that their developers will be able to do it without much 3rd party or another tools involved. So if I tell them, hey you need to create a new backend because the one that Genesys provides doesn't work will be a negative point
4. Working on that but hate lack of documentation from MS
5. On T3 already ;) but will take a while before they will answer something good

Thanks a lot René!

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Composer and WS
« Reply #12 on: December 22, 2012, 06:12:43 PM »
Just to update guys, Genesys guys confirmed that it is a bug...and solution on February...damn it...