Parameters sent from Uniface to Web service not seen

Author: tatiana@ca.ibm.com (tandron)

Hi,

This is our first test with web services and we use U9.3.02, SOP U2.0.  We have a web service running on a Windows machine and we successfully imported the WSDL from this service, adjusted parms properties in datamodel, compiled the newly generated model, etc. Signature created OK. In a test form, we call this service but none of the parameters is seen. We get error -150, activation error. Not sure what is wrong, the call is syntactically correct and there are no communication issues. We are unable to see the XML generated but we suspect it's empty strings. What could be wrong, are we missing anything in the setup?

Logic is something like this, we pass four parms as fields in an occurence and expect back a string:

variables 

    String vStatus

endvariables

 

PARM1.RETRIEVEREQUEST = 11 

PARM2.RETRIEVEREQUEST = "ABC" 

PARM3.RETRIEVEREQUEST = "SSSS" 

PARM4.RETRIEVEREQUEST = $date

 

activate "VWS".RETRIEVE("RETRIEVEREQUEST.HTTP_WS_TEST",vStatus)

 

Thanks,

Tatiana

 

12 Comments

  1. Hi Tatiana

    with the activate you have put the name of the entity in quotes.

    So your parameter is just the string "RETRIEVEREQUEST.HTTP_WS_TEST", not the expected entity.

    Remove the quotes and give it another try.

    Uli


    Author: ulrich-merkel (ulrichmerkel@web.de)
  2. With -150 there should be some info of the actual error in the message frame.


    Author: Theo Neeskens (tneeskens@itblockz.nl)
  3. There isn't when I get the same error. And the entity name is fine in Quotes, out of quotes it tries to take it as a variable I think.


    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  4. .. but isn't it a variable if we assign values to it in our component (w/o storing) before calling the webservice ?

    for me it looks more like a "struct" type of parameter converted into a uniface entity.


    Author: ulrich-merkel (ulrichmerkel@web.de)
  5. I agree it's an entity, but when I have tried to use the entity name without quotes in this type of call, the compiler (and runtime) treat it as a (non-existent) variable, in which they expect to find the entity name stored.

    Except when using it to specify a field, I almost always find that "ENTITYNAME" will work much better than ENTITYNAME, virtually everything expects ENTITYNAME without quotes to be a variable defined in the local proc or a fieldname.


    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  6. Hi Iain,

    looks like there is a gab between theory an the real life.

    I have not so much experience how to make it happen under real-world circumstances and sometimes it's a big surprise what you have to do to make it happen.

     

    Uli


    Author: ulrich-merkel (ulrichmerkel@web.de)
  7. Thanks everyone for the input.

    I tried removing the quotes from the entity name, but I got a compiling error and same result -150.

    I am told via local CPWR support that there is an issue with unescaped data (whatever this is!), and Amsterdam is looking into it. Meanwhile, we had no issue accessing another web service using just strings. This servise did not require parms sent as occurrence.

     

    Will keep you posted.

     

    Tatiana


    Author: tandron (tatiana@ca.ibm.com)
  8. hi tatjana

    "unescaped" is just when you have some special characters in a normal string.

    Example from uniface: if you want to place a quote in a string, you have to escape it with "%%" so your assignment will become

    my_string = "a string with a quote: %%" in it"

    if you do not escape the quote in the string, you will get a compile error


    Author: ulrich-merkel (ulrichmerkel@web.de)
  9. In XML for example a > has to be ampersand letter g letter t. (I tried to type it here but it automatically converted to > again)


    Author: Theo Neeskens (tneeskens@itblockz.nl)
  10. ... plus a semicolon at the end.

    The general structure is an amperand to start the sequence and a semicolon terminating it.


    Author: ulrich-merkel (ulrichmerkel@web.de)
  11. Hi,

    my first thought was that you shouldn't use "RETRIEVE" as the operation name for the web-service. But I suppose it's ok as no one has said anything about it.

    Regards RogerW.


    Author: rogerw (roger.wallin@abilita.fi)
  12. I have just determined why MY web services activate was getting an error 150.

    I have paths set up to a urouter, and uniface was trying to run the service on the urouter, I had to include the service in the asn file [SERVICES_EXEC] part with
    SERVICE=SERVICE
    to get it to run 'local'.


    Author: Iain Sharp (i.sharp@pcisystems.co.uk)