Search Results

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

Page 21/26 | < Previous Page | 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Biztalk vs API for databroker layer

    - by jdt199
    My company is about to undergo a large project in which our client wants a large customer portal with a cms, crm implementing. This will require interaction with data from multiple sources across our customers business, these sources include XML office backend systems, sql datbases, webservices etc. Our proposed solution would be to write an API in c# to provide a common interface with all these systems. This would be scalable for future and concurrent projects within the company. Our client expressed an interest in using Biztalk rather than a custom API for this integration, as they feel it is an enterprise solution that any of their suppliers could pick up and use, and it will be better supported. We feel that the configuration work using Biztalk would be rather heavy for all their custom business rules which are required and an interface for the new application to get data to and from Biztalk would still need to be written. Are we right to prefer a custom API solution above Biztalk? Would Biztalk be suitable as a databroker layer to provide an interface for the new Customer portal we are writing. We have not experience with using Biztalk before so any input would be appreciated.

    Read the article

  • Commercial Website architecture question

    - by Maxime ARNSTAMM
    Hello everyone, I have to write an architecture case study but there are some things that i don't know, so i'd like some pointers on the following : The website must handle 5k simultaneous users. The backend is composed by a commercial software, some webservices, some message queues, and a database. I want to recommend to use Spring for the backend, to deal with the different elements, and to expose some Rest services. I also want to recommend wicket for the front (not the point here). What i don't know is : must i install the front and the back on the same tomcat server or two different ? and i am tempted to put two servers for the front, with a load balancer (no need for session replication in this case). But if i have two front servers, must i have two back servers ? i don't want to create some kind of bottleneck. Based on what i read on this blog a really huge charge is handle by one tomcat only for the first website mentionned. But i cannot find any info on this, so i can't tell if it seems plausible. If you can enlight me, so i can go on in my case study, that would be really helpful. Thanks :)

    Read the article

  • Strange Problem with Webservice and IIS

    - by Rene
    Hello there, I have a Problem which confuses me a little bit, resp. where I don't have any Idea about what it could be. The System I'm using is Windows Vista, IIS 7.0, VS2008, Windows Software Factory, Entity Framework, WCF. The Binding for all Webservices is wshttpbinding. I'm using a Webservice hosted in IIS. This Webservice uses/calls another Webservice (also installed in the IIS). If I use a client calling the first Webservice (which calls the second Webservice) it works fine for about 4-10 Times. And then (it is repeatable to get this Problem, but sometimes it happens after 4, sometimes after 10 Time, but it always will happen), the Service and the IIS gets stuck. Stuck means, that this Webservice isn't callable anymore and generates an timeout after 1 minute. Even increasing Timeout doesn't change anything. If i try to restart the IIS I get an timeout error. So the IIS is also "stuck" (it is not really stuck, but I can't restart it). Only if I kill the w3wp.exe IIS is restartable and the Webservice will work again (until i again call this service several times). The logfiles (i'm no expert in things like logging or where to find/enable such logs, so to say : i'm a newbie) like http-logging, Event Viewer or WCF-Message Logging don't show any hints upon the source of the problem. I don't have this problem when I'm using a Webservice which doesn't call another Service. Calling a Webservice is done by Service Reference (I'm using no Proxy-Classes), but I think this should be no Problem. I have no idea of what is happening, nor how to solve this Problem. Regards Rene

    Read the article

  • Best strategy for moving data between physical tiers in ASP.net

    - by Pete Lunenfeld
    Building a new ASP.net application, and planning to separate DB, 'service' tier and Web/UI tier into separate physical layers. What is the best/easiest strategy to move serialized objects between the service tier and the UI tier? I was considering serializing POCOs into JSON using simple ASP.net pages to serve the middle tier. Meaning that the UI/Web tier will request data from a (hidden to the outside user) web server that will return a JSON string. This kind of JSON 'emitter' seems easily testable. It also seems easily compressible for efficiently moving data over the WAN between tiers. I know that some folks use .asmx webservices for this kind of task, but this seems like there is excess overhead with SOAP, and the package is not as human readable (testable) as POCOs serialized as JSON. Others are using more complex technology like WCF which we have never used. Does anyone have advice for choosing a method for moving data/objects between the data (db) tier and the web (UI) tier over the WAN using .net technologies? Thanks!!!

    Read the article

  • Advanced tasks using Web.Config transformation

    - by dcadenas
    Does anyone know if there is a way to "transform" specific sections of values instead of replacing the whole value or an attribute? For example, I've got several appSettings entries that specify the Urls for different webservices. These entries are slightly different in the dev environment than the production environment. Some are less trivial than others <!-- DEV ENTRY --> <appSettings> <add key="serviceName1_WebsService_Url" value="http://wsServiceName1.dev.domain.com/v1.2.3.4/entryPoint.asmx" /> <add key="serviceName2_WebsService_Url" value="http://ma1-lab.lab1.domain.com/v1.2.3.4/entryPoint.asmx" /> </appSettings> <!-- PROD ENTRY --> <appSettings> <add key="serviceName1_WebsService_Url" value="http://wsServiceName1.prod.domain.com/v1.2.3.4/entryPoint.asmx" /> <add key="serviceName2_WebsService_Url" value="http://ws.ServiceName2.domain.com/v1.2.3.4/entryPoint.asmx" /> </appSettings> So far, I know I can do something like this in the Web.Release.Config: <add xdt:Locator="Match(key)" xdt:Transform="SetAttributes(value)" key="serviceName1_WebsService_Url" value="http://wsServiceName1.prod.domain.com/v1.2.3.4/entryPoint.asmx" /> <add xdt:Locator="Match(key)" xdt:Transform="SetAttributes(value)" key="serviceName2_WebsService_Url" value="http://ws.ServiceName2.domain.com/v1.2.3.4/entryPoint.asmx" /> However, everytime the Version for that webservice is updated, I would have to update the Web.Release.Config as well, which defeats the purpose of simplfying my web.config updates. I know I could also split that URL into different sections and update them independently, but I rather have it all in one key. I've looked through the available web.config Transforms but nothings seems to be geared towars what I am trying to accomplish. These are the websites I am using as a reference: Vishal Joshi's blog, MSDN Help, and Channel9 video Any help would be much appreciated! -D

    Read the article

  • how to convert byte array to image in java?

    - by nemade-vipin
    I am developing a Web application in Java. In that application, I have created webservices in Java. In that webservice, I have created one webmethod which returns the image list in base64 format. The return type of the method is Vector. In webservice tester I can see the SOAP response as xsi:type="xs:base64Binary". Then I called this webmethod in my application. I used the following code: SBTSWebService webService = null; List imageArray = null; List imageList = null; webService = new SBTSWebService(); imageArray = webService.getSBTSWebPort().getAddvertisementImage(); Iterator itr = imageArray.iterator(); while(itr.hasNext()) { String img = (String)itr.next(); byte[] bytearray = Base64.decode(img); BufferedImage imag=ImageIO.read(new ByteArrayInputStream(bytearray)); imageList.add(imag); } In this code I am receiving the error: java.lang.ClassCastException: [B cannot be cast to java.lang.String" on line String img = (String)itr.next(); Is there any mistake in my code? Or is there any other way to bring the image in actual format? Can you provide me the code or link through which I can resolve the above issue? Note:- I already droped this question and I got the suggetion to try the following code Object next = iter.next(); System.out.println(next.getClass()) I tried this code and got the output as byte[] from webservice. but I am not able to convert this byte array to actual image. is there any other way to bring the image in actual format? Can you provide me the code or link through which I can resolve the above issue?

    Read the article

  • WebService Stubs WSDL Axis2

    - by tt0686
    Good afternoon in my timezone. I have a wsdl file with the following snippet of code: <schema targetNamespace="http://util.cgd.pt" xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> <complexType name="Attribute"> <sequence> <element name="fieldType" nillable="true" type="xsd:string" /> <element name="dataType" nillable="true" type="xsd:string" /> <element name="name" nillable="true" type="xsd:string" /> <element name="value" nillable="true" type="xsd:string" /> </sequence> </complexType> <complexType name="ArrayOffAttribute"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="tns3:Attribute[]" /> </restriction> </complexContent> </complexType> When i use jax-rpc or Axis1 to generate the stubs the type Attribute is generated, but when i use Axis2 the type Attribute is not generated and a new type is created ArrayOffAttribute, this new type extends the axis2.databinding.types.soapencoding.Array and permits to add elements through the array.addObject(object), my question is, i am migrating one Java EE application from webservices using jax-rpc to start using Axis2, and the methods are using the Attribute type to fullfill attributes fields, now in Axis2 and do not have attribute type , what should i use in the ArrayOffAttribute.addObject(?) ? Could be something wrong with Axis2 ? i am stop here :( Thanks in advance Best regards

    Read the article

  • How to make a request from an android app that can enter a Spring Security secured webservice method

    - by johnrock
    I have a Spring Security (form based authentication) web app running CXF JAX-RS webservices and I am trying to connect to this webservice from an Android app that can be authenticated on a per user basis. Currently, when I add an @Secured annotation to my webservice method all requests to this method are denied. I have tried to pass in credentials of a valid user/password (that currently exists in the Spring Security based web app and can log in to the web app successfully) from the android call but the request still fails to enter this method when the @Secured annotation is present. The SecurityContext parameter returns null when calling getUserPrincipal(). How can I make a request from an android app that can enter a Spring Security secured webservice method? Here is the code I am working with at the moment: Android call: httpclient.getCredentialsProvider().setCredentials( //new AuthScope("192.168.1.101", 80), new AuthScope(null, -1), new UsernamePasswordCredentials("joeuser", "mypassword")); String userAgent = "Android/" + getVersion(); HttpGet httpget = new HttpGet(MY_URI); httpget.setHeader("User-Agent", userAgent); httpget.setHeader("Content-Type", "application/xml"); HttpResponse response; try { response = httpclient.execute(httpget); HttpEntity entity = response.getEntity(); ... parse xml Webservice Method: @GET @Path("/payload") @Produces("application/XML") @Secured({"ROLE_USER","ROLE_ADMIN","ROLE_GUEST"}) public Response makePayload(@Context Request request, @Context SecurityContext securityContext){ Payload payload = new Payload(); payload.setUsersOnline(new Long(200)); if (payload == null) { return Response.noContent().build(); } else{ return Response.ok().entity(payload).build(); } }

    Read the article

  • How does real world login process happen in web application in Java?

    - by Nitesh Panchal
    Hello, I am very much confused regarding login process that happen in Java web application. I read many tutorials regarding jdbcRealm and JAAS. But, one thing that i don't understand is that why should i use them ? Can't i simply check directly against my database of users? and once they successfully login to the site, i store some variable in session as a flag. And probably check that session variable on all restricted pages (I mean keep a filter for restricted resources url pattern).If the flag doesn't exist simply redirect the user to login page. Is this approach correct?Does this approch sound correct? If yes, then why did all this JAAS and jdbcRealm came into existence? Secondly, I am trying to completely implement SAS(Software as service) in my web application, meaning everything is done through web services.If i use webservices, is it possible to use jdbcRealm? If not, then is it possible to use JAAS? If yes, then please show me some example which uses mySql as a database and then authenticates and authorizes. I even heard about Spring Security. But, i am confused about that too in the sense that how do i use webservice with Spring Security. Please help me. I am really very confused. I read sun's tutorials but they only keep talking about theories. For programmers to understand a simple concept, they show a 100 page theory first before they finally come to one example.

    Read the article

  • MSSQL in ASP.NET application getting unstable after a certain period

    - by Barslett
    Hello, I have an ASP.NET 2.0 application that I made to keep track of disruption reports about our public transport system. The architecture is pretty straight-forward; an MSSQL Express 2008 database, ADO.NET and a DataSet/DAL with a few methods to access the database. There is a set of .aspx pages for the UI in use by our dispatchers and on our public website, as well as a set of SOAP and REST webservices and an RSS feed. Everything worked just fine for more than a year, until two weeks ago. Now and then, it seems as the database enters an unstable mode, and the application starts responding something right, something wrong. The typical error is that apparently, an empty DataTable is returned to the public disruption overview or to the RSS generator. Thus, the user gets e.g. an empty GridView, but no exception is thrown AFAIK, and nothing is written to the Windows Application log. After a restart of the MSSQL Express service, the situation is back to normal. It has to be said that the situation first time appeared a few days after I made a new minor upgrade of the application. The RSS generator was slightly rewritten, and I added a WCF REST service. But the DAL and the database schema were untouched... Any hints of how we could keep the database stable? It is a bit annoying not to have a clue ;-)

    Read the article

  • WSDL AXIS Arrays

    - by SKS
    I am trying to create wsdl definition for the below soap response, < reasonCode Required="TRUE" < ValidCodeRR< /ValidCode < ValidCodeRB< /ValidCode < ValidCodeRT< /ValidCode < ValidCodeAR< /ValidCode < /reasonCode Below is the wsdl definition I have, < xsd:complexType < xsd:sequence < xsd:element name="ValidCode" type="xsd:string" minOccurs="0" maxOccurs="20" / < /xsd:sequence < xsd:attribute name="Required" type="xsd:string" / < /xsd:complexType < /xsd:element I am using Axis 1 to generate the webservices client and for the above wsdl definition, the tool generates the reasonCode as a string array like below. private java.lang.String[] reasonCode It ignores the attribute required. Does anyone know how to write wsdl defintion, such that axis creates reasonCode as an element with an attribute "required". Any help on this would be greatly appreciated. Thanks, SK

    Read the article

  • jQuery Dialog - Remote Page Javascript not running in FF / Chrome

    - by Robert
    Hey SO, I've created a page intended only to be opened via modal. This page contains a calendar of the User's favorite events...etc. I'm using the jQuery Dialog and FullCalendar plugins to do this. In IE, there is not issue...everything works fine. However, the Javascript on the remote page (Calendar.aspx) is never getting executed in FF or Chrome. Here's my code. SomeRandomPage.aspx $("#showcalendar").click(function() { var dialog = $('<div style="display:hidden"></div>').appendTo('body'); // load remote content dialog.load("Calendar.aspx", {}, function(responseText, textStatus, XMLHttpRequest) { dialog.dialog( { modal: true, width: 750, resizable: false, draggable: false, title: "My Calendar", closeOnEscape: false, close: function(event, ui) { $(this).remove(); } } ); }); }); } Calendar.aspx <!-- Necessary js above --> <div id="calendar"></div> <script> $(document).ready(function() { alert("HERE"); //Doesn't work in FF or Chrome. Works in IE $('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month' }, editable: false, events: '/webservices/CalendarEvents.ashx' }); }); </script>

    Read the article

  • Returning XML natively in a .NET (C#) webservice?

    - by James McMahon
    I realize that SOAP webservices in .NET return XML representation of whatever object the web method returns, but if I want to return data formatting in XML what is the best object to store it in? I am using the answer to this question to write my XML, here is the code: XmlWriter writer = XmlWriter.Create(pathToOutput); writer.WriteStartDocument(); writer.WriteStartElement("People"); writer.WriteStartElement("Person"); writer.WriteAttributeString("Name", "Nick"); writer.WriteEndElement(); writer.WriteStartElement("Person"); writer.WriteStartAttribute("Name"); writer.WriteValue("Nick"); writer.WriteEndAttribute(); writer.WriteEndElement(); writer.WriteEndElement(); writer.WriteEndDocument(); writer.Flush(); Now I can return this output as a String to my calling webmethod, but it shows up as <string> XML HERE </string>, is there anyway to just return the full xml? Please in your answer, give an example of how to use said object with either XmlWriter or another internal object (if you consider XmlWriter to be a poor choice). The System.Xml package (namespace) has many objects, but I haven't been able to uncover decent documentation on how to use the objects together, or what to use for what situations.

    Read the article

  • jQuery/ajax working on IIS5.1 but not IIS6

    - by Mikejh99
    I'm running a weird issue here. I have code that makes jquery ajax calls to a web service and dynamically adds controls using jquery. Everything works fine on my dev machine running IIS 5.1, but not when deployed to IIS 6. I'm using VS2010/ASP.Net 4.0, C#, jQuery 1.4.2 and jQuery UI 1.8.1. I'm using the same browser for each. It partially works though. The code will add the controls to the page, but they aren't visible until I click them (they aren't visible though). I thought this was a css issue, but the styles are there too. The ajax calls look like this: $.ajax({ url: "/WebServices/AssetManager.asmx/Assets", type: "POST", datatype: "json", async: false, data: "{'q':'" + req.term + "', 'type':'Condition'}", contentType: "application/javascript; charset=utf-8", success: function (data) { res($.map(data.d, function (item) { return { label: item.Name, value: item.Name, id: item.Id, datatype: item.DataType } })) } }) Changing the content-type makes the autocomplete fail. I've quadruple checked and all the paths are correct, there is no document footer enabled in IIS, and I'm not using IIS compression. Any idea why the page will display and work properly in IIS 5 but only partially in IIS 6? (If it failed completely, that'd make more sense!). Is it a jQuery or CSS issue?

    Read the article

  • Dealing with SQLException with spring,hibernate & Postgres

    - by mad
    Hi im working on a project using HibernateDaoSUpport from my Daos from Spring & spring-ws & hibernate & postgres who will be used in a national application (means a lot of users) Actually, every exception from hibernate is automatically transformed into some specific Spring dataAccesException. I have a table with a keyword on the dabatase & a unique constraint on the keywords : no duplicate keywords is allowed. I have found twows ways to deal with with that in the Insert Dao: 1- Check for the duplicate manually (with a select) prior to doing your insert. I means that the spring transaction will have a SERIALIZABLE isolation level. The obvious drawback is that we have now 2 queries for a simple insert.Advantage: independent of the database 2-let the insert gone & catch the SqlException & convert it to a userfriendly message & errorcode to the final consumer of our webservices. Solution 2: Spring has developped a way to translate specific exeptions into customized exceptions. see http://www.oracle.com/technology/pub/articles/marx_spring.html In my case i would have a ConstraintViolationException. Ideally i would like to write a custom SQLExceptionTranslator to map the duplicate word constraint in the database with a DuplicateWordException. But i can have many unique constraints on the same table. So i have to get the message of the SQLEXceptions in order to find the name of the constraint declared in the create table "uq_duplicate-constraint" for example. Now i have a strong dependency with the database. Thanks in advance for your answers & excuse me for my poor english (it is not my mother tongue)

    Read the article

  • adding a token onto a webservice or wcf call

    - by duncanUK
    I have an httphandler which I am using to log the http soap request and response for each webservice that is called from my application as a comms log. i would like to inject a token ont he 1st call (possibly the 1st call to invoke the service that is being logged) and then be able to track all subsequent webservice calls run in the same context with this token so i can tie the subsequent calls back up to the original call. so for example. main webservice -> 2nd web service -> another web service [token] [token] [token] -> nth web service [token] I would like to inject the token on the first call to the main webservice (http handler checks if no token, add it), I would like to use the same http handler to intercept each call to the subsequent webservices and pass on the token if it exists already (the job of the httphandler is to log the in/out soap with the token to reference with. I have managed to inject the first token, but my problem is how do I add the token on the subsequent calls.. can I make it stick on the same context or session? My worry is that when we call a new webservice, we create a whole new proxy/http request which will not inhrit the token... or will it?! Ideally I would like it to persist on the http header as I am setting the token as a header at the moment? has anyone got any ideas or a better way of doing this? I would be most greatful for you comments!

    Read the article

  • Where do objects merge/join data in a 3-tier model?

    - by BerggreenDK
    Its probarbly a simple 3-tier problem. I just want to make sure we use the best practice for this and I am not that familiary with the structures yet. We have the 3 tiers: GUI: ASP.NET for Presentation-layer (first platform) BAL: Business-layer will be handling the logic on a webserver in C#, so we both can use it for webforms/MVC + webservices DAL: LINQ to SQL in the Data-layer, returning BusinessObjects not LINQ. DB: The SQL will be Microsoft SQL-server/Express (havent decided yet). Lets think of setup where we have a database of [Persons]. They can all have multiple [Address]es and we have a complete list of all [PostalCode] and corresponding citynames etc. The deal is that we have joined a lot of details from other tables. {Relations}/[tables] [Person]:1 --- N:{PersonAddress}:M --- 1:[Address] [Address]:N --- 1:[PostalCode] Now we want to build the DAL for Person. How should the PersonBO look and when does the joins occure? Is it a business-layer problem to fetch all citynames and possible addressses pr. Person? or should the DAL complete all this before returning the PersonBO to the BAL ? Class PersonBO { public int ID {get;set;} public string Name {get;set;} public List<AddressBO> {get;set;} // Question #1 } // Q1: do we retrieve the objects before returning the PersonBO and should it be an Array instead? or is this totally wrong for n-tier/3-tier?? Class AddressBO { public int ID {get;set;} public string StreetName {get;set;} public int PostalCode {get;set;} // Question #2 } // Q2: do we make the lookup or just leave the PostalCode for later lookup? Can anyone explain in what order to pull which objects? Constructive criticism is very welcome. :o)

    Read the article

  • hosting a high traffic facebook app (game)

    - by z3cko
    we are currently developing a high traffic facebook application. all the traffic will be within one month, where there are 500.000 to 1.000.000 expected users. after that month, the game is over and we have a winner - so the app will be archived. we are currently planning to develop the application with ruby on rails and searching for hosting options that can deal with the traffic. the problem is not so much the users, but the peak values: we will have around 500.000 requests coming daily within a short timeframe (lets say within 3 minutes in the worst case) we are expecting 500.000 to 1.000.000 users of the application, with peaks at 1:00pm (timezone GMT+1), where most (up to 80% of the users) will send most of the requests. the requests are from 11th of june to 11.july - after that, the app/game is closed/over. we are currently developing an aggressive caching mechanism - currently we are thinking about 2 or 3 small apps/webservices, that will handle the load. the load is distributed as follows: a) main application, cached data (11 screens, 200k each) b) voting: every day until 1:00pm (timezone GMT+1) - every user votes with about 10k data sent, high concurrent peak values! questions: is there any specific application setup that is recommendable? are there any hosting partners that can be recommended? thanks!

    Read the article

  • How can I add SOAP Headers to a WSDL generated Borland C++ Builder 6 application.

    - by MJG
    Using a WSDL that requires a SOAP HEADER for Authentication (fragment below) code that gets generated when creating a web service client via the "WSDL Importer" has no concept of the Authentication Headers and there are no examples in BCB6 C++ Examples/WebServices directories that show how, and nothing on Web that I can find. Anyone with BCB6 C++ (not Delphi) have an example of adding SOAP Headers to a TRemotable subclass? <s:element name="AuthenticationHeader" type="tns:AuthenticationHeader"/> <s:complexType name="AuthenticationHeader"> <s:complexContent mixed="false"> <s:extension base="tns:UserAuthHeader"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Function" type="s:string"/> <s:element minOccurs="1" maxOccurs="1" name="TimeOutMilliSec" type="s:int"/> </s:sequence> </s:extension> </s:complexContent> </s:complexType> <s:complexType name="UserAuthHeader"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Username" type="s:string"/> <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string"/> </s:sequence> <s:anyAttribute/> </s:complexType>

    Read the article

  • Apache crashes, probably because of this piece of php code. Can you have a look?

    - by Munim
    I am working on the development of a web based application on codeigniter. I wrote this function to get the timezone data for any city or address. function gettimezone($address) { $_url = 'http://api.local.yahoo.com/MapsService/V1/geocode'; $_url .= sprintf('?appid=%s&location=%s',"phpclasses",rawurlencode($address)); $_result = false; if($_result = file_get_contents($_url)) { preg_match('!<Latitude>(.*)</Latitude><Longitude>(.*)</Longitude>!U', $_result, $_match); $lng = $_match[2]; $lat = $_match[1]; $url = "http://ws.geonames.org/timezone?lat={$lat}&lng={$lng}"; $timedata = file_get_contents($url); $sxml = simplexml_load_string($timedata); return $sxml->timezone; } else return false; } I am working on Windows 7 and xampp 1.7 (php 5.2.8). Is there any possible scenario where this piece of code would crash Apache? The application runs fine almost everytime, but I think running this piece of code when there is no internet connectivity or very poor internet connectivity (thereby no access to either of the webservices I have used) brings down the server. Something like this happened a few times and I think it was due to loss of internet connectivity but I am not sure what exactly is going on. [ By the way, feel free to use this piece of code. Makes 2 web service calls so don't use to too often in your application. Consider storing the results in a database.]

    Read the article

  • Reading XML or objects from a Web service

    - by Shawn
    This is my first time working with webservices and I am a bit lost. I successfully called the functions, but I only can get one value from the service. I read that the easiest way is to read xml or create objects and then call their values. Currently I use functions that return the desired value but I need to call them 3 times to get all the data witch is a waste of time and resources. I tried to call the service with the URL and use it as a website or getting the service to work the same way without importing into the program. The thing is that i cant find a way to pass the values into the url, because of that i get only blank pages. What is the fastest way to get my data from the services? I need city name, temperature and a flag if the city is valid. I need to pass the zip code to the service. Thank you. My current code wetther.Weather wether = new wetther.Weather(); string farenhait = wether.GetCityWeatherByZIP(zip).Temperature; string city = wether.GetCityWeatherByZIP(zip).City; bool correct = wether.GetCityWeatherByZIP(zip).Success; I tried it that way // Retrieve XML document XmlTextReader reader = new XmlTextReader("http://xml.weather.yahoo.com/forecastrss?p=94704"); // Skip non-significant whitespace reader.WhitespaceHandling = WhitespaceHandling.Significant; // Read nodes one at a time while (reader.Read()) { // Print out info on node Console.WriteLine("{0}: {1}", reader.NodeType.ToString(), reader.Name); } This one works for the yahoo page but not for mine. I need to use this webservice - http://wsf.cdyne.com/WeatherWS/Weather.asmx

    Read the article

  • WCF consumed as WebService adds a boolean parameter?

    - by Martín Marconcini
    I've created the default WCF Service in VS2008. It's called "Service1" public class Service1 : IService1 { public string GetData( int value ) { return string.Format("You entered: {0}", value); } public CompositeType GetDataUsingDataContract( CompositeType composite ) { if ( composite.BoolValue ) { composite.StringValue += "Suffix"; } return composite; } } It works fine, the interface is IService1: [ServiceContract] public interface IService1 { [OperationContract] string GetData( int value ); [OperationContract] CompositeType GetDataUsingDataContract( CompositeType composite ); // TODO: Add your service operations here } This is all by default; Visual Studio 2008 created all this. I then created a simple Winforms app to "test" this. I added the Service Reference to my the above mentioned service and it all works. I can instanciate and call myservice1.GetData(100); and I get the result. But I was told that this service will have to be consumed by a Winforms .NET 2.0 app via Web Services, so I proceeded to add the reference to a new Winforms .NET 2.0 application created from scratch (only one winform called form1). This time, when adding the "web reference", it added the typical "localhost" one belonging to webservices; the wizard saw the WCF Service (running on background) and added it. When I tried to consume this, I found out that the GetData(int) method, was now GetData(int, bool). Here's the code private void button1_Click( object sender, EventArgs e ) { localhost.Service1 s1 = new WindowsFormsApplication2.localhost.Service1(); Console.WriteLine(s1.GetData(100, false)); } Notice the false in the GetData call? I don't know what that parameter is or where did that come from, it is called "bool valueSpecified". Does anybody know where this is coming from? Anything else I should do to consume a WCF Service as a WebService from .NET 2.0? (winforms).

    Read the article

  • Netbeans, JPA Entity Beans in seperate projects. Unknown entity bean class

    - by Stu
    I am working in Netbeans and have my entity beans and web services in separate projects. I include the entity beans in the web services project however the ApplicaitonConfig.java file keeps getting over written and removing the entries I make for the entity beans in the associated jar file. My question is: is it required to have both the EntityBeans and the WebServices share the same project/jar file? If not what is the appropriate way to include the entity beans which are in the jar file? <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> <persistence-unit name="jdbc/emrPool" transaction-type="JTA"> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> <jta-data-source>jdbc/emrPool</jta-data-source> <exclude-unlisted-classes>false</exclude-unlisted-classes> <properties> <property name="eclipselink.ddl-generation" value="none"/> <property name="eclipselink.cache.shared.default" value="false"/> </properties> </persistence-unit> </persistence> Based on Melc's input i verified that that the transaction type is set to JTA and the jta-data-source is set to the value for the Glassfish JDBC Resource. Unfortunately the problem still persists. I have opened the WAR file and validated that the EntityBean.jar file is the latest version and is located in the WEB-INF/lib directory of the War file. I think it is tied to the fact that the entities are not being "registered" with the entity manager. However i do not know why they are not being registered.

    Read the article

  • RIA Service - without database?

    - by Heko
    Helo! I need to write a RIA service to call Java webservices from Silverlight 3.0 app. I'm testing how stuff works and in my Web app I have a MyData class which has 2 properties (int ID, string Text): namespace SilverlightApplication1.Web { public class MyData { [Key] public int ID { get; set; } public string Text { get; set; } } } Then I wrote simple DomainService: [EnableClientAccess()] public class MyService : DomainService { public IQueryable<MyData> GetMyData(string Url) { // here I will call my WebService List<MyData> result = new List<MyData>(); result.Add(new MyData { ID = 1, Text = Url }); return result.AsQueryable(); } } } How can I get data into my SL app? Now I have this: namespace SilverlightApplication1 { public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); MyContext context = new MyContext(); } } } I called and load but nothink worsk (exceptions, or nulls)... I had Invoke annotation but MyData is not TEntity and I can't use Strings or other simple types as well... :/ I'm reading and reading posts and nothing works like it should.. Any help would be really appreciated. Thank you!

    Read the article

  • Web service failing when installed in seperate project from the website...

    - by Adam
    I am totally new to web services and cannot get mine to work. My setup is on VS 2008 using IIS. I have one solution file with 3 projects in it: website, code, and services. If I put my webservice into my website and call it locally then it will work fine (it's just a hello world web service). I want to put the service into a different location for use from multiple sites. I don't know what I'm doing wrong - i've read so much conflicting info regarding disco files, access files, silverlight, flash, java, etc. I just looking for quick simple steps to create a web service that I can access from javascript and deploy to a seperate website. End goal is to have functionality in webservices so that website will call via JS and run much smoother in the loading time and async calls. Do I need to create a disco file? Do I need to configure security? -- I know this is prob best, i'm just looking to get it working at all. Do I need to allow cross browser access on IIS or on my hosted server? Are there any quick reference websites that you can recommend? Should I be using WCF as new technology? - I saw this on MSDN but seems to be more for windows apps then web apps. I'm not getting any specific error codes. I have installed the firefox debugging tools (firebug) and I can see what the headers are but I don't know how to interpret them and there is no response being passed back. Any help is appreciated!!!

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26  | Next Page >