Problem with WSDL (complex?) input parameter

Author: (p.knapek)

Hello, I have a problem with passing an input parameter to WSDL service I have imported the WSDL to Uniface (9.6.01) and Uniface created the signature and the model with entities. There are 2 operations in signature: The first named GETSEZNAMNESPOLEHLIVYPLATCE with no input and 2 output parameters (occ and string), which works fine. The second operation is GETSTATUSNESPOLEHLIVYPLATCE, where the problem with passing parameters occurs. There are 3 parameters (occ STATUS:out, string DIC:in, string STATUSPLATCEDPH:out). If I try to pass a simple string to DIC parameter ("123456"), or a list ("123456*;654321") or a XML snippet (like "123456654321"), the expected result is not returned (XML) in STATUSPLATCEDPH. There is the only difference between GETSEZNAM... and GETSTATUS... operations in the "in" parameter. Do you have any ideas, what am I doing wrong or where is the problem? Thank you for your suggestions. Original infos about the wsdl (in Czech): and translated to English via Google Translator: Pavel


  1. Hi Pavel, have you checked what error information you will get from uniface ($procerrorcontext, $status, ...)

    Author: ulrich-merkel (
  2. Hi Ulrich, there is no error in Uniface. Maybe I did not explained the problem enough, I am sorry. $status is 0, so that web service works but not as expected. This is a web service that checks the VAT payers statuses. You can send a list of VAT numbers (string V_DIC:in) and the statuses of corresponding VAT numbers are returned (string V_STATUSPLATCEDPH:out) in XML. A status of operation is stored in the first, "out", parameter as occurence. If I call: activate "ROZHRANICRPDPH".GETSTATUSNESPOLEHLIVYPLATCE("STATUSTYPE.HTTP_ADIS_MFCR_CZ_ROZHRANICRPDPH", V_DIC, V_STATUSPLATCEDPH) I expect a complex XML in V_STATUSPLATCEDPH to be returned. Even if I try to pass any string value in V_DIC (I mean string, list or XML snippet), a simple XML is returned instead (containing of only two lines, not corresponding to wsdl). I tried to call this web service by a simple script written in PHP just to prove the problem is not on the server side. And it worked, I got the right XML structure returned (corresponding to wsdl). As I mentioned in my first post, the similar operation without "in" parameter works fine in Uniface (returns XML containing the list of VAT payers in V_STATUSPLATCEDPH and info in the first parameter): activate "ROZHRANICRPDPH".GETSEZNAMNESPOLEHLIVYPLATCE("STATUSTYPE.HTTP_ADIS_MFCR_CZ_ROZHRANICRPDPH", V_STATUSPLATCEDPH) So I think that there is a problem in passing V_DIC parameter. Do you think the same? Do you have any suggestions how to make it work? Thanks for your opinion. Pavel

    Author: p.knapek (
  3. Hi Pavel, In this case, because of the repetition of the input parameter, I guess Uniface might see this as a complex parameter, where you will need to write your own xml. I would suggest to try an input like: v_dic = "<dic>12345</dic>" or, in case of more input values: v_dic = "<dic>123456</dic><dic>54321</dic>" Hope this works for you, Dennis

    Author: Dennis van Duijn (
  4. Hi Pavel, Dennis is already on the right track here. We just have to add the correct namespace to the input parameter and then the Web Service should return the expected data. I had a look with soapUI and this is the request envelope it's creating: <soapenv:Envelope xmlns:soapenv="" xmlns:roz=""> <soapenv:Header/> <soapenv:Body> <roz:StatusNespolehlivyPlatceRequest> <!--1 or more repetitions:--> <roz:dic>01426737</roz:dic> </roz:StatusNespolehlivyPlatceRequest> </soapenv:Body> </soapenv:Envelope> You can see that the element dic is using the namespace roz that is defined as xmlns:roz="". And when I assign (in Uniface) the following value to dic then I get the expected result: v_dic = "<roz:dic xmlns:roz=%%"">12345</roz:dic>" You probably ask, why do I need to define the namespace “again”? It is after all defined in the SOAP envelope created by Uniface. That is correct, but we state in the doc that an XML snippet needs to be a self-contained, well-formed snippet of XML. For details see the topic “Complex Nested Parameters” in the Uniface Library (Integrating With Other Technologies > Web Services > Call-Out from Uniface to a Web Service > Complex Nested Parameters). Hope this helps. Regards, Daniel

    Author: diseli (
  5. Hi Dennis and Daniel. I tried to pass the XML snippet in parameter in the way Dennis suggested, I mentioned it in my first post but unfortunetally this forum removed all the XML tags from the post content Daniel, thank you very much! It really works. It is my fault, I read that article and I did not understand it well. Thank you once again for posting an example. Pavel

    Author: p.knapek (
  6. Hi Pavel, You are welcome! And it's good to hear that you also got it working now. Cool And it is indeed a bit tricky to post XML or HTML data in a post. You have to make sure that you escape (at least) the smaller than ("<") and greater than (">") with "& lt;" and "& gt;" (I've added the space on purpose Wink) Regards, Daniel

    Author: diseli (
  7. Hi, let me ask you one more question. I mentioned that there is a short delay that lasts for about 3-5 seconds after first call (activate) of the signature. When I call it once again, everything happens immediately with no delay. Do you know what causes that first-call delay? I think it has to be some process inside Uniface (9.6.01 X104), because I tried to simulate the same functionality (call web service and retrieve data) in PHP and there was no delay too. Unfortunately the competitive software that has the same functions also implemented, does not suffer from any delays. Thanks for the ideas. Pavel

    Author: p.knapek (