HI Guys
I need to pick your brains, I am trying to make a call on a webservice where the WSDL file is hideously complicated compared to the one function that I would like to call. How can I simplify the WSDL or create the PB proxy objects manually or use a different method? Ideas please :)
WSDL File is: https://pms.verticalbooking.com/mainstay/OTA_PMS.php?wsdl
200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns3 =
"http://schemas.xmlsoap.org/ws/2004/08/addressing">
RESPONSE TYPE:
"http://www.opentravel.org/OTA/2003/05">
http://schemas.xmlsoap.org/ws/2004/12/addressing/role/anonymous
56e2facbf13d
it/booking_engine/int/myhotel/OTA_HotelInvCountNotifRS
Cheers
David
The only reason to chop it up s that I cannot get it to work in PB, I'm thinking that a simpler approach might work.
The type for OTA_HotelInvCountNotifRQ is not liked by PB. I cannot address the inventories.inventory. elements to setup the dates etc. I might be missing something though. Any thoughts welcome.
I'm testing using this code:
SoapConnection lws_conn // Web Service Connection Object (Requires pbwsclient125)
ota_pms lproxy_otapms
//runtimeerror ierr // Run time error
boolean ib_connected = false // Web service connected?
// Create web service object
long rval
lws_conn = create SoapConnection
rval = lws_conn.setbasicauthentication( '', '3r799d6yq6', 'y3ppi58t20')
// Create Instance of VerticalCM
rval = lws_Conn.CreateInstance(lproxy_otapms, "ota_pms", 'https://pms.verticalbooking.com/mainstay/OTA_PMS.php')
ib_connected = true
// Call the API function
ota_pingrq lota_pingrq
ota_pingrs lota_pingrs
lota_pingrq = Create ota_pingrq
//lota_pingrs = Create lota_pingrs
ota_hotelinvcountnotifrq lota_avail_rq
lota_avail_rq = Create ota_hotelinvcountnotifrq
ota_hotelinvcountnotifrs lota_avail_rs
string ls_return
lota_pingrq.timestamp = datetime(today(), now())
lota_pingrq.version = 1
lota_pingrq.echodata = 'echo message'
boolean lb_rtn
securityheadertype lsec
lsec = Create securityheadertype
lsec.mustunderstand = true
lsec.encodedmustunderstand = '1'
lsec.encodedmustunderstand12 = '1'
lsec.encodedrelay = '0'
// Set up availability Request
lota_avail_rq.inventories.hotelcode = '5071'
lota_avail_rq.inventories.inventory. // Cannot reference the sub objects.
lb_rtn = lproxy_otapms.setsecurity( lsec)
//lota_pingrs = lproxy_otapms.ota_ping_request( lota_pingrq)
lota_avail_rs = lproxy_otapms.ota_hotelinvcountnotif_request( lota_avail_rq)
messagebox('blx', lota_pingrs.echotoken)
========================================================================
I cannot reference the hotel and dates i this section:
ns1:StatusApplicationControl Start = "2010-11-25" End = "2010-11-25" InvTypeCode =
"MTRD"/>
I have moved a little bit further, using code as follows:
SoapConnection lws_conn // Web Service Connection Object (Requires pbwsclient125)
ota_pms lproxy_otapms
//runtimeerror ierr // Run time error
boolean ib_connected = false // Web service connected?
invcounttype linv_countype1
baseinvcounttype linv_inventory2
statusapplicationcontroltype linv_controltype3
baseinvcounttypeinvcount linv_counts3
baseinvcounttypeinvcountinvblockcutoff linv_block_cutoff4
// Create web service object
long rval
lws_conn = create SoapConnection
rval = lws_conn.setbasicauthentication( '', '3r799d6yq6', 'y3ppi58t20')
// Create Instance of VerticalCM
rval = lws_Conn.CreateInstance(lproxy_otapms, "ota_pms", 'https://pms.verticalbooking.com/mainstay/OTA_PMS.php')
ib_connected = true
// Call the API function
ota_pingrq lota_pingrq
ota_pingrs lota_pingrs
lota_pingrq = Create ota_pingrq
//lota_pingrs = Create lota_pingrs
ota_hotelinvcountnotifrq lota_avail_rq
lota_avail_rq = Create ota_hotelinvcountnotifrq
ota_hotelinvcountnotifrs lota_avail_rs
string ls_return
lota_pingrq.timestamp = datetime(today(), now())
lota_pingrq.version = 1
lota_pingrq.echodata = 'echo message'
boolean lb_rtn
securityheadertype lsec
lsec = Create securityheadertype
lsec.mustunderstand = true
lsec.encodedmustunderstand = '1'
lsec.encodedmustunderstand12 = '1'
lsec.encodedrelay = '0'
// Set up availability Request
linv_block_cutoff4 = Create baseinvcounttypeinvcountinvblockcutoff
linv_block_cutoff4.offsetcalculationmode = 1
linv_counts3 = Create baseinvcounttypeinvcount
linv_counts3.invblockcutoff = linv_block_cutoff4
linv_counts3.counttype = "1"
linv_counts3.count = "5"
linv_controltype3 = Create statusapplicationcontroltype
linv_controltype3.fri = true
linv_inventory2 = Create baseinvcounttype
linv_inventory2.statusapplicationcontrol = linv_controltype3
linv_inventory2.invcounts[1] = linv_counts3
linv_countype1 = Create invcounttype
linv_countype1.hotelcode = "5071"
linv_countype1.inventory[1] = linv_inventory2
lota_avail_rq.inventories = linv_countype1
//linv_block_cutoff.
//linv_controltype.
lb_rtn = lproxy_otapms.setsecurity( lsec)
//lota_pingrs = lproxy_otapms.ota_ping_request( lota_pingrq)
lota_avail_rs = lproxy_otapms.ota_hotelinvcountnotif_request( lota_avail_rq)
messagebox('blx', lota_pingrs.echotoken)
=================================================
I now get the error that the return value of (see below) cannot be reflected.