Regarding Spring an hibernate as WebService

Dear All
I need to develop a Webservice with Spring and Hibernate and need to import 
as Java Bean Model in NWDS!
Does any body have small application Source code to develop spring and Hibernate as Webservice?
or let me know how to proceed ?
Thanks
Shravan

Hi Shravan,
first of all I am wondering about the usage scenario. Why do you want to develop with Hibernate and Spring and then convert it to EJB? How about directly starting with EJBs. Developing Web Services based on EJB is pretty straightforward in NWDS. Even simpler if you are using Enterprise Service Builder to generate the wsdls.
If you want to stick with your choice I would recommend you to have a look on the official spring website. There are a lot of tutorials and samples for all components of spring, including web services: [http://static.springsource.org/spring-ws/sites/1.5/reference/html/tutorial.html|http://static.springsource.org/spring-ws/sites/1.5/reference/html/tutorial.html].
Kind Regards,
Carl Heckmann

Similar Messages

  • Transfer Object in JSF, Spring, and Hibernate

    The application on which I am working deploys the JavaServer Faces, Spring and Hibernate frameworks.
    We are going to use the "transfer object" to move data between J2EE tiers from the front end to the back end and vice versa. In addition, data "types" may need to be converted --
    At the front end, the "type" of the data that are entered by users may not match that in the database table. For example, checkboxes may be marked or left blank by users. The "type" of the checkboxes is "boolean" in the JSF backing bean. However, we have either "Y" or "N" for the corresponding field in the database table.
    The JSF backing bean holds data as well as controller functionality. Of course, the transfer object holds data only.
    With regard to class properties, Is the transfer object an exact copy of the JSF backing bean? And at which tier the data are converted to match their correspoding "types" in the database tables?
    We also have the "data objects" which are exact representation of database tables.
    Thanks for your advices.

    Small example: you can decide in the business layer
    whether to convert it to boolean or Boolean (which
    has a 3rd state: null).But it all goes back to your data model. If your data model supports null for that property, then of course boolean is a poor choice. If that case one could use Boolean. None of this has anything to do with re-usability, which was your objection.
    I think the re-usability question goes back to the data model as well. Suppose your data model says this property is boolean valued. However if your database does not support booleans natively, then you need to map the value for storage in the database. But that is the data persistence layers problem.
    OTOH, suppose your data model says that this property may be 'Y' or 'N'. Then the Java class represent the business object should not have a boolean property, we should make it match the data model.
    However, I think that most cases where people are storing 'Y' or 'N' in a field in the database fall into the first case, where the data model is a boolean and they are working around limitations in the database. There is no reason in that case to perpetuate the same limitations in the Java code.

  • WebDynpro Importing Model as Spring and Hibernate

    hi guys,
    Can any one tell me clearly about how to import model(Spring and HIbernate) in WebDynpro for java
    Thanks & Regards
    RK

    Hi Ramakrishna,
    Spring and Hibernate is used for Database access instead of EJB.
    To import spring and Hibernate model Use Either <b> Import Adaptive Web Service Model </b> or <b> Import Java Bean Model </b> by right Click on Models.
    WebDynpro with Hybernate
    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/e081a4b6-0801-0010-7fa4-c3c7a0454815 [original link is broken]
    Regards,
    Mithu

  • JSF, Springs and Hibernate

    Hi,
    I am a newbie. I would like to know the books i need to refer to, inorder to learn JSF, springs and hibernate.
    Thank you,

    The_Matrix wrote:
    CeciNEstPasUnProgrammeur wrote:
    How about learning Java first?
    At least for JSPs, there are free online tutorials from Sun. There are likely to be similar resources for Spring and Hibernate.I Know Java. I am a Sun Certified Java Programmer. I also know know J2EE. I am trying to learn the new technologies. Therefore i mentioned that i am a newbie, it was pertianing to JSF, Springs and Hibernate. Not to Java.In that case:
    Core Java Server Faces (2nd edition)
    Java Persistence with Hibernate
    Pro Spring 2.5
    Expert Spring MVC and Web Flow
    Together with the product documentation those should make a decent bit of reading.

  • Training material on JSF, Spring and Hibernate

    Hi All,
    I'm new to JSF. I need some good training material on JSF, Spring and Hibernate.
    I've tried lot many tutorials online, but cannot find a real good one.
    Also I need to learn how we can integrate together JSF, Spring and Hibernate to build web applications.
    Thanks
    Payal

    As far as documentation vs examples, that depends on the individual.
    The Spring documentation is quite large, but Spring itself is very modular. So you can pretty much get away with reading the pieces you need when you need them and ignoring the rest.
    Start with inversion of control until you feel you understand the concept. At its core, the idea is simple. Suppose you have a business class, FooService, and it needs to utilize BarService to implement its business logic. The non-Spring way would be to have the FooService class be responsible for getting an instance of BarService. The Spring way is for FooService to have a setter to be given an instance of BarService:
    public class FooServiceImpl implements FooService
        private BarService barService;
        public void setBarService(BarService barService) { this.barService = barService; }
    }Then the Spring container is used to "wire together" the instances:
    <beans>
        <bean id="barService" class="BarServiceImpl" />
        <bean id="fooService" class="FooServiceImpl">
            <property name="barService" ref="barService" />
        </bean>
    </beans>Note the advantage when using the classes in different contexts, e.g. unit testing vs production.
    If I were you, I would take the sample app you have already done with JSF and try to integrate Spring into it. Move all the business logic into beans in the Spring container while keeping the view logic in the JSF layer.

  • Issues while deploying Spring 3+Hibernate 4+Weblogic 12C app

    Hi,
    We are migrating spring 2.5 to 3.1 and hibernate 3.4 to 4.1 During this migration, we got some JPA2 issues on weblogic 10.3, so we moved to weblogic 12C to get hibernate 4 working ...but getting below exception while deploying the war. Please guide.
    java.lang.NoSuchMethodError: org.hibernate.cfg.Configuration.addAnnotatedClass(Ljava/lang/Class;)Lorg/hibernate/cfg/Configuration;
    My POM file is,
    <dependencies>
              <dependency>
                   <groupId>antlr</groupId>
                   <artifactId>antlr</artifactId>
                   <version>2.7.7</version>
              </dependency>
              <dependency>
              <groupId>xml-apis</groupId>
              <artifactId>xml-apis</artifactId>
              <version>1.0.b2</version>
              <scope>provided</scope>
              </dependency>
              <dependency>
              <groupId>stax</groupId>
              <artifactId>stax-api</artifactId>
              <version>1.0.1</version>
              <scope>provided</scope>
              </dependency>
              <dependency>
                   <groupId>javax.persistence</groupId>
                   <artifactId>persistence-api</artifactId>
                   <version>1.0</version>
              </dependency>
              <dependency>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring-aop</artifactId>
              </dependency>
              <!--<dependency>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring-aspects</artifactId>
              </dependency> -->
              <dependency>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring-beans</artifactId>
              </dependency>
              <dependency>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring-context</artifactId>
              </dependency>
              <dependency>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring-core</artifactId>
              </dependency>
              <dependency>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring-jdbc</artifactId>
              </dependency>
              <dependency>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring-orm</artifactId>
              </dependency>
              <dependency>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring-tx</artifactId>
              </dependency>
              <dependency>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring-jms</artifactId>
              </dependency>
              <dependency>
                   <groupId>org.springframework.webflow</groupId>
                   <artifactId>spring-faces</artifactId>
                   <version>${springWebFlow.version}</version>
              </dependency>
              <dependency>
                   <groupId>org.hibernate</groupId>
                   <artifactId>hibernate-validator</artifactId>
              </dependency>
              <dependency>
                   <groupId>javax.annotation</groupId>
                   <artifactId>jsr250-api</artifactId>
                   <version>1.0</version>
              </dependency>
              <dependency>
                   <groupId>javax.transaction</groupId>
                   <artifactId>jta</artifactId>
                   <version>1.1</version>
              </dependency>
              <dependency>
                   <groupId>javax.faces</groupId>
                   <artifactId>jsf-api</artifactId>
                   <version>${jsf.version}</version>
              </dependency>
              <dependency>
                   <groupId>commons-lang</groupId>
                   <artifactId>commons-lang</artifactId>
                   <version>2.1</version>
              </dependency>
              <dependency>
                   <groupId>org.hibernate</groupId>
                   <artifactId>hibernate-core</artifactId>
                   <version>4.1.1.Final</version>
                   <exclusions>
                        <exclusion>
                             <artifactId>antlr</artifactId>
                             <groupId>antlr</groupId>
                        </exclusion>
                   </exclusions>
              </dependency>
              <!--<dependency>
                   <groupId>org.hibernate</groupId>
                   <artifactId>hibernate-jmx</artifactId>
                   <version>3.3.2.GA</version>
              </dependency>-->
              <!--<dependency>
                   <groupId>org.hibernate</groupId>
                   <artifactId>hibernate-commons-annotations</artifactId>
                   <version>3.3.0.ga</version>
              </dependency>-->
              <dependency>
                   <groupId>log4j</groupId>
                   <artifactId>log4j</artifactId>
              </dependency>
              <dependency>
                   <groupId>weblogic</groupId>
                   <artifactId>weblogic.jms.client</artifactId>
                   <version>11</version>
              </dependency>
              <dependency>
                   <groupId>commons-beanutils</groupId>
                   <artifactId>commons-beanutils-core</artifactId>
                   <version>1.8.3</version>
              </dependency>
              <dependency>
                   <groupId>commons-dbutils</groupId>
                   <artifactId>commons-dbutils</artifactId>
                   <version>1.3</version>
              </dependency>
              <dependency>
                   <groupId>org.hibernate</groupId>
                   <artifactId>hibernate-entitymanager</artifactId>
                   <version>4.1.1.Final</version>
              </dependency>
              <dependency>
                   <groupId>org.slf4j</groupId>
                   <artifactId>slf4j-api</artifactId>
                   <version>1.5.9.RC1</version>
              </dependency>
              <dependency>
                   <groupId>org.slf4j</groupId>
                   <artifactId>slf4j-log4j12</artifactId>
                   <version>1.5.9.RC1</version>
              </dependency>
              <dependency>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring-test</artifactId>
                   <scope>test</scope>
              </dependency>
              <dependency>
                   <groupId>junit</groupId>
                   <artifactId>junit</artifactId>
                   <scope>test</scope>
              </dependency>
              <dependency>
                   <groupId>oracle</groupId>
                   <artifactId>ojdbc6</artifactId>
                   <version>11.2.0.1.0</version>
              </dependency>
              <dependency>
                   <groupId>commons-jxpath</groupId>
                   <artifactId>commons-jxpath</artifactId>
                   <version>1.3</version>
              </dependency>
              <dependency>
                   <groupId>javax.mail</groupId>
                   <artifactId>mail</artifactId>
                   <version>1.4.1</version>
              </dependency>
              <dependency>
                   <groupId>com.sun.xml.bind</groupId>
                   <artifactId>jaxb-impl</artifactId>
                   <version>2.2.1.1</version>
                   <exclusions>
                        <exclusion>
                             <artifactId>stax-api</artifactId>
                             <groupId>javax.xml.stream</groupId>
                        </exclusion>
                   </exclusions>
              </dependency>
              <dependency>
                   <groupId>cglib</groupId>
                   <artifactId>cglib-nodep</artifactId>
              </dependency>
              <dependency>
                   <groupId>com.cgi.sipcip</groupId>
                   <artifactId>SipCipBuild</artifactId>
                   <version>1.0</version>
                   <scope>compile</scope>
              </dependency>
              <dependency>
                   <groupId>net.sf.ehcache</groupId>
                   <artifactId>ehcache-core</artifactId>
                   <version>2.4.2</version>
              </dependency>
              <dependency>
                   <groupId>com.googlecode.ehcache-spring-annotations</groupId>
                   <artifactId>ehcache-spring-annotations</artifactId>
                   <version>1.1.3</version>
              </dependency>
              <dependency>
                   <groupId>org.codehaus.groovy</groupId>
                   <artifactId>groovy</artifactId>
                   <exclusions>
                        <exclusion>
                             <artifactId>antlr</artifactId>
                             <groupId>antlr</groupId>
                        </exclusion>
                   </exclusions>
              </dependency>
              <dependency>
                   <groupId>org.mockito</groupId>
                   <artifactId>mockito-all</artifactId>
                   <scope>test</scope>
              </dependency>
              <dependency>
              <groupId>commons-validator</groupId>
              <artifactId>commons-validator</artifactId>
              <version>1.4.0</version>
              </dependency>
              <dependency>
              <groupId>commons-net</groupId>
              <artifactId>commons-net</artifactId>
              <version>3.0.1</version>
              </dependency>
              <!-- Lab Upgrade change for spring 3.1.1-->
              <dependency>
                   <groupId>org.aspectj</groupId>
                   <artifactId>aspectjrt</artifactId>
                   <version>1.6.6</version>
              </dependency>
              <dependency>
                   <groupId>asm</groupId>
                   <artifactId>asm</artifactId>
                   <version>1.5.3</version>
              </dependency>
         </dependencies>
    Thanks
    Shilpa

    984456 wrote:
    java.lang.NoSuchMethodError: org.hibernate.cfg.Configuration.addAnnotatedClass(Ljava/lang/Class;)Lorg/hibernate/cfg/Configuration;
    Thanks
    ShilparClear indication of class path issue, please correct the hibernate files. appropriately.
    Hope this helps.
    Regards,
    Jeets.

  • How to use multiple datasource in spring and hibernate

    HI all,
    I want to use multiple data source for my web application.Please suggest me the mapping of xml files viz.
    applicationContext-resource.xml,applicationContext-hibernate.xml and applicationContext-service.xml
    SHoud i create separate session factory and transaction manager for both the datasource?
    Here is my applicationContext-resource.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
        "http://www.springframework.org/dtd/spring-beans.dtd">
    <beans>
    <bean id="dataSource" 
              class="org.apache.commons.dbcp.BasicDataSource">
              <property name="url" value="jdbc:oracle:thin:@192.168.x.x:1521:orcl"/>
              <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
              <property name="username" value="dw_lt_staging"/>
              <property name="password" value="dw_lt_staging"/>
    </bean>      
    <bean id="dataSourceAnalytics" 
              class="org.apache.commons.dbcp.BasicDataSource">
              <property name="url" value="jdbc:oracle:thin:@192.168.y.y:1521:orcl"/>
              <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
              <property name="username" value="dw_analytics"/>
              <property name="password" value="dw_analytics"/>
    </bean>            
    </beans>Thanks in advance.

    HI all,
    I want to use multiple data source for my web application.Please suggest me the mapping of xml files viz.
    applicationContext-resource.xml,applicationContext-hibernate.xml and applicationContext-service.xml
    SHoud i create separate session factory and transaction manager for both the datasource?
    Here is my applicationContext-resource.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
        "http://www.springframework.org/dtd/spring-beans.dtd">
    <beans>
    <bean id="dataSource" 
              class="org.apache.commons.dbcp.BasicDataSource">
              <property name="url" value="jdbc:oracle:thin:@192.168.x.x:1521:orcl"/>
              <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
              <property name="username" value="dw_lt_staging"/>
              <property name="password" value="dw_lt_staging"/>
    </bean>      
    <bean id="dataSourceAnalytics" 
              class="org.apache.commons.dbcp.BasicDataSource">
              <property name="url" value="jdbc:oracle:thin:@192.168.y.y:1521:orcl"/>
              <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
              <property name="username" value="dw_analytics"/>
              <property name="password" value="dw_analytics"/>
    </bean>            
    </beans>Thanks in advance.

  • Exposing spring's beans as Webservices

    Hello there! We need to expose our Spring based application beans as webservices. I know how to do this using Axis, as its well documented on the Spring documentation. But how can I specify specific ServletEndpoints for my webservices on Oracle AS 10.1.2?
    Regards

    Is it possible to expose a different endpoint on Oracle? I can't find anything in the (poor) Oracle's documentation

  • Spring and Hibernate.

    Hi
    Can someone please let me know why there is a need to integrate Hibernate with Spring. Sping provides JDBC templates to work with persistance storage so why use Hibernate.
    I know Hibernate is O/R Mapping framework. I need some concrete differences with what i can do with Hibernate and not with Spring.

    ...and the same can be done using JDO (in particular
    Kodo JDO), or Apache's OJB (ObJectrelational Bridge),
    integrated via Spring's ORM framework support.
    This is hardly a Hibernate-specific added value.Of course, but that's how the OP phrased the original question. Perhaps a better question would have read "JDBC versus other persistence strategies in Spring".
    If there are indeed some present issues with the
    application that could be addressed with
    lazy-loading, then the OP could look into
    different solutions ( of which Hibernate is only one
    ) to be integrated with the existing Spring
    framework,.The OP appears to be asking whether using straight JDBC with Spring is good enough, and what were reasons s/he hadn't considered for going with another persistence scheme.
    If there are no issues to address, then there is no
    need for such a thing.You're no better at reading their mind than I am. I just tried to answer the question as written.
    %

  • J2ee vs struct vs spring vs hibernate

    Hi,
    may I know the diffference above
    Thanks
    Jimmy

    jwenting wrote:
    georgemc wrote:
    They are four distinct concepts that cannot possibly be compared in any meaningful way. Might as well ask "cheese vs spanner vs cuban missile crisis vs philately"But those are related concepts!
    Because of a bad batch of French cheese a ship carrying some Soviet missiles was impounded in Cuba. The captain had no stamps to mail a letter to the Soviet ministery of defence to ask for assistance, throwing a spanner in his plans to continue his voyage. An American aircraft caught the missiles on the ground while the ship was being aired out to get rid of the stench, photos that were misinterpreted and caused the Cuban missile crisis."Spanner in his plans"? I'm not letting you get away with that! You're fired

  • Realtime information and question of spring and hibernate?

    please send questions and answers.

    Hi Mike,
    I don't think, you will be able to retrieve the DPAYH\DPAYP data once it gets deleted SAP using the SAP program RFKPYD00.
    On a pro active basis, you can go for either of the following options-
    Option-1
    DPAYH/DPAYP contains payment data as well as exception data for the various payment runs.However, the main concern is the payment data, as it is the data that is sent to the bank.
    These payment data can be easily segregated from the exception data based on the field (DPAYH-GRPNO).
    So you  can create two custom  tables like DPAYH\DPAYP in IS-U and store only the payment data along with the relevant fields that you want to store for future references.
    You can update these custom tables during the processing of the payment medium job (creation of the file that is sent to bank),
    Option-2
    If your SAP IS-U system is connected to BW\BI, then you can also retrieve the  payment relevant data from the DPAYH\DPAYP tables in to BW\BI through a BW\BI extractor and then design a report which will give you the relevant details.
    Thanks,
    Amlan

  • A beginner to design pattern(Struct,Spring & Hibernate framework)

    Actually I am beginner to MVC2 Approach of complex application incorporated by design pattern as Struct,Spring & Hibernate framework.
    Currently I am learning JSP Concepts,I have one doubt.
    (1)What are the things I should grasp even before taking off to Design pattern?
    Help me anyone plz?
    With Regards,
    Stalin.G

    [email protected] wrote:
    Actually I am beginner to MVC2 Approach of complex application incorporated by design pattern as Struct,Spring & Hibernate framework.
    Currently I am learning JSP Concepts,I have one doubt.Just one?
    >
    (1)What are the things I should grasp even before taking off to Design pattern?You should understand core Java very, very well.
    You should know JSPs using JSTL without scriptlets.
    You should understand relational databases and SQL.
    You should understand HTML and HTTP.
    Personally I think Struts, Spring, and Hibernate all at once are well beyond any beginner.
    It's hard to advise you on what to do without knowing your capabilities and the problem you're trying to solve, but I think you should try it first using just JSPs, servlets, and JDBC. Get that to work and then refactor it to use the frameworks. You'll understand and appreciate them more that way.
    %

  • ADF Libs with Eclipse Hibernate/Spring Configuration

    Hi
    I have been using Spring and Hibernate in our projects.
    Now we plan to use ADF in the same project.
    I would like to know whether the JDeveloper 11g R2 with ADF Libs conflict with Eclipse Spring/Hibernate Configuration.
    Thanks in advance..
    Regards,
    Bala

    here is one how to use spring, and for Hibernate, since JPA support is there shouldn't be a problem
    http://technology.amis.nl/blog/765/spring-and-oracle-adf-registering-a-pojo-spring-jdbc-based-business-service-as-data-control.
    As far as eclipse is concerned, oracle has its only flavor of eclipse but i doubt it has the full features of ADF
    http://www.oracle.com/technetwork/developer-tools/eclipse/downloads/index.html
    Edited by: in the line of fire on Jul 26, 2011 12:11 PM

  • Tutorials on Spring & Hibernate

    Hi All
    i want to know some good turorials on Spring and Hibernate from you all. i searched the net but i am unable to get any good materials on these topics especially Spring.can you please let meknow any good online tutorials on these topics as i am very new to these topics.
    i hope you will help me in this matter. waiting for a positive reply from your side.
    Regards
    Vikeng

    Google "spring tutorial" and "hibernate tutorial". You'd have to be an idiot not to find a bunch of them. Avoid the roseIndia tutorials, though, they seem to be written by people who have never actually done what they're tutoring in production, but just a digest of other tutorials

  • Must I use spring Framework with JSF2 and Hibernate?

    Hi all,
    I'm starting to develop a web portal and I would use JSF2 and Hibernate.
    Now I don't know JSF2 so I searched some tutorial.
    I found a tutorial on JSF2 that seems very complete but in this tutorial I found a section where the author use Hibernate for the "model section", JSF2 for the "view section" and Spring for the "controller section"!
    Now I have a doubt, can I develop a web portal without Spring MVC or I can't develop any controller's component with JSF2?
    Thank you for your replies!

    For Ram, do you mean that JSF2 isn't a MVC framework with your reply?
    For Kayaman, the author did some examples how implements some frameworks with JSF2 and he do 3 examples:
    1) JSF2 and JDBC;
    2) JSF2 and Spring;
    3) JSF2, Spring and Hibernate!
    However, after this thread, I found a forum in linked to the tutorial and I asked why they use JSF2 and Spring together! Now Im waiting the answer!
    For Gimbla2: well, I'm novice on JSF2 but I develop for some years with ADF and JBO framework!
    You are right to tell me "On the official sites you can find all informations" but I would know some things from some one that used both frameworks!
    Thanks again to all.
    Edited by: Filippo Tenaglia on 20-giu-2011 14.16

Maybe you are looking for

  • Need to convert byte[] to image

    hi frnds, i have a byte[](which i got it from an image) i need to convert back to image.Could u pls suggest me how to?? i tried with Pixelgrabber but i exaclty did get wht shld be the input for it(tried giving image file name). :( So pls let me know

  • I can't open firefox after ATTEMPTING to update

    I was prompted to do an automatic update or uversion update, not sure which. I did, as usual, and when I came back to the computer, it stated, as usual, that Firefox needed to restart, so I closed it, and it attempted to reopen the browswer. I could

  • Use time machine to backup external hard drive (not main one)

    Hi all, I've searched for information on this and getting nowhere. Not sure if it's possible, but I have two USB hard drives now as I've run out of space on my laptop. So therefore I really use one of the hard drives for my main storage and drag file

  • Offline

    Can I collect the answers of a survey offline from a tablet or do I really need to be online? If I can be offline, is the same procedure as online?

  • Servlets/jsp

    hi, In a jsp page one name button that corresponding 5 TextField how to insert values inthe database that 5 textfield values