Request to Webservice (longchar)

jayze333

New Member
Hi,

I'm trying to receive data from an webservice. The code i use to ask the webservice to response you find under here. Now I have to send a longchar to the webservice but i don't know if my strXML is a longchar of do i have to transform it to a longchar or what? I just don't know how to send the caller object on another way...

DEFINE VARIABLE caller AS LONGCHAR NO-UNDO.
DEFINE VARIABLE Caller_GetPrivilegesResult AS CHARACTER EXTENT NO-UNDO.


ASSIGN
strXML = strXML + " <ns0:caller xmlns:ns0='http://www.geodynamics.be/.........'>"
strXML = strXML + " <ns0:CompanyName></ns0:CompanyName>"
strXML = strXML + " <ns0:LoginName></ns0:LoginName>"
strXML = strXML + " <ns0:password></ns0:password>"
strXML = strXML + " </ns0:caller>".

ASSIGN caller = strXML.

RUN Caller_GetPrivileges IN hIntegratorWebserviceSoap(INPUT caller, OUTPUT Caller_GetPrivilegesResult).
 

Casper

ProgressTalk.com Moderator
Staff member
Read up on hte sax-writer. That is the way you should make your xml. You can write directly to a longchar if you want.

Casper
 

RealHeavyDude

Well-Known Member
Mostly a LONGCHAR is not that different from a CHARACTER. AFAIK all functions (SUBSTRING and so on) work on it.

When you create a XML document you can always write it to a LONGCHAR. See the documentation on the SAX-WRITER, WRITE-XML method on temp tables and ProDataSets and SAVE ( ) method on the X-Document Handle.

HTH, RealHeavyDude.
 
Top