WebService Function Call

Pavan Yadav

Member
Dear Team,

I am working on a point, where I need to consume the vendor's Webservices and pass some values there. And after WSDL file analysing(bprowsdldoc), I got a Function defined as:
Code:
PROCEDURE INPUT_RFC_CALL:
  DEFINE INPUT PARAMETER DATASET FOR RFC_CALLDataSet.
  DEFINE OUTPUT PARAMETER parameters2 AS LONGCHAR NO-UNDO.
END PROCEDURE.

So, in this case, can I define the required proDataset and pass it directly as Input Or do I need to create a XML file and pass it somehow?
And for the output, can I expect XML/Json or can ask for any other formats too?
 

Cecil

19+ years progress programming and still learning.
Dear Team,

I am working on a point, where I need to consume the vendor's Webservices and pass some values there. And after WSDL file analysing(bprowsdldoc), I got a Function defined as:
Code:
PROCEDURE INPUT_RFC_CALL:
  DEFINE INPUT PARAMETER DATASET FOR RFC_CALLDataSet.
  DEFINE OUTPUT PARAMETER parameters2 AS LONGCHAR NO-UNDO.
END PROCEDURE.

So, in this case, can I define the required proDataset and pass it directly as Input Or do I need to create a XML file and pass it somehow?
And for the output, can I expect XML/Json or can ask for any other formats too?

THe bprowsdldoc utility should give an example of the DataSet and Temp-table. Create the necessary temp-table(s) and the call INPUT_RFC_CALL. The ABL handles the creation of the XML, SOAP envelops and transportation of the SOAP requests for you.

Is the WSDL public or private?
 

Pavan Yadav

Member
THe bprowsdldoc utility should give an example of the DataSet and Temp-table. Create the necessary temp-table(s) and the call INPUT_RFC_CALL. The ABL handles the creation of the XML, SOAP envelops and transportation of the SOAP requests for you.

Is the WSDL public or private?
Cecil, Thanks for the advise. I tried that as a Test and got the understanding for the same.
But now, I got stuck with a seperate issue here. And not sure, why and if it's due to Progress version.

When I used 'bprowsdldoc utility' with OE version 11.7, for analysing, it provided me the Function mentioned above.

But, in actual , on our Server , we do have progress version 10.2B and from there, I got the function parameters different as:
Code:
PROCEDURE INPUT_RFC_CALL:
  DEFINE INPUT PARAMETER parameters1 AS LONGCHAR NO-UNDO.
  DEFINE OUTPUT PARAMETER parameters2 AS LONGCHAR NO-UNDO.
END PROCEDURE.

Means, input Parameter changed is LongChar now.

And I tried to make a connection with this new parameter way and used a sample XML to pass it. But, having a seperate issue now.
Code:
DEFINE VARIABLE lcOutputParam   AS LONGCHAR NO-UNDO.
DEFINE VARIABLE hWeb            AS HANDLE   NO-UNDO.
DEFINE VARIABLE hWebSOAP        AS HANDLE   NO-UNDO.
DEFINE VARIABLE lcInputParam    AS LONGCHAR NO-UNDO.

CREATE SERVER hWeb.
hWeb:CONNECT(" -WSDL '/home/abc/RFC_CALLService.wsdl'
    -SOAPEndpoint '<Webservice Address>'
    -Binding '<--->'
    -ServiceNamespace 'urn:<xyz>:functions'
    -SOAPEndpointUserid 'abc'
    -SOAPEndpointPassword 'abc'
    ").
   
IF hWeb:CONNECTED() THEN
DO:
    MESSAGE 'Connected'
        VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.
       
    COPY-LOB FILE "/home/abc/Test.xml" TO lcInputParam.
    RUN ABC.PortType SET hWebSOAP ON hWeb.
    RUN INPUT_RFC_CALL IN hWebSOAP (INPUT lcInputParam, OUTPUT lcOutputParam). /* At this stage getting timed-out issue */
   
    COPY-LOB FROM OBJECT lcOutputParam TO FILE '/home/abc/OutputTest.xml'.        
END.

If I pass some random variable in input, it gives me error as(totally fine, it should give this error):
Malformed XML fragment: only whitespace content allowed outside root element at line 1 and column 4(11781)

If I pass input as desired XML , which I created manually for testing purpose, it gives an error as:
Secure Socket Layer (SSL)failure. error code 110: Connection attempt timed out
(9318) Connection timeout forhost <Webservice Address> port 443 transport HTTPS. Error sending WebService Request: Fatal Error: connect operation failed (Success) (11767)


SO, I am not getting this point, that when we are connected to Webservice , then why such connection issue with the Function/Operation

Also, WSDL file, I am using from my Local only: So that should be private I beleive .
Highly appriciate for some enlighten onto this.
 

Cecil

19+ years progress programming and still learning.
10.2B, I think is pre-ProDataSet. Somebody will correct me. In this case, it looks like you do have to create the XML using the SAX-WRITER or X-DOCUMENT handler and store the results into a LONGCHAR.

Try removing the -SOAPEndpoint -Binding parameters from the connection string.
 

Pavan Yadav

Member
10.2B, I think is pre-ProDataSet. Somebody will correct me. In this case, it looks like you do have to create the XML using the SAX-WRITER or X-DOCUMENT handler and store the results into a LONGCHAR.

Try removing the -SOAPEndpoint -Binding parameters from the connection string.

Removing the -SOAPEndPoint, won't work. I am not even able to connect.
Removing -binding works, with connection, But gets the same issue of time-out.
 

Pavan Yadav

Member
Tried the Connection with Progress v11.7, but still getting the SSL error.
But, using SOAPUI, we are able to connect and gets the response properly, without any issues.

Do, we have anything in Progress to skip that SSL certificate thing ? Because , when I open the Webservice link, it warns me for the same SSl issue , but after that it goes ahead and provides me option for UserName - Password.

Also, this seems bit odd to me , and not able to get . That why we gets that SSL issue at :
Code:
RUN INPUT_RFC_CALL IN hWebSOAP (INPUT lcInputParam, OUTPUT lcOutputParam). /* At this stage getting timed-out issue */
And not while making connection to Webservice?
 
Top