<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Following on from this, I had been in touch with the application vendor to see if they had an inkling as to why authentication seemed to be being 'dropped' who gave the following response:<div><br></div><div><blockquote type="cite"><defanghtml_span class="Apple-style-span"><div><div dir="ltr"><font face="Tahoma" color="#000000" size="2"><div defanghtml_style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><font face="Calibri" color="#1f497d"><em>We used to support this scenario via SOAP header(ie. obtain the soap header from authentication service and pass it to FO API call).  But we removed it awhile back. </em></font></div></font></div></div></defanghtml_span></blockquote><div><br></div>I don't know if this means that I HAVE to explicitly grab and pass a cookie (is there a method of doing this that doesn't use SOAP headers?) or whether any integration is possible at all. In anyone's experience, is it possible that a web service will only work with calls made from .NET applications? To say, that it defeats the object seems to be somewhat of an understatement!</div><div><br></div><div><br><div><div>On 21 Jul 2009, at 18:49, Jeff Ortel wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hey Chris,<br><br>Suds uses the cookielib CookieJar and places returned cookies in the jar and sends all cookies in the jar with outbound messages.  So, not sure why this doesn't work for you. Maybe someone else on the list who's used cookies with suds a little more can help.<br><br>Is it possible the user simply doesn't have permission (proper roles) to do what you want?<br><br>Regards,<br><br>Jeff<br><br>Chris Brogan wrote:<br><blockquote type="cite">Hi,<br></blockquote><blockquote type="cite">I have successfully managed to get suds up and running on my Plone instance and can consume a variety of services. However, I'm having trouble with authentication on a collection of services that seem to be .NET-centric and aren't playing nicely.<br></blockquote><blockquote type="cite">I'll try to explain this as clearly as possible so, please, bear with me:<br></blockquote><blockquote type="cite">Having imported suds and various libraries, the various the following works as expected:<br></blockquote><blockquote type="cite">client = Client('http:// <<a href="http://ukcolofiniis/">http://ukcolofiniis/</a>>servername/AppNet/Tools/ToolsWS/AuthenticationService.asmx?WSDL')<br></blockquote><blockquote type="cite">auth = client.service.Login(username='user',password='pass')<br></blockquote><blockquote type="cite">return auth<br></blockquote><blockquote type="cite"> >>> True<br></blockquote><blockquote type="cite">Similarly,<br></blockquote><blockquote type="cite">client = Client('http:// <<a href="http://ukcolofiniis/">http://ukcolofiniis/</a>>servername/AppNet/Tools/ToolsWS/AuthenticationService.asmx?WSDL')<br></blockquote><blockquote type="cite">client.service.Login(username='cms',password='123')<br></blockquote><blockquote type="cite">res = client.service.WhoAmI()<br></blockquote><blockquote type="cite">return res<br></blockquote><blockquote type="cite"> >>> user<br></blockquote><blockquote type="cite">So, all is well there...I can successfully connect and log in.<br></blockquote><blockquote type="cite">Moving on to the other web services (same server), I can can information about them via:<br></blockquote><blockquote type="cite">        client = Client('http:// <<a href="http://ukcolofiniis/">http://ukcolofiniis/</a>>servername/AppNet/Tools/ToolsWS/AuthenticationService.asmx?WSDL')<br></blockquote><blockquote type="cite">        client.service.Login(username='cms',password='123')<br></blockquote><blockquote type="cite">        client.service.WhoAmI()<br></blockquote><blockquote type="cite">        client = Client('http://u <<a href="http://ukcolofiniis/">http://ukcolofiniis/</a>>servername/AppNet/Time/TimeWS/ActionService.asmx?wsdl')                return client<br></blockquote><blockquote type="cite"> >>><br></blockquote><blockquote type="cite">Suds ( <a href="https://fedorahosted.org/suds/">https://fedorahosted.org/suds/</a> )  version: 0.3.6 GA  build: R526-20090624<br></blockquote><blockquote type="cite">Service ( ActionService ) tns="<a href="http://cmsopen.com/">http://cmsopen.com/</a>"<br></blockquote><blockquote type="cite">   Prefixes (1)<br></blockquote><blockquote type="cite">      ns0 = "<a href="http://cmsopen.com/">http://cmsopen.com/</a>"<br></blockquote><blockquote type="cite">   Ports (2):<br></blockquote><blockquote type="cite">      (ActionServiceSoap)<br></blockquote><blockquote type="cite">         Methods (2):<br></blockquote><blockquote type="cite">            Read(xs:string filter, )<br></blockquote><blockquote type="cite">            ReadSingle(xs:string actionCode, )<br></blockquote><blockquote type="cite">         Types (3):<br></blockquote><blockquote type="cite">            ActionData<br></blockquote><blockquote type="cite">            ActionDataBase<br></blockquote><blockquote type="cite">            ArrayOfActionData<br></blockquote><blockquote type="cite">      (ActionServiceSoap12)<br></blockquote><blockquote type="cite">         Methods (2):<br></blockquote><blockquote type="cite">            Read(xs:string filter, )<br></blockquote><blockquote type="cite">            ReadSingle(xs:string actionCode, )<br></blockquote><blockquote type="cite">         Types (3):<br></blockquote><blockquote type="cite">            ActionData<br></blockquote><blockquote type="cite">            ActionDataBase<br></blockquote><blockquote type="cite">            ArrayOfActionData<br></blockquote><blockquote type="cite">This provides information relating to the available services and the result is obviously the same with or without the first 3 lines of authenticating code as nothing of any importance is being asked.<br></blockquote><blockquote type="cite">However, when I try to do something useful with the services ...eg:<br></blockquote><blockquote type="cite">        client = Client('http:// <<a href="http://ukcolofiniis/">http://ukcolofiniis/</a>>servername/AppNet/Tools/ToolsWS/AuthenticationService.asmx?WSDL')<br></blockquote><blockquote type="cite">        client.service.Login(username='cms',password='123')<br></blockquote><blockquote type="cite">        client.service.WhoAmI()<br></blockquote><blockquote type="cite">        client = Client('http:// <<a href="http://ukcolofiniis/">http://ukcolofiniis/</a>>servername/AppNet/Time/TimeWS/ActionService.asmx?wsdl')<br></blockquote><blockquote type="cite">        result = client.service.ReadSingle('0NCHG')<br></blockquote><blockquote type="cite">        return result<br></blockquote><blockquote type="cite">I get authentication errors...<br></blockquote><blockquote type="cite">Server raised fault: 'System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Security.SecurityException: Request for principal permission failed. at System.Security.Permissions.PrincipalPermission.ThrowSecurityException() at System.Security.Permissions.PrincipalPermission.Demand() at System.Security.PermissionSet.DemandNonCAS() at Solution6.Cio.Time.ActionService.ReadSingle(String actionCode) The action that failed was: Demand The type of the first permission that failed was: System.Security.Permissions.PrincipalPermission The first permission that failed was: <IPermission class="System.Security.Permissions.PrincipalPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1"> <Identity Authenticated="true" Role="ciouser"/> </IPermission> The demand was for: <IPermission class="System.Security.Permissions.PrincipalPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1"> <Identity Authenticated="true" Role="ciouser"/> </IPermission> The assembly or AppDomain that failed was: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 --- End of inner exception stack trace ---'<br></blockquote><blockquote type="cite">Now, this seems to be because when the AuthenticationService.asmx service is run in a .NET environment (which I know very little about!), the object is attributed with a cookie using CookieContainer which can then get passed into subsequent calls. However, there doesn't seem to be any transparent way to grab this cookie from the various authentication services (they tend to return booleans) so that I can then try to get to grips with trying to pass is to subsequent services so I'm pretty much stuck. Does anyone have any pointers?<br></blockquote><blockquote type="cite">Chris<br></blockquote><blockquote type="cite"><a href="http://www.begbies-traynorgroup.com">www.begbies-traynorgroup.com</a> <<a href="http://www.begbies-traynorgroup.com">http://www.begbies-traynorgroup.com</a>><br></blockquote><blockquote type="cite">CONFIDENTIALITY : This email and its attachments are confidential to the intended recipient.  They may not be used by, disclosed to or copied in any way to anyone other than the intended recipient. If this email is received in error, please contact Begbies Traynor Group IT Department on +44 (0)161 837 1837, provide details of the sender and the address to which it has been sent and then delete it. Opinions, conclusions and other statements and information in this message that do not relate to the official business of the legal entity which sent it or any other entity within the Begbies Traynor Group shall be understood as neither given nor endorsed by them.<br></blockquote><blockquote type="cite">VIRUSES : Although we have taken steps to ensure that this email and any attachments are free from any virus, it is your responsibility to check that they are actually virus free.  We do not accept any responsibility for viruses. This message has been scanned for viruses by MailControl.<br></blockquote><blockquote type="cite">------------------------------------------------------------------------<br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">fedora-suds-list mailing list<br></blockquote><blockquote type="cite"><a href="mailto:fedora-suds-list@redhat.com">fedora-suds-list@redhat.com</a><br></blockquote><blockquote type="cite"><a href="https://www.redhat.com/mailman/listinfo/fedora-suds-list">https://www.redhat.com/mailman/listinfo/fedora-suds-list</a><br></blockquote></div></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><font class="Apple-style-span" color="#38584F"><b>Chris Brogan</b></font></div><div>IT Development Manager</div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; ">Begbies Traynor Group plc</span></div><div>340 Deansgate, Manchester, M3 4LY</div><div><br></div><div>T: +44 (0)161 837 1700</div><div>F: +44 (0)161 837 1701</div><div>D: +44 (0)161 837 1844</div><div><font class="Apple-style-span" color="#38584F"><a href="http://www.begbies-traynorgroup.com">www.begbies-traynorgroup.com</a></font></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></div></body></html>