1. Camilla Wind
  2. PowerBuilder
  3. Thursday, 13 September 2018 09:17 AM UTC

Hi

 

I have a problem with a webservice WSDL function call.

 

The webservice is PTVs Sxerver wsdl https://xroute-eu-n-test.cloud.ptvgroup.com/xroute/ws/XRoute?WSDL

i call the calculateroute function and it say's  "bad argument list for function".

 

is there anyone that know whats wrong?

 

my code is as below

 

 

soapconnection lnv_conn_ptv


ptvxxroutewsservice lnv_ws

//calculateroute lnv_calculateroute

ptvxwaypointdesc  lnv_waypointdesc[]

ptvxpoint lnv_point[]

ptvxplainpoint lnv_plainpoint

ptvxuniquegeoid lnv_uniquegeoid

ptvxroutingoption lnv_routingoption[]

ptvxexceptionpath lnv_exceptionpath[]

ptvxresultlistoptions   lnv_resultlistoptions 

  ptvxcallercontext lnv_callercontext

  ptvxcallercontextproperty lnv_callercontextproperty[]
 

ptvxroute lnv_reply

long ll_rc

lnv_conn_ptv = create soapconnection
ll_rc = lnv_conn_ptv.createinstance(lnv_ws,"ptvxxroutewsservice")

//lnv_calculateroute = create calculateroute
//
//lnv_waypointdesc = create ptvxwaypointdesc

//Beställningsdata

long ll_linktype

ll_linktype = long("AUTO_LINKING")
lnv_waypointdesc[1].linktype = ll_linktype
lnv_waypointdesc[1].fuzzyRadius = 0

lnv_waypointdesc[2].linktype = ll_linktype
lnv_waypointdesc[2].fuzzyRadius = 0

// lnv_point[] = create  ptvxpoint
 
 
 
//  lnv_plainpoint = create ptvxplainpoint
 
  lnv_plainpoint.x =11.9667
  lnv_plainpoint.y = 57.7022
 
    lnv_point[1].point = lnv_plainpoint
 
 
  lnv_waypointdesc[1].wrappedcoords[1] = lnv_point[1]
 

 

  lnv_plainpoint.x =11.8542
  lnv_plainpoint.y = 57.6999

  lnv_point[2].point = lnv_plainpoint
 
    lnv_waypointdesc[2].wrappedcoords[2] = lnv_point[2]

 
 
//   lnv_routingoption = create ptvxroutingoption
 
long ll_parameter 
ll_parameter = long( "OPTIMIZATION")

  lnv_routingoption[1].parameter = ll_parameter
  lnv_routingoption[1].value = '90'
 
   lnv_waypointdesc[1].wrappedcoords[2] = lnv_point[1] 
 
//   lnv_resultlistoptions = create ptvxresultlistoptions
 
  lnv_resultlistoptions.manoeuvres = false
  lnv_resultlistoptions.texts = false
  lnv_resultlistoptions.nodes = false
  lnv_resultlistoptions.binarypathdesc = false
  lnv_resultlistoptions.polygon = false
  lnv_resultlistoptions.detaillevel = long(" BORDERS")
  lnv_resultlistoptions.dynamicinfo = false
  lnv_resultlistoptions.segments = false
  lnv_resultlistoptions.segmentattributes = false
  lnv_resultlistoptions.manoeuvreattributes = false
  lnv_resultlistoptions.brunnelmanoeuvres = false
  lnv_resultlistoptions.urbanmanoeuvres = false
  lnv_resultlistoptions.manoeuvregroups = false
  lnv_resultlistoptions.tollmanoeuvres = false
  lnv_resultlistoptions.boundingrectanglesc = 0
  lnv_resultlistoptions.boundingrectanglesoffset = 0
  lnv_resultlistoptions.totalrectangle = false
 
//   lnv_callercontext = create ptvxcallercontext
 
//  lnv_callercontextproperty = create ptvxcallercontextproperty
 
 
  lnv_callercontextproperty[1].value ="truckfast"
  lnv_callercontextproperty[1].key = "Profile"
 
  lnv_callercontext.wrappedproperties[1] = lnv_callercontextproperty[1]
 
    lnv_callercontextproperty[2].value ="OG_GEODECIMAL"
  lnv_callercontextproperty[2].key = "CoordFormat"
 
    lnv_callercontext.wrappedproperties[2] = lnv_callercontextproperty[2]
 
  lnv_callercontextproperty[3].value=""
  lnv_callercontextproperty[3].key ="ProfileXMLSnippet"
 
    lnv_callercontext.wrappedproperties[3] = lnv_callercontextproperty[3]
 
// lnv_exceptionpath =  create ptvxexceptionpath
 

try
  
 lnv_reply=  lnv_ws.calculateroute( lnv_waypointdesc[],lnv_routingoption[],lnv_exceptionpath[], lnv_resultlistoptions , lnv_callercontextproperty[]  )


catch (throwable t)
  messagebox("fel vid kontakt med UC, kontakta IT-avdelningen",t.text)
 return -50
end try

Accepted Answer
Marco Meoni Accepted Answer Pending Moderation
  1. Friday, 14 September 2018 12:33 PM UTC
  2. PowerBuilder
  3. # Permalink

Hello Camilla,

you get error because last parameter in the function is a callercontext, not a callercontextproperty.

Best,

Marco

Comment
There are no comments made yet.
Camilla Wind Accepted Answer Pending Moderation
  1. Friday, 14 September 2018 14:27 PM UTC
  2. PowerBuilder
  3. # 1

Thank you.

 

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.