Service Virtualization

  • 1.  Magic string not working, what's wrong ?

    Posted Apr 12, 2017 07:49 AM

    Hello,

     

    Today I have a virtual service that don't want to work with magic string.

    It is SAOP based protocol. The answer contains the row : 

    <ns3:extra info="{{=request_offres_formation_organisme-formation-responsable_SIRET-organisme-formation_SIRET;/*-1*/}}" id="CPF-nir"/>

    The request contains field "offres_formation_organisme-formation-responsable_SIRET-organisme-formation_SIRET" and matches is done (perfectly) on this field.

    But the answer return -1 and not the field's value.

    In "request data" area, "magic string" is checked.

     

    On other virtual service done (based on REST/JSON) it does work. 

    Did I miss something ? 

     

    Regards,

     

    Benoit



  • 2.  Re: Magic string not working, what's wrong ?
    Best Answer

    Posted Apr 12, 2017 08:22 AM

    Hi, I may be wrong on this, but I believe the 'dash' characters in the property name may be an issue. Try replacing the '-' characters with an '_' underscore in the response. If I recall, internally DevTest replaces the '-' with '_'.

     

    from:

    {{=request_offres_formation_organisme-formation-responsable_SIRET-organisme-formation_SIRET;/*-1*/}}

    to:

    {{=request_offres_formation_organisme_formation_responsable_SIRET_organisme_formation_SIRET;/*-1*/}}



  • 3.  Re: Magic string not working, what's wrong ?

    Posted Apr 12, 2017 08:31 AM

    Joel,

     

    It does work. Thanks.

     

    Benoit