#29 ZSI Digest Authentication implementaion for ProxyServices

closed-accepted
zsi (12)
7
2005-09-22
2005-09-14
No

Usage example (MapPoint SOAP Services):

from CommonService_services import *
loc = FindServiceLocator()
import sys
import ZSI
kw={'tracefile':sys.stdout, 'auth' : (
ZSI.AUTH.httpdigest, 'username', 'passwd') }
portType = loc.getFindServiceSoap(**kw)

AddressLine='Lergravsvej 28'
PostalCode='8660'
CountryRegion='DK'
InputAddress = ns1.Address_Def()
InputAddress._AddressLine = AddressLine
InputAddress._PostalCode = PostalCode
InputAddress._CountryRegion = CountryRegion

specification = ns1.FindAddressSpecification_Def()
specification._InputAddress = InputAddress
specification._DataSourceName = 'MapPoint.EU'
request = FindAddressSoapInWrapper()

request._specification = specification

res = portType.FindAddress(request)

Discussion

  • Keith Jackson

    Keith Jackson - 2005-09-14

    Logged In: YES
    user_id=711889

    This looks great, but you need to submit a real patch file if you want to see
    your change make it into the project. We have too many things to do to
    spend time dealing with non-standard patches. Please see; http://
    unxutils.sourceforge.net/ for a diff command that will generate real patch
    files on win32.
    --keith

     
  • Keith Jackson

    Keith Jackson - 2005-09-14
    • labels: --> zsi
    • assigned_to: nobody --> boverhof
     
  • Jakob Simon-Gaarde

    Logged In: YES
    user_id=1341797

    Hi Keith.

    Right, here is the patch-file.
    I don't know how to create a patch that adds new files so
    the new digest_auth.py which is required you have to copy
    from the previous attachment.

    Note that have made a little change in wsdl2python.py too.
    There is a problem when wsdl specifications include untyped
    properties (wsdl2python, try for instance
    http://staging.mappoint.net/standard-30/mappoint.wsdl\) w3c
    specify untyped properties to be AnyType, so that's what I
    have patched it to do.

    Best Regards
    Jakob Simon-Gaarde

     
  • Jakob Simon-Gaarde

    • priority: 5 --> 7
     
  • Jakob Simon-Gaarde

    Logged In: YES
    user_id=1341797

    Just to follow up on the wsdl2python problem I mentioned,
    here is the thing: (from
    http://staging.mappoint.net/standard-30/mappoint.wsdl\)

    <s:complexType name="EntityPropertyValue">
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="Name"
    type="s:string"/>
    <s:element minOccurs="0" maxOccurs="1" name="Value"/>
    </s:sequence>
    </s:complexType>

    The element name="Value" is untyped, that must result in an
    AnyType type.

    Best Regards
    Jakob Simon-Gaarde

     
  • Jakob Simon-Gaarde

    Logged In: YES
    user_id=1179865

    I have created a patch "digest_auth-20050918.patch" compared
    with the cvs version og ZSI.
    Please commit the changes soon, before client.py is changed
    again.

    Thanks.

     
  • Jakob Simon-Gaarde

    The digest_auth module needed by the patch

     
    Attachments
  • Jakob Simon-Gaarde

    patch against cvs (2005-09-18)

     
  • Joshua Boverhof

    Joshua Boverhof - 2005-09-19

    Logged In: YES
    user_id=711996

    ERROR

    ArtifactFile: Invalid ArtifactFile ID

    When I try to download digest_auth.py I keep getting this error.

     
  • Nobody/Anonymous

    Logged In: NO

    It's a python/txt file, how can you not download it!?

    I have had three people download it with no problem, all
    using Firefox.

    Best regards Jakob

     
  • Joshua Boverhof

    Joshua Boverhof - 2005-09-20

    Logged In: YES
    user_id=711996

    Because the sourceforge site was having problems.

    It just downloaded, sometimes this just happens and it's confusing.

     
  • Jakob Simon-Gaarde

    Logged In: YES
    user_id=1341797

    Hi Joshua.

    I forgot to mention that the changes I had made on
    wsdl2python.py are no longer required (pulled out of the
    patchfile), the problem seem to have been corrected in the
    latest version on CVS.

    Best regards Jakob

     
  • Nobody/Anonymous

    Logged In: NO

    I have tested it against mappoint, it seems to be working just
    fine. Now the digest problem is solved. When you get your
    account to MapPoint you might want to try to calculate a route. If
    you do do you will experience the following error:

    Traceback (most recent call last):
    File "findservice.py", line 67, in ?
    calculateRoute([loc1,loc2],sys.stdout)
    File "findservice.py", line 58, in calculateRoute
    routeService.CalculateRoute(routeSpec)
    File
    "/home/SVINEHUSET/jsg/dev/mappoint/CommonService_services.py",
    line 1560, in CalculateRoute
    response =
    self.binding.Receive(CalculateRouteSoapOutWrapper())
    File "/usr/lib/python2.3/site-packages/ZSI/client.py", line 427, in
    Receive
    return self.ps.Parse(tc)
    File "/usr/lib/python2.3/site-packages/ZSI/parse.py", line 311, in
    Parse
    return how.parse(self.body_root, self)
    File "/usr/lib/python2.3/site-packages/ZSI/TCcompound.py",
    line 111, in parse
    raise e
    ZSI.EvaluateException:
    CalculateRouteResponse._CalculateRouteResult:
    CalculateRouteResult._Specification: Specification._Segments:
    Segments._SegmentSpecification:
    SegmentSpecification._Waypoint: Waypoint._Snap: Any cannot
    parse untyped element
    [Element
    trace: /soap:Envelope/soap:Body/CalculateRouteResponse/CalculateRouteResult/Specification/Segments/SegmentSpecification[1]/Waypoint/Snap]

    This is beyond the digest problem, and the next problem to
    address in order to get MapPoint working. All other MapPoint
    functions I have tried works find (like address matching, version
    info etc.).

    Would you like to help out so ZSI can be promoted as MapPoint
    compliant?

     
  • Jakob Simon-Gaarde

    Logged In: YES
    user_id=1341797

    BTW: I have attached a script that calculates the route
    (findservice.py - just add your digest credentiels) thereby
    provoking the error mentioned before.

    I will submit this to the bugtracker. But as I said, it
    would be nice
    with another pair of eyes on this subject. Being MapPoint
    compliant is great advertisement for ZSI.

     
  • Jakob Simon-Gaarde

    Provoke error

     
    Attachments
  • Joshua Boverhof

    Joshua Boverhof - 2005-09-22
    • status: open --> closed-accepted
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks