Page 1 of 1

Java Sample not working

Posted: Mon Oct 19, 2015 3:17 pm
by egeschwinde
Hi,

I'm evaluating the PTV Xserver Internet and I found following Code Sample on this link
http://xserver.ptvgroup.com/dk/cookbook ... d-classes/

I generate with mvn and it generates me a jar file.
The problem what I have is when I try to use the test class the classes
import com.ptvag.jabba.service.baseservices.ArrayOfCallerContextProperty;
import com.ptvag.jabba.service.baseservices.CallerContext;
import com.ptvag.jabba.service.baseservices.CallerContextProperty;
import com.ptvag.xserver.common.ArrayOfPoint;
import com.ptvag.xserver.common.PlainPoint;
import com.ptvag.xserver.common.Point;
import com.ptvag.xserver.xroute.ArrayOfWaypointDesc;
import com.ptvag.xserver.xroute.LinkType;
import com.ptvag.xserver.xroute.ResultListOptions;
import com.ptvag.xserver.xroute.Route;
import com.ptvag.xserver.xroute.WaypointDesc;
import com.ptvag.xserver.xroute.jwsdp.XRouteWS;

Are invalid and missing - from my view it should generate the WSDL with maven or am i missing something here (another Jar maybe) ?

Regards
Ewald Geschwinde

Re: Java Sample not working

Posted: Mon Oct 26, 2015 11:34 am
by Oliver Heilig
Hello Ewald,

we have a more detailed guide for generating java clients from WSDL here:

http://devblog.ptvgroup.com/2013/01/23/ ... -xservers/

It describes the practices with a local xServer, but it should also work with xServer intenet if you replace the url by https://xroute-eu-n-test.cloud.ptvgroup ... Route?WSDL

Unlike C#, generating Java classes from a WSDL is generally a bit cumbersome, so we recommend using the Java client classes that can be downloaded. Se here for a tutorial:

http://xserver.ptvgroup.com/de/cookbook ... lications/

Best regards

Oliver

Re: Java Sample not working

Posted: Mon Oct 26, 2015 12:29 pm
by Bernd Welter
Not sure whether our samples cover "retrieving the WSDL with authentification"... anyhow: you should be able
  • to download the WSDL file using your token
  • store it locally
  • create the clients on a local basis

Usually the URLs of the services are part of the applications later configuration e.g. because you develop with TEST url and redirect the application for PRODUCTION afterwards.

Best regards Bernd