SOAP response with CDATA - Forum - OpenEdge Development - Progress Community
 Forum

SOAP response with CDATA

This question is answered

Hi,

I tries to create SOAP service for the first time, but has encountered the problem of answer from the SOAP service.

The service should return the data in this form:

But in fact, it returns the result as CDATA. I use SoapUI for tests. OE 11.7.3 Win64. PAS4OE as web server.

I can not understand what I'm doing wrong.
Maybe I do not know something, and in fact there is no mistake and I can not get an answer like on the first picture?

I attached the server procedure.

5340.DepoPaymentListVal.p

I will be grateful for any clue.

Regards,
Valeriy

Verified Answer
  • I don't use ProxyGen, but I don't see a way of tellig it to interpret the LONGCHAR as a "structure".

    My bet will be that you need to use a ProDataset or Temp-Table as a return parameter in order to be able to return an XML structure.

    ProxyGen *should* have a way of telling it to use a CHAR/LONGCHAR parameter as raw XML, but...

    Having the WSDL interpreted as CHARACTER is normal, because SOAP only has 'string' type, it does not has a 'longstring', so your LONGCHAR becmoes a 'string' in WSDL which is interpreted (when read) as a CHARACTER.

    I consume SOAP services with ABL using ABL facilities, but when publishing services never use ABL facilities but our own implementation of SOAP, so can't help much.

All Replies
  • Valeriy, first of all.  I'm not a Progress developer.  I've just installed the toolkit and going to play around with it.  I am a .NET developer and have worked on many services over the years.  I have seen this before so it is common to all languages.  Curious if your output from service is "string" or a collection of serialized (marked usually by attribute at class or field) Payment object?  

  • I haven't done what you are doing, but it seems to me that the problem lies in the service definition (WSDL).

    Apparently you have defined the OutParms as a string, at it should by a ComplexType, with the intended internal structure.

    The procedure you share seems ok.

  • Hi David,

    Thank you for your reply!

    Maybe I'm making the wrong settings in ProxyGenerator?

    I do the following:

    Make procedure as non-persistent

    Then customize it 

    Then generate wsdl

    Then make wsdldoc

    bprowsdldoc  DepoPaymentVal.wsdl

    And here I see a certain strangeness...

    In my procedure, I define the output parameter outParms as LONGCHAR

    DEFINE OUTPUT PARAMETER outParms AS LONGCHAR NO-UNDO.

    But in the description of WSDL it looks like CHARACTER.

    Maybe a reason in this? Did I do something wrong when generating wsdl?

  • I don't use ProxyGen, but I don't see a way of tellig it to interpret the LONGCHAR as a "structure".

    My bet will be that you need to use a ProDataset or Temp-Table as a return parameter in order to be able to return an XML structure.

    ProxyGen *should* have a way of telling it to use a CHAR/LONGCHAR parameter as raw XML, but...

    Having the WSDL interpreted as CHARACTER is normal, because SOAP only has 'string' type, it does not has a 'longstring', so your LONGCHAR becmoes a 'string' in WSDL which is interpreted (when read) as a CHARACTER.

    I consume SOAP services with ABL using ABL facilities, but when publishing services never use ABL facilities but our own implementation of SOAP, so can't help much.

  • Thank you, David!

    I will try  to use ProDataSet.