Search Results

Search found 645 results on 26 pages for 'webservices'.

Page 3/26 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • using dictionaries with WebServices

    - by umit-alba
    Hi! I tried to pass a dictionary via WebServices. However it is not serializeable. So i wrote an Own Class that makes it serializeable: using System; using System.Net; using System.Windows; using System.Collections.Generic; using System.Xml.Serialization; using System.Xml; using System.Xml.Schema; namespace Platform { public class SaDictionary<TKey, TValue> : Dictionary<TKey, TValue>, IXmlSerializable { #region Constructors public SaDictionary() : base() { } public SaDictionary(IDictionary<TKey, TValue> dictionary) : base(dictionary) { } public SaDictionary(IEqualityComparer<TKey> comparer) : base(comparer) { } public SaDictionary(int capacity) : base(capacity) { } public SaDictionary(IDictionary<TKey, TValue> dictionary, IEqualityComparer<TKey> comparer) : base(dictionary, comparer) { } public SaDictionary(int capacity, IEqualityComparer<TKey> comparer) : base(capacity, comparer) { } //protected SaDictionary(SerializationInfo info, StreamingContext context) // : base(info, context) //{ //} #endregion public XmlSchema GetSchema() { return null; } public void ReadXml(XmlReader reader) { XmlSerializer keySerializer = new XmlSerializer(typeof(TKey)); XmlSerializer valueSerializer = new XmlSerializer(typeof(TValue)); bool wasEmpty = reader.IsEmptyElement; reader.Read(); if (wasEmpty) return; while (reader.NodeType != XmlNodeType.EndElement) { reader.ReadStartElement("item"); reader.ReadStartElement("key"); TKey key = (TKey)keySerializer.Deserialize(reader); reader.ReadEndElement(); //key reader.ReadStartElement("value"); TValue value = (TValue)valueSerializer.Deserialize(reader); reader.ReadEndElement(); //value this.Add(key, value); reader.ReadEndElement(); //item // reader.MoveToContent(); } reader.ReadEndElement(); } public void WriteXml(XmlWriter writer) { XmlSerializer keySerializer = new XmlSerializer(typeof(TKey)); XmlSerializer valueSerializer = new XmlSerializer(typeof(TValue)); foreach (TKey key in this.Keys) { writer.WriteStartElement("item"); writer.WriteStartElement("key"); keySerializer.Serialize(writer, key); writer.WriteEndElement(); //key writer.WriteStartElement("value"); TValue value = this[key]; valueSerializer.Serialize(writer, value); writer.WriteEndElement(); //value writer.WriteEndElement(); //item } } } } However i get an ArrayOfXElement back. Is there a way to cast it back to a Dictionary? greets

    Read the article

  • JAX-WS, webservices (Spring) issue

    - by vinay
    Hi All, I have written web services and configured with spring framework but I am getting exception when invoking services. Exceptions stack trace are given below - com.sun.xml.ws.server.sei.EndpointMethodHandler invoke SEVERE: object is not an instance of declaring class java.lang.IllegalArgumentException: object is not an instance of declaring class at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jvnet.jax_ws_commons.spring.SpringService$1$1.invoke(SpringServic e.java:185) at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:152) at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethod Handler.java:264) at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTub e.java:93) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:604) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:563) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:548) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:445) at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:27 5) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdap ter.java:454) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:250 ) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAd apter.java:140) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServl etDelegate.java:129) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServ letDelegate.java:160) at com.sun.xml.ws.transport.http.servlet.WSSpringServlet.doPost(WSSpring Servlet.java:52) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run (StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri tyHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav a:292) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav a:175) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio n.run(WebAppServletContext.java:3594) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate dSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java: 121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS ervletContext.java:2202) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC ontext.java:2108) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j ava:1432) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) Mar 31, 2010 3:47:20 PM com.sun.xml.ws.server.sei.EndpointMethodHandler invoke SEVERE: object is not an instance of declaring class java.lang.IllegalArgumentException: object is not an instance of declaring class at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jvnet.jax_ws_commons.spring.SpringService$1$1.invoke(SpringServic e.java:185) at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:152) at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethod Handler.java:264) at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTub e.java:93) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:604) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:563) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:548) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:445) at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:27 5) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdap ter.java:454) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:250 ) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAd apter.java:140) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServl etDelegate.java:129) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServ letDelegate.java:160) at com.sun.xml.ws.transport.http.servlet.WSSpringServlet.doPost(WSSpring Servlet.java:52) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run (StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri tyHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav a:292) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav a:175) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio n.run(WebAppServletContext.java:3594) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate dSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java: 121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS ervletContext.java:2202) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC ontext.java:2108) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j ava:1432) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) i am testing our services using SOAP UI and getting above mentioed exception. I think some how the object creation from the xml is not acceptable to webservices I am confused what is happening

    Read the article

  • performing authorisation/authentication between webservices

    - by mary
    Hi, i am developing webservices.In that i want to maintain state information so that all WebMethods could be access only after Login. I have tried but getting problem. I am attaching my code. Any other alternative will also be welcomed. [ WebService(Namespace = "http://amSubfah.org/")] [ WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. // [System.Web.Script.Services.ScriptService] public class Login : System.Web.Services.WebService { Message msgObj = new Message(); BaseClass b = new BaseClass(); PasswordEncryptionDecryption pedObj = new PasswordEncryptionDecryption(); public AuthHeader Authentication=new AuthHeader (); public Login () { //Uncomment the following line if using designed components //InitializeComponent(); } [ SoapHeader("Authentication", Required = true)] [System.Web.Services. WebMethod(EnableSession = true)] public string checkUserLogin(string user, string pwd) { DataSet dsLogin = new DataSet(); List sqlParams = new List(); SqlParameter sqlParam1 = new SqlParameter("@UserName", SqlDbType.NVarChar); sqlParam1.Value = user; sqlParams.Add(sqlParam1); SqlParameter sqlParam2 = new SqlParameter("@Password", SqlDbType.NVarChar); string pass = pedObj.encryptPassword(pwd); sqlParam2.Value = pass; sqlParams.Add(sqlParam2); try { b.initializeDBConnection(); dsLogin = b.execSelectLoginQuery( Query.strSelectLoginData, sqlParams); } catch (SqlException sqlEx) { string str = msgObj.msgErrorMessage + sqlEx.Message + sqlEx.StackTrace; } {if ((dsLogin != null) && (dsLogin.Tables[0].Rows.Count != 0)) { Session[ "username"] = user; string sessionId = System.Guid.NewGuid().ToString(); Authentication.sessionId = sessionId; Authentication.Username = user; return msgObj.msgLoginSuccess; } else return msgObj .msgLoginFail ; } //webmethod for registration [ SoapHeader("Authentication", Required = true)] [System .Web .Services . WebMethod (EnableSession =true )] public string insertRegistrationDetails(string fName,string lName,string email,string pwd) { //string u = Session["username"].ToString(); //if (u == "") //{ // //checkUserLogin(fName,pwd ); // return "Please login first"; //} if (Authentication.Username == null || Authentication.sessionId == null) { return "Please Login first"; } List sqlParams = new List(); int insert = 0; string msg = "" ; SqlParameter sqlParam = new SqlParameter("@FName", SqlDbType.NVarChar); sqlParam.Value = fName; sqlParam.Size = 50; sqlParams.Add(sqlParam); SqlParameter sqlParam1 = new SqlParameter("@LName", SqlDbType.NVarChar); sqlParam1.Value = lName; sqlParam1.Size = 50; sqlParams.Add(sqlParam1); SqlParameter sqlParam5 = new SqlParameter("@Email", SqlDbType.NVarChar); sqlParam5.Value = email; sqlParam5.Size = 50; sqlParams.Add(sqlParam5); SqlParameter sqlParam7 = new SqlParameter("@Password", SqlDbType.NVarChar); sqlParam7.Value = pedObj .encryptPassword (pwd); sqlParam7.Size = 50; sqlParams.Add(sqlParam7); try { b.initializeDBConnection(); insert = b.execByKeyParams( Query.strInsertIntoRegistrationTable1, sqlParams); if (insert !=0) { msg = msgObj .msgRecInsertedSuccess ; } } catch (SqlException sqlEx) { string str = msgObj.msgErrorMessage + sqlEx.Message + sqlEx.StackTrace; } return msg; } public class AuthHeader : SoapHeader { public string Username; public string sessionId; } }

    Read the article

  • problems calling webservices through the https connection

    - by shivaji123
    i have done an application in BlackBerry which takes username & password with url link which is a link of server here i am calling some webservices but it is doing the connection in https so when i take the username password & url link & hit the login button it basically calls a webservice but then the application connecting to the webservice for ever & after some time i get the error massage something "unreported exception the application is not responding" .& then the application crashes out.Also i am using the SOAP client library . this is the piece of code synchronized (this) { try { _httpconn = (HttpConnection) Connector.open(url,Connector.READ_WRITE);//Connector.READ_WRITE //_httpconn =(StreamConnection)Connector.open(url); //System.out.println("-----------httpsconnection() PART--------------------"); _httpconn.setRequestMethod(HttpConnection.POST); //_httpconn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); //System.out.println("-----------httpsconnection() PART- **-------------------"); _httpconn.setRequestProperty("SOAPAction", Constants.EXIST_STR); //System.out.println("-----------httpsconnection() PART-REQUEST -------------------"); _httpconn.setRequestProperty("Content-Type", "text/soap+xml"); //System.out.println("-----------httpsconnection() PART- CONTENT-------------------"); _httpconn.setRequestProperty("User-Agent", "kSOAP/1.0"); //System.out.println("-----------httpsconnection() PART-USER Agent-------------------"); String clen = Integer.toBinaryString(input.length()); _httpconn.setRequestProperty("Content-Length", clen); //System.out.println("-----------httpsconnection() Content-Length--------------------"); _out = _httpconn.openDataOutputStream(); //System.out.println(input+"-----------input--------------------"+url); _out.write(input.getBytes()); _out.flush(); // may or may not be needed. //int rc = _httpconn.getResponseCode(); int rc = _httpconn.getResponseCode(); if(rc == HttpConnection.HTTP_OK) { isComplete = true; _in = _httpconn.openInputStream(); msg = new StringBuffer(); byte[] data = new byte[1024]; int len = 0; int size = 0; while ( -1 != (len = _in.read(data)) ) { msg.append(new String(data, 0, len)); size += len; } responsData = msg.toString(); System.out.println("-----------responsData "+responsData); } if(responsData!=null) isSuccessful = true; stop(); } catch (InterruptedIOException interrIO) { //errStr = "Network Connection hasn't succedded. "+ //"Please check APN setting."; UiApplication.getUiApplication().invokeLater(new Runnable() { public void run() { Status.show("Network Connection hasn't succedded. "+ "Please try again later."); } }); isComplete = true; System.out.println(interrIO); stop(); } catch (IOException interrIO) { System.out.println("-----------IO EXCEPTION--------- "+interrIO); //errStr = "Network Connection hasn't succedded. "+ //"Please check APN setting." ; UiApplication.getUiApplication().invokeLater(new Runnable() { public void run() { Status.show("Network Connection hasn't succedded. "+ "Please try again later." ); } }); isComplete = true; System.out.println(interrIO); stop(); } catch (Exception e) { System.out.println(e); //errStr = "Unable to connect to the internet at this time. "+ //"Please try again later."; UiApplication.getUiApplication().invokeLater(new Runnable() { public void run() { Status.show("Unable to connect to the internet at this time. "+ "Please try again later." ); } }); isComplete = true; stop(); } finally { try { if(_httpconn != null) { _httpconn.close(); _httpconn = null; } if(_in != null) { _in.close(); _in = null; } if(_out != null) { _out.close(); _out = null; } } catch(Exception e) { System.out.println(e); UiApplication.getUiApplication().invokeLater(new Runnable() { public void run() { Status.show("Unable to connect to the internet at this time. "+ "Please try again later." ); } }); } } } } can anybody help me out. Thanks in advance

    Read the article

  • Help with Design for Vacation Tracking System (C#/.NET/Access/WebServices/SOA/Excel) [closed]

    - by Aaronaught
    I have been tasked with developing a system for tracking our company's paid time-off (vacation, sick days, etc.) At the moment we are using an Excel spreadsheet on a shared network drive, and it works pretty well, but we are concerned that we won't be able to "trust" employees forever and sometimes we run into locking issues when two people try to open the spreadsheet at once. So we are trying to build something a little more robust. I would like some input on this design in terms of maintainability, scalability, extensibility, etc. It's a pretty simple workflow we need to represent right now: I started with a basic MS Access schema like this: Employees (EmpID int, EmpName varchar(50), AllowedDays int) Vacations (VacationID int, EmpID int, BeginDate datetime, EndDate datetime) But we don't want to spend a lot of time building a schema and database like this and have to change it later, so I think I am going to go with something that will be easier to expand through configuration. Right now the vacation table has this schema: Vacations (VacationID int, PropName varchar(50), PropValue varchar(50)) And the table will be populated with data like this: VacationID | PropName | PropValue -----------+--------------+------------------ 1 | EmpID | 4 1 | EmpName | James Jones 1 | Reason | Vacation 1 | BeginDate | 2/24/2010 1 | EndDate | 2/30/2010 1 | Destination | Spectate Swamp 2 | ... | ... I think this is a pretty good, extensible design, we can easily add new properties to the vacation like the destination or maybe approval status, etc. I wasn't too sure how to go about managing the database of valid properties, I thought of putting them in a separate PropNames table but it gets complicated to manage all the different data types and people say that you shouldn't put CLR type names into a SQL database, so I decided to use XML instead, here is the schema: <VacationProperties> <PropertyNames>EmpID,EmpName,Reason,BeginDate,EndDate,Destination</PropertyNames> <PropertyTypes>System.Int32,System.String,System.String,System.DateTime,System.DateTime,System.String</PropertyTypes> <PropertiesRequired>true,true,false,true,true,false</PropertiesRequired> </VacationProperties> I might need more fields than that, I'm not completely sure. I'm parsing the XML like this (would like some feedback on the parsing code): string xml = File.ReadAllText("properties.xml"); Match m = Regex.Match(xml, "<(PropertyNames)>(.*?)</PropertyNames>"; string[] pn = m.Value.Split(','); // do the same for PropertyTypes, PropertiesRequired Then I use the following code to persist configuration changes to the database: string sql = "DROP TABLE VacationProperties"; sql = sql + " CREATE TABLE VacationProperties "; sql = sql + "(PropertyName varchar(100), PropertyType varchar(100) "; sql = sql + "IsRequired varchar(100))"; for (int i = 0; i < pn.Length; i++) { sql = sql + " INSERT VacationProperties VALUES (" + pn[i] + "," + pt[i] + "," + pv[i] + ")"; } // GlobalConnection is a singleton new SqlCommand(sql, GlobalConnection.Instance).ExecuteReader(); So far so good, but after a few days of this I then realized that a lot of this was just a more specific kind of a generic workflow which could be further abstracted, and instead of writing all of this boilerplate plumbing code I could just come up with a workflow and plug it into a workflow engine like Windows Workflow Foundation and have the users configure it: In order to support routing these configurations throw the workflow system, it seemed natural to implement generic XML Web Services for this instead of just using an XML file as above. I've used this code to implement the Web Services: public class VacationConfigurationService : WebService { [WebMethod] public void UpdateConfiguration(string xml) { // Above code goes here } } Which was pretty easy, although I'm still working on a way to validate that XML against some kind of schema as there's no error-checking yet. I also created a few different services for other operations like VacationSubmissionService, VacationReportService, VacationDataService, VacationAuthenticationService, etc. The whole Service Oriented Architecture looks like this: And because the workflow itself might change, I have been working on a way to integrate the WF workflow system with MS Visio, which everybody at the office already knows how to use so they could make changes pretty easily. We have a diagram that looks like the following (it's kind of hard to read but the main items are Activities, Authenticators, Validators, Transformers, Processors, and Data Connections, they're all analogous to the services in the SOA diagram above). The requirements for this system are: (Note - I don't control these, they were given to me by management) Main workflow must interface with Excel spreadsheet, probably through VBA macros (to ease the transition to the new system) Alerts should integrate with MS Outlook, Lotus Notes, and SMS (text messages). We also want to interface it with the company Voice Mail system but that is not a "hard" requirement. Performance requirements: Must handle 250,000 Transactions Per Second Should be able to handle up to 20,000 employees (right now we have 3) 99.99% uptime ("four nines") expected Must be secure against outside hacking, but users cannot be required to enter a username/password. Platforms: Must support Windows XP/Vista/7, Linux, iPhone, Blackberry, DOS 2.0, VAX, IRIX, PDP-11, Apple IIc. Time to complete: 6 to 8 weeks. My questions are: Is this a good design for the system so far? Am I using all of the recommended best practices for these technologies? How do I integrate the Visio diagram above with the Windows Workflow Foundation to call the ConfigurationService and persist workflow changes? Am I missing any important components? Will this be extensible enough to support any scenario via end-user configuration? Will the system scale to the above performance requirements? Will we need any expensive hardware to run it? Are there any "gotchas" I should know about with respect to cross-platform compatibility? For example would it be difficult to convert this to an iPhone app? How long would you expect this to take? (We've dedicated 1 week for testing so I'm thinking maybe 5 weeks?) Many thanks for your advices, Aaron

    Read the article

  • WCF Webservices and FaultContract - Client's receiving SoapExc insted of FaultException<TDetails>

    - by Alessandro Di Lello
    Hi All, i'm developing a WCF Webservice and consuming it within a mvc2 application. My problem is that i'm using FaultContracts on my methods with a custom FaultDetail and i'm throwing manyally the faultexception but when the client receive the exception , it receives a normal SoapException instead of my FaultException that i throwed from the service side. Here is some code: Custom Fault Detail Class: [DataContract] public class MyFaultDetails { [DataMember] public string Message { get; set; } } Operation on service contract: [OperationContract] [FaultContract(typeof(MyFaultDetails))] void ThrowException(); Implementation: public void ThrowException() { var details = new MyFaultDetails { Message = "Exception Test" }; throw new FaultException<MyFaultDetails >(details , new FaultReason(details .Message), new FaultCode("MyFault")); } Client side: try { // Obv proxy init etc.. service.ThrowException(); } catch (FaultException<MyFaultDetails> ex) { // stuff } catch (Exception ex) { // stuff } What i expect is to catch the FaultException , instead that catch is skipped and the next catch is taken with an exception of type SoapException. Am i missing something ? i red a lot of threads about using faultcontracts within wcf and what i did seems to be good. I had a look at the wsdl and xsd generated and they look fine. here's a snippet regarding this method: <wsdl:operation name="ThrowException"> <wsdl:input wsaw:Action="http://tempuri.org/IAnyJobService/ThrowException" message="tns:IAnyJobService_ThrowException_InputMessage" /> <wsdl:output wsaw:Action="http://tempuri.org/IAnyJobService/ThrowExceptionResponse" message="tns:IAnyJobService_ThrowException_OutputMessage" /> <wsdl:fault wsaw:Action="http://tempuri.org/IAnyJobService/ThrowExceptionAnyJobServiceFaultExceptionFault" name="AnyJobServiceFaultExceptionFault" message="tns:IAnyJobService_ThrowException_AnyJobServiceFaultExceptionFault_FaultMessage" /> </wsdl:operation> <wsdl:operation name="ThrowException"> <soap:operation soapAction="http://tempuri.org/IAnyJobService/ThrowException" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> <wsdl:fault name="AnyJobServiceFaultExceptionFault"> <soap:fault use="literal" name="AnyJobServiceFaultExceptionFault" namespace="" /> </wsdl:fault> </wsdl:operation> Any help ? Thanks in advance Regards Alessandro

    Read the article

  • RESTful WebServices with Kohana PHP 3

    - by Miller
    Hi, Is it possible to make restful services with kohana 3 , i reviewed the source and found an abstract class Kohana_Controller_REST, how to use it ? If someone can post a snippet with routing as Example code, it will be very appreciated. Also, the lack of documentation on KO3 is making me crazy, if someone knows a well documented, fast and proven PHP framework to use with an 100% javascript Frontend, just let me know, but i would like to stick with Kohana because of the powerful ORM lib. Thanks.

    Read the article

  • client ip address in ASP.NET (.asmx) webservices

    - by Zain Shaikh
    I am using ASP.Net (.asmx) web services with Silverlight. since there is no way to find client ip address in Silverlight, therefore I had to log this on service end. these are some methods I have tried: Request.ServerVariables(”REMOTE_HOST”) HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"] HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; Request.UserHostAddress() Request.UserHostName() string strHostName = System.Net.Dns.GetHostName(); string clientIPAddress = System.Net.Dns.GetHostAddresses(strHostName).GetValue(0).ToString(); All the above methods work fine on my local system, but when I publish my service on production server. it starts giving errors. Error: Object reference not set to an instance of an object. StackTrace: at System.Web.Hosting.ISAPIWorkerRequestInProc.GetAdditionalServerVar(Int32 index) at System.Web.Hosting.ISAPIWorkerRequestInProc.GetServerVariable(String name) at System.Web.Hosting.ISAPIWorkerRequest.GetRemoteAddress() at System.Web.HttpRequest.get_UserHostAddress()

    Read the article

  • Webservices on iPhone - wsdl2objc - Sample Code?

    - by markmcgookin
    I have recently downloaded the most recent build of this awesome tool WSDL2OBJC from google code here: http://code.google.com/p/wsdl2objc/ After a bit of tweaking and downloading the latest version of the trunk from the svn repo I got a version that created the code for a WSDL I am using and compiles great and actually installs on my phone! However, I'm not doing anything with it yet, because I am not really sure how to. There is very little in the way of sample code on the site, and there is a sample file in the project if you download it, but again it is very complicated and there are no real bits of documentation. Has anyone managed to successfully use this stuff? It seems SOOO powerful and useful but from a look around the Internet, no one knows how to use it. We (all) would love someone who has figured it out to post a simple project or detailed walk-through of implementing this so we can put the code that lots of people have worked hard on to good use. If anyone has found a blog entry or has this information it would be great to see! I am totally stuck... with no errors. I would love to know how to use this now that it's all compiled successfully!

    Read the article

  • using REST webservices as a datasource for Lift ?

    - by Jeff Bowman
    Is there a way to use a webservice (REST in this case) as the data source for a Lift application? I can find a number of tutorials/examples of using Lift to provide the REST API, but in my case the data is hosted elsewhere and exported as a REST webservice. Pointers to doc are greatly appreciated. Thanks, Jeff

    Read the article

  • How to secure Java webservices with login and session handling

    - by hubertg
    I'd like to secure my (Java metro) webservice with a login. Here's how I'm planning to do that: Steps required when calling a webservice method are: call login(user,pwd), receive a session token 1.1 remember the token call servicemethod (token, arg1, arg2...) webservice checks if the token is known, if not throw exception otherwise proceed logout or timeout after x time periods of inactivity my questions: 1. what's your opinion on this approach? does it make sense? 2. are there any libraries which take the burden of writing a session handling (maybe with database persistence to survive app restarts) (the solution should be simple and easily usable with Java and .NET clients) thanks!

    Read the article

  • Newly created Document library and columns using webservices are not visible on sharepoint

    - by Royson
    Hi, for creating a columns I worked on this code . and for creating document library Lists listService = new Lists(); listService.PreAuthenticate = true; listService.Credentials = new NetworkCredential(username,password,domain; String url = "http://YourServer/SiteName/"; listService.Url = url @ + /_vti_bin/lists.asmx"; XmlNode ndList = listService.AddList(NewListName, "Description", 101); Both are working successfully. But Problem i am facing is: New Columns and document library are not visible. I tried with comparing Field Value of Both Visible and No-Visible types. Difference i found is : Visible (Created Manually) doesn't contain Version value. were as i am creating have it. Can you help me out in this? EDIT: I checked contents of ndList node, List is created and it is visible on my UI. but on sharepoint it should be listed in 'Document' tab where default 'Shared Documents' library is shown. If i click on 'Documents' then we can also see all lib created by this code. Visible means library displayed under 'Documents' tab

    Read the article

  • how to consume .net webservices

    - by Rajesh Rolen- DotNet Developer
    please tell that can we consume .net web services in php or not. if yes then please tell me how can we do it. i am to create a web service which takes values and save it in database also it will take values and reply some data as a standard xml format. i know how to create web service and how to use it in asp.net but don't know how to use/call it from php. thing is that i will not be writing code in php to consume but wants to know that do i need to take care of any special thing or need to do some extra code to make it available and use by php developers. i am to create web service in .net framework 2.0 Thanks

    Read the article

  • Using Session in Silverlight using simple WebServices (NOT WCF)

    - by Syed
    Hi, I need to use Session variables in my Silverlight application ( Using Visual Studio 2008, and Silverlight 3). I am already using a webservice (not WCF service) and would like to know if I can add two methods say GetSessionVariable and SetSessionVariable in my existing WebService Class? Any assistance with sample code would be great! Regards and Thanks in advance, Nadeem.

    Read the article

  • manipulating the geocoding webservices results through javascript?

    - by hao
    using http://maps.google.com/maps/api/geocode/json?address=xyz we get a json file I am wondering how can i maniupluate the results in javascript? How do i create the results object in javascript? http://code.google.com/apis/maps/documentation/geocoding/index.html#JSONParsing this doesnt really explain how they get the myJSONResult

    Read the article

  • Asp.net webservices

    - by Patel
    Hi everyone, I am new to asp.net .. i want to learn about web services.. can anyone pls provide me a good link or pdf on web services for reading it from basic.. thanks in advance..

    Read the article

  • VSTO addin (2003-2007) Ms Word & Webservices

    - by Daveo
    Hi, I am planning on starting my 1st VSTO project. What I want to be able to do is: Download and Upload versions of a MS Word document to a web service. With authentication by overriding the save button Call a web service to list a bunch of tag that can be inserted into a document. When a user double clicks a tag the selected tag is inserted into the cursor position. I am pretty sure this is all possible just want some confirmation? Also would like to know how long would it take to make something like this. I think the biggest issue will be authentication and listing exiting files to download then allowing the user to download a .doc and restore previous versions of that file via the web service.

    Read the article

  • How to call different methods from single webservices class

    - by pointer
    I have a following RESTful webservice, I have two methods for http get. One function signs in and other function signs out a user from an application. Following is the code: import javax.ws.rs.core.Context; import javax.ws.rs.core.UriInfo; import javax.ws.rs.PathParam; import javax.ws.rs.Consumes; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; /** * REST Web Service * * @author Pointer */ @Path("generic") public class GenericResource { @Context private UriInfo context; /** * Creates a new instance of GenericResource */ public GenericResource() { } /** * Retrieves representation of an instance of * com.ef.apps.xmpp.ws.GenericResource * * @return an instance of java.lang.String */ @GET @Produces("text/html") public String SignIn(@QueryParam("username") String username, @QueryParam("password") String password, @QueryParam("extension") String extension) { //TODO return proper representation object return "Credentials " + username + " : " + password + " : " + extension; } @GET @Produces("text/html") public String SignOut(@QueryParam("username") String username, @QueryParam("password") String password, @QueryParam("extension") String extension) { //TODO return proper representation object return "Credentials " + username + " : " + password + " : " + extension; } } Now, where would I specify that which function I want to call for http get?

    Read the article

  • WebServices does not interact with App

    - by daemonfire300
    I got a Silverlight App with-in a Web Project Web Silverlight The web contains a service: [WebService(Namespace = "svChat")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. //[System.Web.Script.Services.ScriptService] public class GetIPService : System.Web.Services.WebService { public GetIPService () { //Uncomment the following line if using designed components //InitializeComponent(); } [WebMethod] public string GetIp() { return HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; } } And I got a class in my Silverlight App using the Service: public class Client { private string ip; private string created; #region Properties public string Ip { get { return ip; } set { ip = value; } } public string Created { get { return created; } set { created = value; } } #endregion public Client() { } public void SetIp() { ServiceReference1.GetIPServiceSoapClient scIpClient = new svChat.ServiceReference1.GetIPServiceSoapClient(); scIpClient.GetIpCompleted += new EventHandler<svChat.ServiceReference1.GetIpCompletedEventArgs>(IpService_Completed); scIpClient.GetIpAsync(); } private void IpService_Completed(object sender, ServiceReference1.GetIpCompletedEventArgs e) { this.ip = e.Result; } } After Client is created, SetIp() is called, and Client.Ip is added to a text box. Nothing happens. Ip = null. Service itselfs works, tested it. Getting Ip by the above code works. Gettings Ip via service through Silverlight App does not work. <configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="GetIPServiceSoap" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <security mode="None" /> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://localhost:2090/svChat.Web/GetIPService.asmx" binding="basicHttpBinding" bindingConfiguration="GetIPServiceSoap" contract="ServiceReference1.GetIPServiceSoap" name="GetIPServiceSoap" /> </client> </system.serviceModel> </configuration> Any ideas? regards,

    Read the article

  • how to send image to remote server using webservices in android only save to byte array

    - by satyamurthy
    get image from sdcard and store that image to remote server. i am getting the image from sdcard and i converterd that image to bytearray by using bitmap .but what's the problem if i oberver byte array it is showing some different values it is not matching with .net image byte array conversion. can u pl help if you have any solution it is very urgent to me following is the code i am using can u pl suggest me FileInputStream fin = new FileInputStream(new File("/sdcard/pictures/1.jpg")); BufferedInputStream bis = new BufferedInputStream(fin,3000); byte[] data = new byte[bis.available()]; bis.read(data, 0, data.length); byte[] data1=new byte[data.length]; for (int i = 0; i < data.length; i++) { System.out.print(data[i]); data1[i]=data[i]; } System.out.println("5..................."+data1); Bitmap bitmap = BitmapFactory.decodeByteArray(data1,0,data1.length); System.out.println("6..................."+data1.length); Log.v("hgfjohfjghjdfhgj",""+bitmap); if(bitmap!=null) image.setImageBitmap(bitmap); else Log.e("Bitmap "," Not Created");

    Read the article

  • IIS7 dynamic content compression and webservices

    - by vandalo
    I am moving and old asmx webservice to a new server with IIS7. This webservice basically sends a big dataset (10mb+) to a winform application. The old solution was implemented using a custom soap extension which compressed the content before sending the stream to the client. The client, of course, implemented the same custom soap extension, to decompressed the stream in a dataset. Everything has worked pretty well for years. My customer doesn't want to change the code upgrading to WCF. They just want to put the old App on the new server and use the new dynamic content compression features. We're testing things on a test server (win serv 2008) and it seems that it's working pretty well, even if it seems slow: we can't see any difference in performance (speed) between the uncompressed and compressed stream. Here's the question. Where should I put the settings? Most people say I can't put it in my web.config; others say it can be put there. I am a bit confused. Are there any tricks or things I should know? What about mimeTypes? Should I set some parameters, somewhere? ... considering my stream is XML (dataset) ?? Thanks to everyone who would like to help Alberto

    Read the article

  • Web framework recommendation for python (webservices, auth, cache, ...)

    - by illuminated
    Hi all, Googling for the past week, but cannot finally decide which python web framework would be right for me. The web app I'm about to develop would be almost completely "pure" html with js (jQuery). Server side would have to do the following: authentication session management caching web services (almost all the on page data would be pulled with jQuery through web services) secured web services (through some form of authentication; this is for remote accessing some of the web services though other web apps, desktop/mobile applications) If there is a good tutorial/guide/idea for how to do this in Django I would be most thankfull if someone could share it as I already have experience with it. The thing that made me start thinking about other frameworks is Django's built in ORM. I know I could swap it with SQLAlchemy, but wouldn't go down that road if I'm not sure all the rest of the requirements is supported. Thanks all in advance.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >