Consumer proxy by SAP

This space is dedicated to SAP users - administrators and programmers who want to integrate the xServers. Topics which require specific SAP based knowhow or which deal with SAP based mechanisms will be collected here.

Consumer proxy by SAP

Postby Fran » Tue Jun 20, 2017 8:18 am

Hello,

I'm trying to consume a web service with soapUI for:

1.- Calculate a Route
2.- Painting the route in the map (I have some problems here)

When it works correctly with soapUI i'm implementing consumer proxy in SAP.

To calculate Route using the operation calculateRoute from xRoute the XML requested is:

Code: Select all
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://types.xroute.xserver.ptvag.com" xmlns:xro="http://xroute.xserver.ptvag.com" xmlns:com="http://common.xserver.ptvag.com" xmlns:wrap="http://wrappertypes.service.jabba.ptvag.com" xmlns:bas="http://baseservices.service.jabba.ptvag.com">
   <soapenv:Header/>
   <soapenv:Body>
      <typ:calculateRoute>
         <typ:ArrayOfWaypointDesc_1>
            <!--Zero or more repetitions:-->
            <xro:WaypointDesc fuzzyRadius="0" linkType="AUTO_LINKING">
               <xro:wrappedCoords>
                  <!--Zero or more repetitions:-->
                  <com:Point>
                 
               <com:point x="2.205154" y="41.408409"/>
                  </com:Point>
               </xro:wrappedCoords>
            </xro:WaypointDesc>
            <xro:WaypointDesc fuzzyRadius="0" linkType="AUTO_LINKING">
               <xro:wrappedCoords>
                  <!--Zero or more repetitions:-->
                  <com:Point>
               <com:point x="2.213265" y="41.407335"/>
                  </com:Point>
               </xro:wrappedCoords>
               <xro:wrappedVehicleOptions>
                  <!--Zero or more repetitions:-->
                  <xro:VehicleOption parameter="TYPE" value="CAR"/>
               </xro:wrappedVehicleOptions>               
            </xro:WaypointDesc>
         </typ:ArrayOfWaypointDesc_1>
         <typ:ResultListOptions_4 binaryPathDesc="true" polygon="true" totalRectangle="true" detailLevel="ALL">
            <!--Optional:-->
            <xro:cenEmissionConfiguration/>
            <!--Optional:-->
            <xro:destDetail/>
            <!--Optional:-->
            <xro:emissions/>
            <!--Optional:-->
            <xro:hbefaType/>
            <!--Optional:-->
            <xro:startDetail/>
         </typ:ResultListOptions_4>
         <typ:CallerContext_5>
            <bas:wrappedProperties>
               <!--Zero or more repetitions:-->
               <bas:CallerContextProperty key="CoordFormat" value="OG_GEODECIMAL"/>
            </bas:wrappedProperties>
         </typ:CallerContext_5>
         
      </typ:calculateRoute>
   </soapenv:Body>
</soapenv:Envelope>


The response is:
Code: Select all
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns4:calculateRouteResponse xmlns:ns6="http://exception.core.jabba.ptvag.com" xmlns:ns2="http://baseservices.service.jabba.ptvag.com" xmlns:ns4="http://types.xroute.xserver.ptvag.com" xmlns:ns3="http://xroute.xserver.ptvag.com" xmlns:ns1="http://common.xserver.ptvag.com" xmlns:ns0="http://wrappertypes.service.jabba.ptvag.com">
         <ns4:result binaryPathDesc="qAAAACIAM1DIQLMAIgAzUMhAyAAiADNQyEDNACIANFDIQKQAIgA0UMhAmgAiADRQyEBLACIANFDIQFgAIgAzUMhAKgAiADNQyEAhACIAM1DJQH8AIgAzUMlAfQAiADNQyUBxACIAM1DJQG4AIgAzUMlAawAiADNQyUBoACIAM1DJQGEAIgAzUMlAWgAiADNQyUBMACIAM1DJQFAAIgAzUMlAVgAiADNQyUBqAA==">
            <ns3:wrappedBoundingRectangles xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
            <ns3:info cost="1699" time="143" distance="958"/>
            <ns3:wrappedManoeuvreGroup xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
            <ns3:wrappedManoeuvres xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
            <ns3:wrappedNodes xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
            <ns3:polygon>
               <ns1:lineString>
                  <ns1:wrappedPoints>
                     <ns1:PlainPoint y="41.408408096" x="2.2051317148"/>
                     <ns1:PlainPoint y="41.408992024" x="2.2059102735"/>
                     <ns1:PlainPoint y="41.409219105" x="2.2062562996"/>
                     <ns1:PlainPoint y="41.409770585" x="2.2069483517"/>
                     <ns1:PlainPoint y="41.409770585" x="2.206991605"/>
                     <ns1:PlainPoint y="41.410094983" x="2.2073808843"/>
                     <ns1:PlainPoint y="41.409770585" x="2.2078134169"/>
                     <ns1:PlainPoint y="41.409705705" x="2.2078566702"/>
                     <ns1:PlainPoint y="41.409640826" x="2.2079431767"/>
                     <ns1:PlainPoint y="41.409413746" x="2.2082459495"/>
                     <ns1:PlainPoint y="41.409251545" x="2.2085054691"/>
                     <ns1:PlainPoint y="41.408959583" x="2.2088947484"/>
                     <ns1:PlainPoint y="41.408732501" x="2.2091975212"/>
                     <ns1:PlainPoint y="41.408408096" x="2.2095868006"/>
                     <ns1:PlainPoint y="41.408181012" x="2.2098895734"/>
                     <ns1:PlainPoint y="41.407824164" x="2.2104086125"/>
                     <ns1:PlainPoint y="41.407532196" x="2.2107978918"/>
                     <ns1:PlainPoint y="41.406786049" x="2.2117927168"/>
                     <ns1:PlainPoint y="41.406656283" x="2.2119224766"/>
                     <ns1:PlainPoint y="41.406526517" x="2.2121387429"/>
                     <ns1:PlainPoint y="41.406494076" x="2.2121387429"/>
                  </ns1:wrappedPoints>
               </ns1:lineString>
            </ns3:polygon>
            <ns3:wrappedSegments xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
            <ns3:wrappedStations>
               <ns3:WayPoint countryCode="" wayPointType="START" manoeuvreIdx="0" segmentIdx="0" nodeIdx="0" polyIdx="0" iuCode="34" accDist="0" accTime="0">
                  <ns3:locationCoord>
                     <ns1:point y="41.408408096" x="2.2051317148"/>
                  </ns3:locationCoord>
                  <ns3:matchCoord>
                     <ns1:point y="41.408416905" x="2.2051434599"/>
                  </ns3:matchCoord>
               </ns3:WayPoint>
               <ns3:WayPoint countryCode="" wayPointType="DEST" manoeuvreIdx="17" segmentIdx="17" nodeIdx="20" polyIdx="20" iuCode="34" accDist="827" accTime="130">
                  <ns3:locationCoord>
                     <ns1:point y="41.407305108" x="2.2132633276"/>
                  </ns3:locationCoord>
                  <ns3:matchCoord>
                     <ns1:point y="41.406508395" x="2.2121629052"/>
                  </ns3:matchCoord>
               </ns3:WayPoint>
            </ns3:wrappedStations>
            <ns3:wrappedTexts xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
            <ns3:totalRectangle>
               <ns3:leftBottom>
                  <ns1:point y="41.406494076" x="2.2051317148"/>
               </ns3:leftBottom>
               <ns3:rightTop>
                  <ns1:point y="41.410094983" x="2.2121387429"/>
               </ns3:rightTop>
            </ns3:totalRectangle>
         </ns4:result>
      </ns4:calculateRouteResponse>
   </soap:Body>
</soap:Envelope>


For painting a map tried using xMap operation renderMapBoundingBox i pass the leftBottom and rightTop from calculateRoute to renderMapBoundingBox.

The requested is:

Code: Select all
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://types.xmap.xserver.ptvag.com" xmlns:com="http://common.xserver.ptvag.com" xmlns:wrap="http://wrappertypes.service.jabba.ptvag.com" xmlns:xmap="http://xmap.xserver.ptvag.com" xmlns:bas="http://baseservices.service.jabba.ptvag.com">
   <soapenv:Header/>
   <soapenv:Body>
      <typ:renderMapBoundingBox>
         <typ:BoundingBox_1>
            <!--Optional:-->
            <com:leftTop>
             
               <com:point y="41.406494076" x="2.2051317148"/>
            </com:leftTop>
            <!--Optional:-->
            <com:rightBottom>
               <com:point y="41.410094983" x="2.2121387429"/>
            </com:rightBottom>
         </typ:BoundingBox_1>
         <typ:MapParams_2 language="ES" showScale="true" useMiles="false"/>
         <typ:ImageInfo_3 format="GIF" height="1400" width="2840" />
     
         <typ:boolean_5>false</typ:boolean_5>
         <typ:CallerContext_6>
            <bas:wrappedProperties>
               <!--Zero or more repetitions:-->
               <bas:CallerContextProperty key="CoordFormat" value="OG_GEODECIMAL"/>
            </bas:wrappedProperties>
         </typ:CallerContext_6>
      </typ:renderMapBoundingBox>
   </soapenv:Body>
</soapenv:Envelope>


And the response is:

Code: Select all
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns4:renderMapBoundingBoxResponse xmlns:ns6="http://exception.core.jabba.ptvag.com" xmlns:ns3="http://baseservices.service.jabba.ptvag.com" xmlns:ns4="http://types.xmap.xserver.ptvag.com" xmlns:ns2="http://xmap.xserver.ptvag.com" xmlns:ns1="http://common.xserver.ptvag.com" xmlns:ns0="http://wrappertypes.service.jabba.ptvag.com">
         <ns4:result>
            <ns2:image url="ims-eu-n-test.cloud.ptvgroup.com/IMS/CZWJQLIZJAHWLFAEM/0810-9848/1617247266-01804.gif?InstanceID=0"/>
            <ns2:wrappedObjects/>
            <ns2:visibleSection scale="7">
               <ns2:boundingBox>
                  <ns1:leftTop>
                     <ns1:point y="41.410094983" x="2.2037655303"/>
                  </ns1:leftTop>
                  <ns1:rightBottom>
                     <ns1:point y="41.406494076" x="2.2135049274"/>
                  </ns1:rightBottom>
               </ns2:boundingBox>
               <ns2:center>
                  <ns1:point y="41.408294554" x="2.2086352289"/>
               </ns2:center>
            </ns2:visibleSection>
         </ns4:result>
      </ns4:renderMapBoundingBoxResponse>
   </soap:Body>
</soap:Envelope>


The IMG is attached in post. But how i pass the route from Xroute to Xmap to painting it?

Thz for all.
Attachments
20-06-2017 10-13-19.gif
Map
Fran
 
Posts: 1
Joined: Tue Jun 20, 2017 6:24 am

Re: Consumer proxy by SAP

Postby MISTERX » Tue Jun 20, 2017 8:43 am

Dear Fran

please move your post/question to xMap-Forum, as your question is not SAP related.

Just a quick glance:
xMap doesn't know anything about (last) routing by xRoute.

You have to take the route (waypoints) from your xRoute response and to add this to your xMap request as addition.

Please refer to the xMap-API or examples of xMap-RawRequestRunner to see how to add objects to rendered map (e.g. POIs, routes etc.).

Kind Regards
Mr. X
  • Integration PTV <> SAP
  • Senior Consultant
________________________________________________

Optimism is only a lack of data!
User avatar
MISTERX
 
Posts: 27
Joined: Mon Jun 02, 2014 11:50 am

Re: Consumer proxy by SAP

Postby Asterix » Tue Jun 20, 2017 10:02 am

Hello Fran, MisterX,

I've been told by sales that Fran probably uses the ABAT connectors.
So maybe we could answer his concrete SAP related demand considering the components in use.

From a generic perspective I agree with MisterX:
Probably it is a good idea to have a look at the level of access. Is it really about SAP technology stack? Then future posts are ok in this category.
If it is more a generic xServer topic dealing with raw parametrising of generic requests we should focus on the proper subforum.

Coming back to the current question. You have various options to visualize geometries on a map (polylines, polygones, points...):
  • using native xMap layers scuch as CustomLayer or GeometryLayer. The image returned by xMap then contains the additional geometry. Usually on top of the streets and towns. This approach is becoming less and less popular.
  • nowadays the xMap server is more a backend service that returns a map based on streets, towns and core objects such as forrests, rivers, mountains. The additional geometries are then painted on top via a layer technology that is maintained outside the xServer itself. So for example by using web based frameworks such as OpenLayers, Leaflet or the PTV ajaxmaps.

Get in touch with me 1:1 in case of further need of kickoff help.

Best regards
Bernd
Bernd Welter
Manager Technical Consulting & Requirement Engineering
Senior Technical Consultant Developer Components
PTV GROUP - Germany

https://www.youtube.com/channel/UCgkUli9yGf0gwTDdxbMZ-Kg
User avatar
Asterix
Site Admin
 
Posts: 740
Joined: Mon Apr 14, 2014 10:28 am

Re: Consumer proxy by SAP

Postby MISTERX » Tue Jun 20, 2017 10:26 am

Dear Fran,
dear Bernd

sorry my answer was perhaps a little bit crispy!

I didn't take into account that behind the scenes the abat-connector might be in use. It's always not easy to determine who's behind the user name :oops:

My sincere apologizes

Rolf

@Bernd: Thanks for your hints!
Mr. X
  • Integration PTV <> SAP
  • Senior Consultant
________________________________________________

Optimism is only a lack of data!
User avatar
MISTERX
 
Posts: 27
Joined: Mon Jun 02, 2014 11:50 am


Return to PTV xServer meets SAP

cron