Search Results

Search found 1440 results on 58 pages for 'jackson smith'.

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

  • Jackson object mapping - map incoming JSON field to protected property in base class

    - by Pete
    We use Jersey/Jackson for our REST application. Incoming JSON strings get mapped to the @Entity objects in the backend by Jackson to be persisted. The problem arises from the base class that we use for all entities. It has a protected id property, which we want to exchange via REST as well so that when we send an object that has dependencies, hibernate will automatically fetch these dependencies by their ids. Howevery, Jackson does not access the setter, even if we override it in the subclass to be public. We also tried using @JsonSetter but to no avail. Probably Jackson just looks at the base class and sees ID is not accessible so it skips setting it... @MappedSuperclass public abstract class AbstractPersistable<PK extends Serializable> implements Persistable<PK> { @Id @GeneratedValue(strategy = GenerationType.AUTO) private PK id; public PK getId() { return id; } protected void setId(final PK id) { this.id = id; } Subclasses: public class A extends AbstractPersistable<Long> { private String name; } public class B extends AbstractPersistable<Long> { private A a; private int value; // getter, setter // make base class setter accessible @Override @JsonSetter("id") public void setId(Long id) { super.setId(id); } } Now if there are some As in our database and we want to create a new B via the REST resource: @POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @Transactional public Response create(B b) { if (b.getA().getId() == null) cry(); } with a JSON String like this {"a":{"id":"1","name":"foo"},"value":"123"}. The incoming B will have the A reference but without an ID. Is there any way to tell Jackson to either ignore the base class setter or tell it to use the subclass setter instead? I've just found out about @JsonTypeInfo but I'm not sure this is what I need or how to use it. Thanks for any help!

    Read the article

  • Jackson + Builder Pattern?

    - by Gili
    I'd like Jackson to deserialize a class with the following constructor: public Clinic(String name, Address address) Deserializing the first argument is easy. The problem is that Address is defined as: public class Address { private Address(Map<LocationType, String> components) ... public static Builder { public Builder setCity(String value); public Builder setCountry(String value); public Address create(); } } and is constructed like this: new Address.Builder().setCity("foo").setCountry("bar").create(); Is there a way to get key-value pairs from Jackson in order to construct the Address myself? Alternatively, is there a way to get Jackson to use the Builder class itself?

    Read the article

  • Jackson XML globally set element name for container types

    - by maxenglander
    I'm using Jackson 1.9.2 with the XML databind module. I need to tweak the way that Jackson serializes arrays, lists, collections. By default, with an int array property called myProperty containing a couple numbers, Jackson / XML is producing the following: <myProperty> <myProperty>1</myProperty> <myProperty>2</myProperty> </myProperty> What I need to produce is: <myProperty> <item>1</item> <item>2</item> </myProperty> I can do this on a per-POJO basis using a combination of JacksonXmlElementWrapper and JacksonXmlProperty like so: @JacksonXmlElementWrapper(localname='myProperty') @JacksonXmlProperty(localname='item') public int[] myProperty; This solution, however, would require that I manually apply these annotations to every array, list, collection in my POJOs. A much better solution would allow me to apply a solution once, globally, for all array, list, collection types. Any ideas on how to implement such a solution? Thanks!

    Read the article

  • JSON Formatting with Jersey, Jackson, & json.org/java Parser using Curl Command

    - by socal_javaguy
    Using Java 6, Tomcat 7, Jersey 1.15, Jackson 2.0.6 (from FasterXml maven repo), & www.json.org parser, I am trying to pretty print the JSON String so it will look indented by the curl -X GET command line. I created a simple web service which has the following architecture: My POJOs (model classes): Family.java import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class Family { private String father; private String mother; private List<Children> children; // Getter & Setters } Children.java import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class Children { private String name; private String age; private String gender; // Getters & Setters } Using a Utility Class, I decided to hard code the POJOs as follows: public class FamilyUtil { public static Family getFamily() { Family family = new Family(); family.setFather("Joe"); family.setMother("Jennifer"); Children child = new Children(); child.setName("Jimmy"); child.setAge("12"); child.setGender("male"); List<Children> children = new ArrayList<Children>(); children.add(child); family.setChildren(children); return family; } } My web service: import java.io.IOException; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.codehaus.jackson.JsonGenerationException; import org.codehaus.jackson.map.JsonMappingException; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jettison.json.JSONException; import org.json.JSONObject; import org.json.JSONTokener; import com.myapp.controller.myappController; import com.myapp.resource.output.HostingSegmentOutput; import com.myapp.util.FamilyUtil; @Path("") public class MyWebService { @GET @Produces(MediaType.APPLICATION_JSON) public static String getFamily() throws IOException, JsonGenerationException, JsonMappingException, JSONException, org.json.JSONException { ObjectMapper mapper = new ObjectMapper(); String uglyJsonString = mapper.writeValueAsString(FamilyUtil.getFamily()); System.out.println(uglyJsonString); JSONTokener tokener = new JSONTokener(uglyJsonString); JSONObject finalResult = new JSONObject(tokener); return finalResult.toString(4); } } When I run this using: curl -X GET http://localhost:8080/mywebservice I get this in my Eclipse's console: {"father":"Joe","mother":"Jennifer","children":[{"name":"Jimmy","age":"12","gender":"male"}]} But from the curl command on the command line (this response is more important): "{\n \"mother\": \"Jennifer\",\n \"children\": [{\n \"age\": \"12\",\n \"name\": \"Jimmy\",\n \"gender\": \"male\"\n }],\n \"father\": \"Joe\"\n}" This is adding newline escape sequences and placing double quotes (but not indenting like it should it does have 4 spaces after the new line but its all in one line). Would appreciate it if someone could point me in the right direction.

    Read the article

  • Android compatibility with Restlet/JSON/Jackson

    - by Cookie
    Hi there, I'm currently working on a webservice-client for Android. I'm using a Java client library which provides an abstraction for interaction with the service. The client library works on normal machines. However, when I use the classes in my Android project, some calls don't return a result on Android, the background-service stops working at the first of those commands. Wireshark shows a tcp exchange, the server gets the requests. There is no exceptions or anything. Something in the serialization/deserialization semms not to work. I'm using the newest version of Jackson libraries (1.5.3) and the restlet jar in the android edition. Is there any known problems with Jackson and Android? Which code and libraries are compatible with Android? Thanks in advance.

    Read the article

  • Jackson Vs. Gson

    - by Null Pointer
    After searching through some existing libraries for JSON, I have finally ended up with these two: Jackson Google GSon I am a bit partial towards GSON, but word on the net is that GSon suffers from certain celestial performance issue. I am continuing my comparison, in the meanwhile I was looking for help to make up my mind.

    Read the article

  • How to convert a JSON string to a Map<String, String> with Jackson JSON

    - by Infinity
    This is my first time trying to do something useful with Java.. I'm trying to do something like this but it doesn't work: Map<String, String> propertyMap = new HashMap<String, String>(); propertyMap = JacksonUtils.fromJSON(properties, Map.class); But the IDE says: 'Unchecked assignment Map to Map<String,String>' What's the right way to do this? I'm only using Jackson because that's what is already available in the project, is there a native Java way of converting to/from JSON? In PHP I would simply json_decode($str) and I'd get back an array. I need basically the same thing here. Thanks!

    Read the article

  • Jackson - suppressing serialization(write) of properties dynamically

    - by kapil.israni
    I am trying to convert java object to JSON object in Tomcat/jersey using Jackson. And want to suppress serialization(write) of certain properties dynamically. I can use JsonIgnore, but I want to make the ignore decision at runtime. Any ideas?? So as an example below, I want to suppress "id" field when i serialize the User object to JSON.. new ObjectMapper.writeValueAsString(user); class User { private String id = null; private String firstName = null; private String lastName = null; //getters //setters }//end class

    Read the article

  • Restlet/Jackson works differently when object implements Serializable

    - by ravyoli
    I am sending an object with some primitive fields using Restlet with Jackson converter. Up until now it worked great. But then I needed my object to implement Serializable, because I need to store it in memcache of GAE. For some reason - when the class implements Serializable, things stop working. Restlet sends a different string representation from before, and I can't even print that string in the server. I tried printing its byte value, char-by-char and the first numbers are: 0xfffd 0xfffd 0x0000 0x0005 0x0073 0x0072 Thanks a lot!

    Read the article

  • Spring 3.0 making JSON response using jackson message converter

    - by dupdup
    i configure my messageconverter as Jackson's then class Foo{int x; int y} and in controller @ResponseBody public Foo method(){ return new Foo(3,4) } from that i m expecting to return a JSON string {x:'3',y:'4'} from server without any other configuration. but getting 404 error response to my ajax request If the method is annotated with @ResponseBody, the return type is written to the response HTTP body. The return value will be converted to the declared method argument type using HttpMessageConverters. Am I wrong ? or should I convert my response Object to Json string myself using serializer and then returning that string as response.(I could make string responses correctly) or should I make some other configurations ? like adding annotations for class Foo here is my conf.xml <bean id="jacksonMessageConverter" class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"> <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"> <property name="messageConverters"> <list> <ref bean="jacksonMessageConverter"/> </list> </property>

    Read the article

  • Json Jackson deserialization without inner classes

    - by Eto Demerzel
    Hi everyone, I have a question concerning Json deserialization using Jackson. I would like to deserialize a Json file using a class like this one: (taken from http://wiki.fasterxml.com/JacksonInFiveMinutes) public class User { public enum Gender { MALE, FEMALE }; public static class Name { private String _first, _last; public String getFirst() { return _first; } public String getLast() { return _last; } public void setFirst(String s) { _first = s; } public void setLast(String s) { _last = s; } } private Gender _gender; private Name _name; private boolean _isVerified; private byte[] _userImage; public Name getName() { return _name; } public boolean isVerified() { return _isVerified; } public Gender getGender() { return _gender; } public byte[] getUserImage() { return _userImage; } public void setName(Name n) { _name = n; } public void setVerified(boolean b) { _isVerified = b; } public void setGender(Gender g) { _gender = g; } public void setUserImage(byte[] b) { _userImage = b; } } A Json file can be deserialized using the so called "Full Data Binding" in this way: ObjectMapper mapper = new ObjectMapper(); User user = mapper.readValue(new File("user.json"), User.class); My problem is the usage of the inner class "Name". I would like to do the same thing without using inner classes. The "User" class would became like that: import Name; import Gender; public class User { private Gender _gender; private Name _name; private boolean _isVerified; private byte[] _userImage; public Name getName() { return _name; } public boolean isVerified() { return _isVerified; } public Gender getGender() { return _gender; } public byte[] getUserImage() { return _userImage; } public void setName(Name n) { _name = n; } public void setVerified(boolean b) { _isVerified = b; } public void setGender(Gender g) { _gender = g; } public void setUserImage(byte[] b) { _userImage = b; } } This means to find a way to specify to the mapper all the required classes in order to perform the deserialization. Is this possible? I looked at the documentation but I cannot find any solution. My need comes from the fact that I use the Javassist library to create such classes, and it does not support inner or anonymous classes. Thank you in advance

    Read the article

  • Spring MVC return ajax response using Jackson

    - by anshumn
    I have a scenario where I am filling a dropdown box in JSP through AJAX response from the server. In the controller, I am retuning a Collection of Product objects and have annotated the return type with @ResponseBody. Controller - @RequestMapping(value="/getServicesForMarket", method = RequestMethod.GET) public @ResponseBody Collection<Product> getServices(@RequestParam(value="marketId", required=true) int marketId) { Collection<Product> products = marketService.getProducts(marketId); return products; } And Product is @Entity @Table(name = "PRODUCT") public class Product implements Serializable { private static final long serialVersionUID = 1L; private int id; private Market market; private Service service; private int price; @Id @GeneratedValue(strategy = GenerationType.AUTO) public int getId() { return id; } public void setId(int id) { this.id = id; } @ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name = "MARKET_ID") public Market getMarket() { return market; } public void setMarket(Market market) { this.market = market; } @ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name = "SERVICE_ID") public Service getService() { return service; } public void setService(Service service) { this.service = service; } @Column(name = "PRICE") public int getPrice() { return price; } public void setPrice(int price) { this.price = price; } } Service is @Entity @Table(name="SERVICE") public class Service implements Serializable { /** * */ private static final long serialVersionUID = 1L; private int id; private String name; private String description; @Id @GeneratedValue @Column(name="ID") public int getId() { return id; } public void setId(int id) { this.id = id; } @Column(name="NAME") public String getName() { return name; } public void setName(String name) { this.name = name; } @Column(name="DESCRIPTION") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } } In the JSP, I need to get the data from the service field of Product also. So I in my JQuery callback function, I have written like product.service.description to get the data. It seems that by default Jackson is not mapping the associated service object (or any other custom object). Also I am not getting any exception. In the JSP, I do not get the data. It is working fine when I return Collection of some object which does not contain any other custom objects as its fields. Am I missing any settings for this to work? Thanks!

    Read the article

  • Handling Unknown JSON Properties with Jackson

    - by henrik_lundgren
    Hi, For deserializing json with unknown field into an object there's @JsonAnySetter. But what if I read such json into my object, modify some known fields and write it back to json? The unknown properties will be lost. How do I handle such cases? Is it possible to map an object or do I have to read the data into a JsonNode or Map?

    Read the article

  • Parse simple JSON with Jackson

    - by siik
    Here is my JSON: { "i": 53691, "s": "Something" } Here is my model: public class Test() { private int i; private String s; public setInt(int i){ this.i = i; } public setString(String s){ this.s = s; } // getters here } Here is my class for server's response: public class ServerResponse(){ private Test; public void setTest(Test test){ this.test = test;} public Test getTest(){ return Test; } } When I do: ObjectMapper mapper = new ObjectMapper(); mapper.readValue(json, serverResponse); I'm getting an exception like: JsonProcessingException: Unrecognized field "i" (Class MyClass), not marked as ignorable Please advice.

    Read the article

  • Podcast: Advanced MVVM with Josh Smith

    - by craigshoemaker
    Author, Microsoft MVP and accomplished pianist Josh Smith, Sr. UX Developer at IdentityMine, joins the show to discuss some of Model View ViewModel’s more advanced scenarios. Full Speed: download Fast Version: download Josh shares is experience using MVVM gives some real-world advice on: Using modal dialogs Evils and virtues of code behind in views Use of attached behaviors Undo/redo strategies Working with animations Building a task based architecture for managing communication between View and ViewModel Frameworks in the MVVM space The Book Get first-hand experience implementing the solutions to the challenges discussed in the show by reading Josh’s new book ‘Advanced MVVM’. Resources The following resources are mentioned in the show: Laurent Bugnion's mix talk ‘Understanding the Model-View-ViewModel Pattern Josh Smith’s MVVM Foundation Laurent Bugnion’s MVVM Light framework Rob Eisenberg's Caliburn

    Read the article

  • Java Spotlight Episode 97: Shaun Smith on JPA and EclipseLink

    - by Roger Brinkley
    Interview with Java Champion Shaun Smith on JPA and EclipseLink. Right-click or Control-click to download this MP3 file. You can also subscribe to the Java Spotlight Podcast Feed to get the latest podcast automatically. If you use iTunes you can open iTunes and subscribe with this link:  Java Spotlight Podcast in iTunes. Show Notes News Project Jigsaw: Late for the train: The Q&A JDK 8 Milestone schedule The Coming M2M Revolution: Critical Issues for End-to-End Software and Systems Development JSR 355 passed the JCP EC Final Approval Ballot on 13 August 2012 Vote for GlassFish t-shirt design GlassFish on Openshift JFokus 2012 Call for Papers is open Who do you want to hear in the 100 JavaSpotlight feature interview Events Sep 3-6, Herbstcampus, Nuremberg, Germany Sep 10-15, IMTS 2012 Conference,  Chicago Sep 12,  The Coming M2M Revolution: Critical Issues for End-to-End Software and Systems Development,  Webinar Sep 30-Oct 4, JavaONE, San Francisco Oct 3-4, Java Embedded @ JavaONE, San Francisco Oct 15-17, JAX London Oct 30-Nov 1, Arm TechCon, Santa Clara Oct 22-23, Freescale Technology Forum - Japan, Tokyo Nov 2-3, JMagreb, Morocco Nov 13-17, Devoxx, Belgium Feature InterviewShaun Smith is a Principal Product Manager for Oracle TopLink and an active member of the Eclipse community. He's Ecosystem Development Lead for the Eclipse Persistence Services Project (EclipseLink) and a committer on the Eclipse EMF Teneo and Dali Java Persistence Tools projects. He’s currently involved with the development of JPA persistence for OSGi and Oracle TopLink Grid, which integrates Oracle Coherence with Oracle TopLink to provide JPA on the grid. Mail Bag What’s Cool James Gosling and GlassFish (youtube video) Every time I see a piece of C code I need to port, my heart dies a little. Then I port it to 1/4 as much Java, and feel better. Tweet by Charles Nutter #JavaFX 2.2 is really looking like a great alternative to Flex. SceneBuilder + NetBeans 7.2 = Flash Builder replacement. Tweet by Danny Kopping

    Read the article

  • Java Spotlight Episode 77: Donald Smith on the OpenJDK and Java

    - by Roger Brinkley
    Tweet An interview with Donald Smith about Java and OpenJDK. Joining us this week on the Java All Star Developer Panel are Dalibor Topic, Java Free and Open Source Software Ambassador and Arun Gupta, Java EE Guy. Right-click or Control-click to download this MP3 file. You can also subscribe to the Java Spotlight Podcast Feed to get the latest podcast automatically. If you use iTunes you can open iTunes and subscribe with this link:  Java Spotlight Podcast in iTunes. Show Notes News Jersey 2.0 Milestone 2 available Oracle distribution of Eclipse (OEPE) now supports GlassFish 3.1.2 Oracle Linux 6 is now part of the certification matrix for 3.1.2 3rd part of Spring -> Java EE 6 article series published Joe Darcy - Repeating annotations in the works JEP 152: Crypto Operations with Network HSMs JEP 153: Launch JavaFX Applications OpenJDK bug database: Status update OpenJDK Governing Board 2012 Election: Results jtreg update March 2012 Take Two: Comparing JVMs on ARM/Linux The OpenJDK group at Oracle is growing App bundler project now open Events April 4-5, JavaOne Japan, Tokyo, Japan April 11, Cleveland JUG, Cleveland, OH April 12, GreenJUG, Greenville, SC April 17-18, JavaOne Russia, Moscow Russia April 18–20, Devoxx France, Paris, France April 17-20, GIDS, Bangalore April 21, Java Summit, Chennai April 26, Mix-IT, Lyon, France, May 3-4, JavaOne India, Hyderabad, India May 5, Bangalore, Pune, ?? - JUG outreach May 7, OTN Developer Day, Mumbai May 8, OTN Developer Day, Delhi Feature InterviewDonald Smith, MBA, MSc, is Director of Product Management for Oracle. He brings worldwide enterprise software experience, ranging from small "dot-com" through Fortune 500 companies. Donald speaks regularly about Java, open source, community development, business models, business integration and software development politics at conferences and events worldwide including Java One, Oracle World, Sun Tech Days, Evans Developer Relations Conference, OOPSLA, JAOO, Server Side Symposium, Colorado Software Summit and others. Prior to returning to Oracle, Donald was Director of Ecosystem Development for the Eclipse Foundation, an independent not-for-profit foundation supporting the Eclipse open source community. Mail Bag What’s Cool OpenJDK 7 port to Haiku JEP 154: Remove Serialization Goto for the Java Programming Language

    Read the article

  • How can I enable Pascal casing by default when using Jackson JSON in Spring MVC?

    - by bhilstrom
    I have a project that uses Spring MVC to create and handle multiple REST endpoints. I'm currently working on using Jackson to automatically handle the seralization/deserialization of JSON using the @RequestBody and @ResponseBody annotations. I have gotten Jackson working, so I've got a starting point. My problem is that our old serialization was done manually and used Pascal casing instead of Camel casing ("MyVariable" instead of "myVariable"), and Jackson does Camel casing by default. I know that I can manually change the name for a variable using @JsonProperty. That being said, I do not consider adding "@JsonProperty" to all of my variables to be a viable long-term solution. Is there a way to make Jackson use Pascal casing when serializing and deserializing other than using the @JsonProperty annotation?

    Read the article

  • "Oracle Fusion Is Worth Your Consideration," States Mark Smith of Ventana Research

    - by Richard Lefebvre
    After attending OOW 2012, Mark Smith of Ventana Research has written a great blog post on Oct 4th, 2012 titled "Oracle Fusion for CRM and HCM Ready with a Mobile Tap." In this blog post, Mark goes on to say: "It was a great opportunity to get close to the Oracle Fusion Applications, which the company presented as proven and ready, with customers using them on-premises and in private and public cloud computing usage methods. In keynotes from executives Larry Ellison, Mark Hurd and Thomas Kurian and application-focused sessions with executives Steve Miranda and Chris Leone, Oracle repeated the message that Fusion Applications are not just for cloud computing and web services but are also accessible through mobile technology called Oracle Fusion Tap that operates natively on the Apple iPad. The company left no confusion about its applications' readiness for cloud and mobile computing, and provided insight into future advancements." Mark also states: " After two days of Oracle and customer sessions, along with a visit to the demonstration stands in the exposition area, it was clear that Oracle has made an important change in its approach to the market and its executive-level commitment to Fusion Applications. I saw more dialogue with partners to complement its applications, and many announcements, including Oracle's on partners in Fusion CRM, who were also visible during presentations and demonstrations." In closing, Mark makes the following proclamation: "Oracle Fusion is worth your consideration whether you are considering a move to cloud computing or still run applications on-premises or use a hybrid approach which provides more choices to customers than just a cloud computing only approach. We are now in a renaissance of business driving what it needs from business applications, and vendors that convince business they can be trusted will be at the center of a new world of cloud, mobile and social computing." This post is really worth a read. You can find the entire post here.

    Read the article

  • jackson failing to map empty array with No content to map to Object due to end of input

    - by ijabz
    I send a query to an api and map the json results to my classes using Jackson. When I get some results it works fine, but when there are no results it fails with java.io.EOFException: No content to map to Object due to end of input at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2766) at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2709) at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1854) at com.jthink.discogs.query.DiscogsServerQuery.mapQuery(DiscogsServerQuery.java:382) at com.jthink.discogs.query.SearchQuery.mapQuery(SearchQuery.java:37)* But the thing is the api isn't returning nothing at all, so I dont see why it is failing. Here is the query: http://api.discogs.com/database/search?page=1&type=release&release_title=nude+and+rude+the+best+of+iggy+pop this is what I get back { "pagination": { "per_page": 50, "pages": 1, "page": 1, "urls": {}, "items": 0 }, "results": [] } and here is the top level object Im trying to map to public class Search { private Pagination pagination; private Result[] results; public Pagination getPagination() { return pagination; } public void setPagination(Pagination pagination) { this.pagination = pagination; } public Result[] getResults() { return results; } public void setResults(Result[] results) { this.results = results; } } Im guessing the problem is something to do with the results array being returned being blank, but cant see what Im doing wrong EDIT: The comment below was correct, although I usually receive { "pagination": { "per_page": 50, "pages": 1, "page": 1, "urls": {}, "items": 0 }, "results": [] } and in these cases there is no problem but sometimes I seem to just get an empty String. Now Im wondering if the problem is how I read from the inputstream if (responseCode == HttpURLConnection.HTTP_OK) InputStreamReader in= new InputStreamReader(uc.getInputStream()); BufferedReader br= new BufferedReader(in); while(br.ready()) { String next = br.readLine(); sb.append(next); } return sb.toString(); } although I dont read until I get the response code, is it possible that the first time I call br.ready() that I call it before it is ready, and therefore I don't read the input EDIT 2: Changing above code to simply String line; while ((line = br.readLine()) != null) { sb.append(line); } resolved the issue.

    Read the article

  • Book Review: Inside Windows Communicat?ion Foundation by Justin Smith

    - by Sam Abraham
    In gearing up for a new major project, I have taken it upon myself to research and review various aspects of our Microsoft stack of choice seeking new creative ways for us to leverage in our upcoming state-of-the-art solution projected to position us ahead of the competition. While I am a big supporter of search engines and online articles as a quick and usually reliable source of information, I have opted in my investigative quest to actually “hit the books”.  I have also made it a habit to provide quick reviews for material I go over hoping this can be of help to someone who may be looking for items others may have had success using for reference. I have started a few months ago by investigating better ways to implementing, profiling and troubleshooting SQL Server 2008. My reference of choice was Itzik Ben-Gan et al’s “Inside Microsoft SQL Server 2008” series. While it has been a month since my last book review, this by no means meant that I have been sitting idle. It has been pretty challenging to balance research with the continuous flow of projects and deadlines all while balancing that with my family duties which, of course, always comes first. In this post, I will be providing a quick review of my latest reading: Inside Windows Communication Foundation by Justin Smith. This book has been on my reading list for a very long time and I am proud to have finally tackled it. Justin’s book presents a great coverage of WCF internals. His simple, concise and well-worded style has simplified the relatively complex internals of WCF and made it comprehensible. Justin opted to organize the book into three parts: an introduction to WCF, coverage of the Channel Layer and a look at WCF internals at the ServiceModel layer. Part I introduced the concepts and made the case behind WCF while covering a simplified version of WCF’s message patterns, endpoints and contracts. In Part II, Justin provided a thorough coverage of the internals of Messages, Channels and Channel Managers. Part III concluded this nice reading with coverage of Bindings, Contracts, Dispatchers and Clients. While one would not likely need to extend WCF at that low level of the API, an understanding of the inner-workings of WCF is a must to avoid pitfalls mainly caused by misinformation or erroneous assumptions. Problems can quickly arise in high-traffic hosted solutions, but most can be easily avoided with some minimal time investment and education. My next goal is to pay a closer look at WCF from the programmer’s API perspective now that I have acquired a better understanding of its inner working.   Many thanks to the O’Reilly User Group Program and its support of our West Palm Beach Developers’ Group.   Stay tuned for more… All the best, --Sam

    Read the article

  • (and a new ray smith equipment webpage)

    - by raysmithequip
    Originally posted on: http://geekswithblogs.net/raysmithequip/archive/2013/10/15/154351.aspxPlease bear with me, apparently we lost jabry.com to what I am not sure.  I have yet another webpage coming to http://www.raysmithequip.netai.net/ . Right now it is pretty bare, I just spent an hour configuring web matrix 2.0 (3 no likey like vista!!).  I should have the shoppers corner sub page back up intime for black friday though, soo keep your eyes posted.To keep you busy meantime, be sure to check out inmoov, a really cool open source 3d printed diy robot.I chanced upon it from the dangerous prototypes web site some time ago and consider it the one project that will rock the world in the immediate future.inmoov.blogspot.com/ raysmithn3twu

    Read the article

  • Trying to reconcile global ip address and Vhosts

    - by puk
    I have been using my local machine as a web server for a while, and I have several websites set up locally on my machine, all with similar Vhost files like the one seen here /etc/apache2/sites-available/john.smith.com: <VirtualHost *:80> RewriteEngine on RewriteOptions Inherit ServerAdmin www-data@john.smith.com ServerName john.smith.com ServerAlias www.john.smith.com DocumentRoot /home/john/smith # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost CustomLog /var/log/apache2/access.log comonvhost </VirtualHost> then I set up the /etc/hosts file like so for every Vhost: 192.168.1.100 www.john.smith.com john.smith.com 192.168.1.100 www.jane.smith.com jane.smith.com 192.168.1.100 www.joe.smith.com joe.smith.com 192.168.1.100 www.jimbob.smith.com jimbob.smith.com Now I am hosting my friend's website until he gets a permanent domain. I have port forwarding set up to redirect port 80 to my machine, but I don't understand how the global ip fits into all of this. Do I for example use the following web site addresses (assume global ip is 12.34.56.789): 12.34.56.789.john.smith 12.34.56.789.jane.smith 12.34.56.789.joe.smith 12.34.56.789.jimbob.smith

    Read the article

  • Josh Smith's MVVM Demo App: Add commands to MainWindowViewModel's command list

    - by MAD9
    I have a question concerning Josh Smith's famous demo app on MVVM. I try building a "real" application around it to learn WPF. He creates this CommandsList in the MainWindowViewModel containing 2 Commands (create new and view all customers). This list is readonly (why? any particular reason?). I thougt it would be nice to add and remove some commands, depending on the workspace that is currently selected. Like edit or delete a customer when it has the focus and so on. How would I accomplish this?! Can I just make it a normal list and add commands? Or bind the Commands-View to a commands list of the selected workspace instead of the MainWindow? How? Any other ways? Please share your ideas! Thank you very much!

    Read the article

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