Hi All,

I'm attempting to connect my first sample RPGLE client app to my first sample Web Service on the IWS...

I'm doing the TempConvert2 example from the IBM Systems Magazine series of 3 articles:
http://www.ibmsystemsmag.com/ibmi/tipstechniques/applicationdevelopment/Integrated-Web-Services-With-ILE-Programs/?page=7


I believe I've got everything setup correctly and running on the IWS, and the Server/Service are running...

I've followed their example steps to create the C Stub modules and the RPGLE with all the modules included...

The problem comes when I issue the call to the client app : "CALL CVTTEMP/CNVRTTEMP '5'"

Source from the example client app: 
Program:   CNVRTTEMP      Library:   CVTTEMP        Module:   CVTTEMPCL

// Get a Web service stub. The host and port for the endpoint may need 
// to be changed to match host and port of Web service. You can pass   
// *NULL to getStub() if the endpoint in the WSDL file is correct.     
Endpoint = 'http://S10b4613:10010/web/services/ConvertTemp2' + X'00' 


WsStubP = getStub(%Addr(Endpoint));
// Initialize input values.     
TempInF = %trim(TEMPIN) + X'00';
pTempInF = %addr(TempInF);      
// Invoke the ConvertTemp Web service operation.
ResultP = ConvertTemp(WsStubP:%Addr(Input)); 

// Prepare output string depending on what was returned.
if (ResultP <> *NULL);                                  
   OutputText = %str(pTempInF) + ' Fahrenheit is '      
               + %str(pTempOutC) + ' Celsius.';         
else;                                                   
   OutputText = 'No results returned...';               
endif;   

When it invokes the Web Service it goes into status "connect" and hangs there until it times out...
Program                  Statement         Procedure                    
QAXIS10C   QSYSDIR       73                process__Q2_7axiscpp16Clien >
QAXIS10C   QSYSDIR       61                invoke__Q2_7axiscpp16Client >
QAXIS10HT  QSYSDIR       11                openConnection__13HTTPTrans >
QAXIS10HC  QSYSDIR       15                open__11HTTPChannelFv        
QAXIS10HC  QSYSDIR       148               OpenChannel__11HTTPChannelF >
QSOSRV1    QSYS          83                connect                      

I'm able to debug it and see that the WsStubP is getting populated with an address for the Endpoint variable...

When I try sending a *Null to getstub() as suggested, It doesn't hang, instead it responds instantly: 'No results returned...'.

So, what is the secret to getting the the endpoint to point correctly to the WebServer/WebService...?
Web Server shows port of 10000, the Web Service shows a port of 10010...

I've tried:
Endpoint = 'http://S10b4613:10010/web/services/ConvertTemp2' + X'00' 

Endpoint = 'http://S10b4613:10010/web/services/ConvertTemp' + X'00' 

Endpoint = 'http://S10b4613:10000/web/services/ConvertTemp2' + X'00' 

Endpoint = 'http://S10b4613:10000/web/services/ConvertTemp' + X'00' 


(Both Services are running on the IWS, ConvertTemp and ConvertTemp2)

Could it be there is a Server on the iSeries we need to start...?
We are at V6R1M0 and we do have the prescribed PTFs installed.

Looking for any assistance you can provide...

Thanks,
Jeff Klipa
jklipa at yahoo dot com

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.