[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LIBHTTP Building the soap message problem



   Can someone tell me  why this first SOAP message works in RPG program
   1..  But the second in RPG program 2 does not.  But the SOAPUI Call
   works in both cases


   SOAPUI  information...  First program


   Operation

   GetCityForecastByZIP

   Literal

   false

   http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP


   POST http://ws.cdyne.com/WeatherWS/Weather.asmx HTTP/1.1

   Accept-Encoding: gzip,deflate

   Content-Type:
   application/soap+xml;charset=UTF-8;action="http://ws.cdyne.com/Weather
   WS/GetCityForecastByZIP"

   User-Agent: Jakarta Commons-HttpClient/3.1

   Host: ws.cdyne.com

   Content-Length: 309


   <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope";
   xmlns:weat="http://ws.cdyne.com/WeatherWS/";>

      <soap:Header/>

      <soap:Body>

         <weat:GetCityForecastByZIP>

            <!--Optional:-->

            <weat:ZIP>76051</weat:ZIP>

         </weat:GetCityForecastByZIP>

      </soap:Body>

   </soap:Envelope>


   RPG Code...first program   WORKS  OK

   EU==>

   MT ** ... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+...
   7 ...+... 8

   45.00    SOAP =
   '<SOAP:Envelope'+

   46.00         '
   xmlns:SOAP="http://www.w3.org/2003/05/soap-envelope";' +

   47.00         '    xmlns:weat="http://ws.cdyne.com/WeatherWS/";>'
   +

   48.00       '<SOAP:Body>'
   +

   49.00        '<weat:GetCityForecastByZIP>'
   +

   50.00          '  <weat:ZIP>'+ %trim(ZipCode) +'</weat:ZIP>'+

   51.00        '</weat:GetCityForecastByZIP>'
   +

   52.00
   '</SOAP:Body>'+

   53.00
   '</SOAP:Envelope>';

   54.00

   55.00
   http_debug(*ON);

   56.00

   57.00    urlp
   ='http://ws.cdyne.com/WeatherWS/Weather.asmx';

   58.00
   urlps='http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP';

   59.00

   60.00    rc =
   http_url_post_xml(

   61.00
   urlp

   62.00                  : %addr(SOAP) +
   2

   63.00                  :
   %len(SOAP)

   64.00                  : *NULL

   65.00                  :
   %paddr(Incoming)

   66.00                  :
   %addr(City)

   67.00                  :
   HTTP_TIMEOUT

   68.00                  :
   HTTP_USERAGENT

   69.00                  :
   'text/xml'

   70.00                  :
   urlps);

   71.00    If
   (rc<>1);

   72.00       msg = http_error();


   SOAPUI  information...  second program


   operation

   getVersion

   Literal

   false

   oucMobileData_processJob_webServices_v1_jobService_Binder_getVersion


   POST
   https://eistst:5541/ws/jcpMobileData.processJob.webServices.v1:jobServ
   ice HTTP/1.1

   Accept-Encoding: gzip,deflate

   Content-Type: text/xml;charset=UTF-8

   SOAPAction:
   "jcpMobileData_processJob_webServices_v1_jobService_Binder_getVersion"

   User-Agent: Jakarta Commons-HttpClient/3.1

   Host: eistst:5541

   Content-Length: 256


   <soapenv:Envelope
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
   xmlns:job="http://jcp.com/oucMobileData/processJob/webServices/v1/jobS
   ervice">

      <soapenv:Header/>

      <soapenv:Body>

         <job:getVersion/>

      </soapenv:Body>

   </soapenv:Envelope>


   RPG Code...second program   DOES NOT WORK    Results in RC=-1


   45.00    SOAP =
   '<soapenv:Envelope'+

   46.00         '
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope";' +

   47.00         ' xmlns:job="http://jcp.com/jcpMobileData/processJob/'
   +

   48.00         'v1/jobService"'
   +

   49.00       '<soapenv:Body>'
   +

   50.00        '<job:GetVersion/>'
   +

   51.00
   '</soapenv:Body>'+

   52.00       '</soapenv:Envelope>';

   53.00

   54.00
   http_debug(*ON);

   55.00

   56.00    urlp ='https://eistst:4451/ws/jcpMobileData.processJob'
   +

   57.00          'webServices.v1:jobService'
   ;

   58.00    urlps='jcpMobileData_processJob_webServices_v1_'
   +

   59.00          'jobService_Binder_getVersion'
   ;

   60.00

   61.00    rc =
   http_url_post_xml(

   62.00
   urlp

   63.00                  : %addr(SOAP) +
   2

   64.00                  : %len(SOAP)

   65.00                  : *NULL

   66.00                  : %paddr(Incoming)

   67.00                  : %addr(City)

   68.00                  : HTTP_TIMEOUT

   69.00                  : HTTP_USERAGENT

   70.00                  : 'text/xml; charset=UTF-8'

   71.00                  : urlps);

   72.00    If (rc<>1);
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------