Rutger Olthuis
New Member
Hi,
I've had a long break from developing with Progress. Things like Prodatasets are pretty new for me, so my problem might be related to my lack of understanding the prodataset, but I have the feeling I'm doing something else wrong.
I'm trying to call a number of webservices created in C#. I test them both mocked in soapUI and with an actual Visual studio running the webservice.
When I have a string as response, regardless of my input (class or just a string), all works fine.
When I have a class as a response (bprowsdldoc generates some nice datasets for me) and I try to save the dataset as an XML file, I always get an empty (except for some namespace declarations) XML file.
I can see in the VS2012 debugger that my request is recieved and the response is generated.
What am I doing wrong here?
I've had a long break from developing with Progress. Things like Prodatasets are pretty new for me, so my problem might be related to my lack of understanding the prodataset, but I have the feeling I'm doing something else wrong.
I'm trying to call a number of webservices created in C#. I test them both mocked in soapUI and with an actual Visual studio running the webservice.
When I have a string as response, regardless of my input (class or just a string), all works fine.
When I have a class as a response (bprowsdldoc generates some nice datasets for me) and I try to save the dataset as an XML file, I always get an empty (except for some namespace declarations) XML file.
I can see in the VS2012 debugger that my request is recieved and the response is generated.
What am I doing wrong here?
Code:
DEFINE VARIABLE hWebService AS HANDLE NO-UNDO.
DEFINE VARIABLE hIService1 AS HANDLE NO-UNDO.
DEFINE TEMP-TABLE composite NO-UNDO
NAMESPACE-URI "http://schemas.datacontract.org/2004/07/WcfService2"
FIELD BoolValue AS LOGICAL
FIELD StringValue AS CHARACTER .
DEFINE DATASET compositeDset NAMESPACE-URI "http://schemas.datacontract.org/2004/07/WcfService2"
XML-NODE-TYPE "HIDDEN"
FOR composite.
DEFINE TEMP-TABLE GetDataUsingDataContractResult NO-UNDO
NAMESPACE-URI "http://schemas.datacontract.org/2004/07/WcfService2"
FIELD BoolValue AS LOGICAL
FIELD StringValue AS CHARACTER .
DEFINE DATASET GetDataUsingDataContractResuDset NAMESPACE-URI "http://schemas.datacontract.org/2004/07/WcfService2"
XML-NODE-TYPE "HIDDEN"
FOR GetDataUsingDataContractResult.
RUN ConnectWS.
RUN GetDataUsingDataContract.
FINALLY:
RUN CloseAll.
END FINALLY.
PROCEDURE ConnectWS:
CREATE SERVER hWebService.
hWebService:CONNECT("-WSDL 'http://localhost:59103/Service1.svc?wsdl'").
RUN IService1 SET hIService1 ON hWebService.
END PROCEDURE.
PROCEDURE GetDataUsingDataContract:
DEFINE VARIABLE a AS LOGICAL NO-UNDO.
CREATE composite.
ASSIGN
composite.BoolValue = true
composite.StringValue = 'Mijn naam is Rutger'
.
RUN GetDataUsingDataContract IN hIService1(INPUT DATASET compositeDset, OUTPUT DATASET GetDataUsingDataContractResuDset).
a = DATASET GetDataUsingDataContractResuDset:write-xml("file","C:\OpenEdge\114\WRK\crowdfund\test.xml",TRUE,'UTF-8',?,false,false).
END PROCEDURE.
PROCEDURE CloseAll:
DELETE OBJECT hIService1.
hWebService:DISCONNECT().
DELETE OBJECT hWebService.
END PROCEDURE.