Hi, I am trying from past 3 weeks and going round the circles no joy connecting to https web service
Please see the attached sample project http://monotouch.2284126.n4.nabble.com/file/n4655633/ipad12Mono.zip ipad12Mono.zip tried to contact support : got the below sets .. but, I could not work out the process... Please type your reply at the top of the email... Bryan Moulton JUN 28, 2012 | 08:59PM EDT Uma, I would recommend using a network monitor on the host machine to watch how your header is being created. Also, you need to parse the stream like an XML document and INSERT the authorization sections only. Most of the soap headers are created automatically. Also, your web reference is incomplete. You need to use the Add Web Reference dialog in MonoDevelop, which will create a References.cs file. Add the attribute to these methods. Thanks! -Bryan ---------------------- Please, rate my reply: http://nicereply.com/xamarin/16386693/12827 Uma JUN 27, 2012 | 10:37AM EDT Hi Bryan, I tried many many ways, no success. Please find the project attached. I have created a soapExtenstion and soapExtensionAttributes and [customSoapHeader] to attach on top of each web method. Please help to fix this. Thanks Uma ________________________________ From: Xamarin Support <[email protected]> To: [email protected] Sent: Thursday, 21 June 2012, 2:59 Subject: Re: "Invalid Security Header" error Bryan Moulton JUN 21, 2012 | 09:59PM EDT Uma, It looks like you'll have to manually add the ttauth header. I've found a few good articles on how to do that: http://msdn.microsoft.com/en-us/library/ms972353.aspx http://msdn.microsoft.com/en-us/library/system.web.services.protocols.soapextension.aspx http://forums.asp.net/t/1137408.aspx You'll need two subclasses: SoapExtension and SoapExtensionAttribute. Your SoapExtension will handle the data stream, while the SoapExtensionAttribute should be applied to all the web methods in the References.cs file. I hope this gives you a little more to work with. Sounds like a tricky situation. Let me know if I can help you further. Thanks! -Bryan Uma JUN 18, 2012 | 11:00AM EDT Hi Bryan, following last email I send you, please find the below soap header format 3rd party company (timetrade.com) requests..., please send me a code to include in my project. Many thanks Uma <S:Envelopexmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuritysecext- 1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurityutility- 1.0.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <S:Header> <ttauth:authHeaderxmlns:ttauth="http://timetrade.timecommerce/services"> <ttauth:Accessuserxmlns:ttauth="http://timetrade.timecommerce/services"> ApiUserFor136 </ttauth:Accessuser> <ttauth:Accesscodexmlns:ttauth="http://timetrade.timecommerce/services"> testing </ttauth:Accesscode> </ttauth:authHeader> <wsse:SecurityS:mustUnderstand="1"> <wsse:UsernameToken xmlns:ns14="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512" xmlns:ns13="http://www.w3.org/2003/05/soap-envelope" wsu:Id="uuid_b4cff845-bbd9-4b21-a0ea-63635fe443d8"> <wsse:Username>APIUSER136</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wssusername- token-profile-1.0#PasswordText">testingws</wsse:Password> <wsse:UsernameToken> </wsse:Security> </S:Header> <S:Body> <ns2:getAppointmentByConfirmationNumber xmlns:ns2="http://timetrade.timecommerce/services/ws" xmlns:ns3="http://timetrade.timecommerce/services/appointment"> <confirmationNumber>VBZ2S49W</confirmationNumber> </ns2:getAppointmentByConfirmationNumber> </S:Body> </S:Envelope> ________________________________ From: Xamarin Support <[email protected]> To: [email protected] Sent: Sunday, 17 June 2012, 22:35 Subject: Re: "Invalid Security Header" error Uma JUN 18, 2012 | 05:37AM EDT Hi Bryan, No, it is a 3rd party company called http://www.timetrade.com/ who provide the appointment system. My plan was to implement Monotouch with Resco Weekly Schedule (3rd party ios control) which supports monotouch - suits my senerio perfectly. problem is connecting timetrade.com web services. please help. Thanks Uma Jayaraman ________________________________ From: Xamarin Support <[email protected]> To: [email protected] Sent: Sunday, 17 June 2012, 22:35 Subject: Re: "Invalid Security Header" error Bryan Moulton JUN 17, 2012 | 05:35PM EDT Hi Uma, Do you have access to the web service itself? In order for that to work you would have to change the service methods/contracts. -Bryan Uma JUN 17, 2012 | 05:00PM EDT Hi Bryan, This is the URL which I will be calling : : https://nc1devapi3.timetradesystems.com:443/tc/api/2.0/AppointmentServices?wsdl using monodevelop in Mac envoronment it is SOAP call. Can you please provide me the code to make the call how to send username and password for SOAP header for each request. it will be help full. I'm trying form past 4 days .. not getting the way around... Thanks and regards, Uma ________________________________ From: Xamarin Support <[email protected]> To: [email protected] Sent: Sunday, 17 June 2012, 21:09 Subject: Re: "Invalid Security Header" error Bryan Moulton JUN 17, 2012 | 04:09PM EDT Hello Uma, I've done some research and may have some bad news for you. I've found the process for using SOAP security in .NET here: http://msdn.microsoft.com/en-us/library/ms819938.aspx But this relies on a Microsoft library that isn't supported by the Mono framework. I'm assuming you're using WCF for your web service? An alternative would be to send the credentials with every request as a parameter. Or, call a login function that will generate a token or hash that can be used to send with every request. Since you're using SSL this might not be a concern. Let me know if this answers your question. Thanks! -Bryan Uma JUN 17, 2012 | 09:51AM EDT Original message Hi Support, Monotouch everything latest updated. I am trying to connect to https SOAP web service with username and password auth, getting "Invalid Security Header" error please help. url is : https://nc1devapi3.timetradesystems.com:443/tc/api/2.0/AppointmentServices?wsdl copied the client reference files from silverlight project in to mono develop and don't understand how to pass the username and password to SOAP security header. ttApptWS.AppointmentServices ap = new ttApptWS.AppointmentServices(); ap.getAPIVersion(); ap.ClientCredientials --????? does not exist to setup the username and password please help. Thanks Uma -- View this message in context: http://monotouch.2284126.n4.nabble.com/connecting-to-web-services-major-problem-tp4655633.html Sent from the MonoTouch mailing list archive at Nabble.com. _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
