Set resource type and projectid

Hello together,
we want transform a xml-document in a xml-form. Therefore we had to change/set the resource type and the projectid to create xml-forms for form based publishing.
I tried this code but it doesn't work.
String namespace = "http://sap.com/xmlns/cm/app/xmlforms/<projectid>";
String name = "resourcetype";
IMutablePropertyMap mutableProperty =null;
mutableProperty = new MutablePropertyMap();
IPropertyName propertyName = new PropertyName(namespace, name);
mutableProperty.put(property);
resource.setProperty(mutableProperty);
Has anybody an idea??
Regards Theresa

Thank you very much....
I solved it with the code
String namespace = "http://sap.com/xmlns/cm/app/xmlforms/";
String name = "resourcetype";
IPropertyName propertyName = new PropertyName(namespace, name);
Boolean value = new Boolean(true);
IProperty property = new Property(propertyName, value);
IMutableProperty mutableProperty = property.getMutable();
mutableProperty.setBooleanValue(true);
resource.setProperty(property);
You know something about setting the project id???
Regards Theresa

Similar Messages

  • Business event with resources and resource type

    Hi,
    I am doing bdc for tcode pv10,i want to update the resource type and resource,i tried with it,i do not get idea,pls give me u r suggestions.
    cheers,
    karthi

    Hi,
    You need to click on the 'Resource Selection' button on the top left hand corner of the create event screen.
    If you do not see any resources there, it means you have not added resources to your event type. Go to PP01, and create relationship A022 (requires resource type).
    For rooms and materials, this is fine. For instructors, you need to create relationship A026 (is held by) also.
    Regards,
    Neha
    <i><b>PS:Reward if helpful</b></i>

  • Document types displayed as folders when arranged by set to type

    Hello everyone,
    I have an issue with the finder since upgraded to Lion.
    I use to open finder in column view with "Arranged by" set to "Type" and "Sort by" set to name. But the thing is that the titles/names of the document types are sometimes diplayed or behave as ordinary folders.
    Look at the snapshot below (sorry it's a french one): in the left column, display is fine. But in the middle one, "Dossiers", "Contacts", "Documents PDF" and "Documents" are displayed as ordinary folders.
    Note that the issue does not limit to the display. These non existing folders can be selected with my mouse.
    Moreover, it happens randomly and I checked on a new Account: issue is still there.
    So, as anyone observed that ?
    Thanks a lot,
    Nicolas.

    Sorry for the late reply, but yes this happens to me quite often.
    I have no solution to the problem, but it is rather annoying. Especially if you navigate from one column to another. The first file or folder does not get selected instead it is the "headline with the folder icon" that gets selected. Irritating and it looks terrible when highlighted.

  • What is the process of changing name of IT Resource Type without breaking..

    I need to change the name of an IT Resource Type and at the same time include additional fields. I also have existing IT Resources that are provisioned that are of the old name. What I thought I could do was to use the Design Console, bring up the IT Resource Type and simply rename it. I did that. Once I did the rename I checked my existing process form and the IT Resource Field Lookup now shows the new IT Resource Type name. Ok, so everything looks good.
    I now need to deploy this to other OIM systems. So, I exported out my IT Resource Type definition to one XML export file, and my Resource Object, Process Definition and PRocess Form and child forms to another XML export file.
    Before I imported the XML files into the other OIM system, I first ran the Design Console and renamed by IT Resource Type to the new name. Then I imported the XML containing the IT Resource Type definition and this worked. My IT Resource Type now has additional fields.
    However, when I tried to import the XML containing the Resource Object, Process Definition and Process forms, I get a dependency error that says it can't resolve the dependency on the old IT Resource Type name. Where did this come from? I checked the XML source, and sure enough it references the old IT Resource Type by name, but I can't figure out why it has that in there. But in any case, I manually edited the XML file and changed those references to the old IT Resource Type to the new name and tried to re-iimport that XML again. I still get the same dependency error.
    Now I am really confused since my XML import is not referencing the old IT Resource type name any more, so where is this dependency coming from?
    Does anyone have any ideas on this one?
    -Dave Herrmann

    You can do it with CSS disjointed rollovers like this:
    http://alt-web.com/DEMOS/CSS-Image-Viewer.shtml
    Or using a Modal Window script like this:
    http://alt-web.com/GALLERY/Photo_Gallery.html
    Or log-in to Adobe Exchange with your Widget Browser and grab the jQ Zoom widget (free).
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • [LSO] Resource types blocking

    Hi,
    We have implemented SAP LSO at a customer, but during a training course we gave to the client, we came across the following problem:
    When we are creating a course type and open the screen for attaching resource types (we have created multiple R objects) while someone else is executing the same action, SAP says the resource type is blocked by the other user (who first opened the selection screen).
    We think this is quite strange since we are not actually changing the R object, just creating a relation with the course type (object D)
    This is a problem since a large population will use LSO and probably create course types at the same time.
    Is there a way to solve this problem ?
    Thanks

    A Workaround will be create the relationship Event type-Resource type after the Event type is created. You can do this by PP01 tx.
    An example of this: centralize the creation of the relationship Event type-Resource type in one User (let's to say yourself).
    Well, when anyone creates an Event type that requires a Resource type, he/she will send the requirement to you, and save the Event type without this assignment.
    Then, in certain moment, you take the list of D objects that requires a specific Resource type, and:
    1. go to PSVR transaction
    2. select R object > right click > change
    3. (you'll go to PP01 transaction) select the Relationships infotype and create the B022 relationship for each Event type.
    Also, you can build a custom program that do something simmilar in order to automate the process.
    Alsomore, i'm thinking another workaround:
    You can change the relationship behaviour, in order to create only the "A" link when you create an Event type (that avoid to lock the resource), and then by using a program that run let's to say once a day, check every A022 relationships without the "B" link and then add the corresponding B022 relationship in R objects.
    But i think meanwhile the "B" link is not done, many reports can bring erroneus or bad information.
    Regards!

  • I've recently upgraded to Lightroom5.7.1 and now when I try to import photos a window pops up saying 'the photos can't be imported 'cos the files can't be read'. I had no problems before upgrading. I have Windows8 & can't find any 'app' which sets the typ

    I've recently upgraded to Lightroom5.7.1 and now when I try to import photos a window pops up saying 'the photos can't be imported 'cos the files can't be read'. I had no problems before upgrading. I have Windows8 & can't find any 'app' which sets the type of files I can import. Any help appreciated.

    Well, think about it. This is a Lightroom forum. We are here to answer questions about Lightroom and how to solve problems in Lightroom. Your permissions issue is an operating system issue, not a Lightroom issue. I didn't mean to be sarcastic. But there are plenty of Internet resources that will answer that question.
    I just went to Google and typed in "change disk permissions", and there are links for the Mac as well as for Windows listed. There's no sense in me rewriting instructions that are already available.

  • I need to set up an expense form so that our consultant can "filter" by customer type, program type, and finally the purpose of the trip. For instance: the customer types are churches, schools, organizations. The program type would be fund raising, gift p

    I need to set up an expense form so that our consultant can "filter" by customer type, program type, and finally the purpose of the trip. For instance: the customer types are churches, schools, organizations. The program type would be dependent on the customer type selection from the first list. Some examples would be: fund raising, gift planning, surveys, and others. The purpose of the trip would be dependent on the program type selected from the second list. Some examples of trip purposes would be: presentation, design, prospecting. Further, the purpose of trip selection from the third drop-down box would then have to determine the values of other fields by expense type: such as commission, airfare, hotel. etc. I've tried pop-up menu but can't figure out how to "select" from the final popup list and have it populate a field for the purpose of the trip. I've tried to look at the JavaScript examples for dependent drop-down boxes, but can't find any that quite fit what I'm trying to accomplish. I am very new to all of this. No training in writing Javascripts - just trying to wing it. The form has to be very simple for our consultants to use, but also give our office the detail we need to process through the correct account numbers. I would appreciate any detailed step-by-step instructions - kind of a javascript for dummies type of info. HELP!

    An AcroForm is the name given to the type of PDF form that you create in Acrobat. An XFA form is the type of form that you create in LiveCycle Designer. Although they are both PDF files, they are very different structurally and have significant;y different scripting models. So pay attention to the information on AcroForms and ignore anything about XFA. Be sure to get the sample PDF forms so you can look at how it works and where the scripts are placed.
    What you want to do will require scripting, and if you don't have the experience and are unable to use the information in the tutorials to create what you want, you might consider getting someone who has experience do this for you. I'll often suggest code if I can do so quickly, but what you want requires more than a few minutes.

  • Creation of Service Product with Set Type and Attribute

    Dear All,
    Please guide me with proper step by step process,
    How to create the product with the set type and attribute for service industry in sap crm 7.0
    Regards,

    Hi Nitin,
    Before creating the Service type of product, you have to define the Base category for Service type product. Generally the category for service will be created under the R3 hierarchy R3PRODSTYPE. You can create this category using the TCode:
    COMM_HIERARCHY. Here you have to select the product type as Service and have to assign the set types to the category.
    You can create a service product using the transaction : COMMPR01 -> Click on Service ICON -> Select the Category for Service Type. Then fill in the details for Service Product description, Service ID(Based on number range settings for products), Language.
    Also fill other details like Base Unit of measure, Pricing condition for different sales areas for the service product.
    Since you are using CRM7.0, you can do all these activities using a POWER USER role.
    For more information about Set types and hierarchies please refer the following help link:
    http://help.sap.com/saphelp_crm70/helpdata/EN/46/57672501a208e7e10000000a114a6b/frameset.htm
    Hope this helps!
    Regards,
    Chethan

  • Dreamweaver setting wrong file type and creator codes

    First of all, I'm running Mac OS X 10.5.2 on an Intel-based
    Mac, with Dreamweaver CS3 9.0 build 3481.
    I have a site defined where I connect to my web server via
    FTP. On my server, I just upgraded my forum software to PHPBB 3.0,
    which created a new /forums/ directory. My plan is to use
    Dreamweaver to download that new /forums/ directory to my local
    site where I can edit the files. Inside the forums folder are
    several types of files, like ".php" files, ".htm" files, ".gif"
    files, etc.
    So, upon downloading the /forums/ folder to my local machine
    by dragging and dropping it (in Dreamweaver) from the remote site
    to the local site, I noticed that Dreamweaver insists on setting
    HFS file type and creator codes for files it recognizes, based on
    the filename extension.
    I've connected to the same server using the Finder and
    Transmit, and copied the remote /forums/ folder over to my local
    machine. Neither of those copies have files with file types and
    creator codes set, meaning they aren't actually set on the remote
    files and that this is indeed something Dreamweaver is doing on the
    fly as it downloads the files.
    I'm wondering if there's any way possible to disable this
    behavior, and just download the files like they are on the server?
    (File extension only). To make matters worse, on my Intel-based
    Mac, it's not even setting the proper codes, as you can see in the
    following image:
    http://homepage.mac.com/mdouma46/images/dreamweaver.png
    Notice for the ".php" document, it's attempting to set a file
    type of 'TEXT' and a creator code of 'DmWr' (DreamWeaver's creator
    code), but because the Dreamweaver developers didn't bother to take
    into account the byte-ordering differences between PowerPC Macs and
    Intel Macs, the codes are written in reverse: 'TEXT' becomes
    'TXET', and 'DmWr' becomes 'rWmD'. (If you're going to use
    low-level routines such as FSSetCatalogInfo() to set the file types
    and creator codes, you need to call CFSwapInt32HostToBig() on the
    OSType values before doing so, to make sure they're in Big-endian
    format).
    Anyone know where the conversion information is stored?
    Thanks in advance.....

    Creator codes are totally deprecated in snow leopard. as for a workaround you can use something like this.
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    on open these_items
    repeat with this_item in these_items
    tell application "Finder"
    set the_file to POSIX path of (this_item as alias)
    tell application "System Events"
    set default application of file (the_file) to ("Main HD:Applications:Preview.app" as alias)
    end tell
    end tell
    end repeat
    end open</pre>
    save it as an application and drop files onto it to set them to open with Preview.

  • Set default font type and size in formcreated using Acrobat X Pro

    I have a word document that I used Acrobat X Pro to create a PDF and then a Form.  The Form has over 200 text fields.  Is there a way to globally set the font type and size to one type, for instance Arial 10 so that when someone opens the Form and fills it in, the global font type and size is preset         

    Are you talking about fields that you create manually or field created with the Form Wizard? Exactly what version of Acrobat are you using? What OS?
    In any case, using a script is a quick and easy approach:
    for (var i = 0; i < numFields; i++) {
        var fName = getNthFieldName(i);
        var f = getField(fName);
        if (f.type === "text") {
            f.textFont = font.Times;
            f.textSize = 9;
            // Other properties go here
    I use this type of thing all the time to quickly alter a form. Such a script isn't added anywhere, just executed (e.g., JavaScript console). Over time a developer can build up a collection of utility scripts that can do all sorts of things to dramatically speed up development. It would be bad if this option were not available.
    If there is a bug, it should certainly be addressed, so don't think I'm arguing against that, but I'm not seeing it on any of my systems. I can successfully set the default field properties by selecting "Use Current Properties as New Defaults". The Form Wizard does not use these defaults, but that's a different matter.

  • Acount type and Variance reporting on account member set up

    Hi
    Apologies if the question may seem obvious....
    However we are planning on loading monthly actual data into our application from a flat file where revenues are negative and costs are positive. For reporting purposes within the application we need to switch the signage.
    Therefore when setting up account members if i tag the account type as revenue or expense will this solve the issue?
    Also would anybody know what the "variance reporting" field is used for
    Many thanks

    Hi,
    Variance reporting is good when you report your data from FR or WA as these tools are financially aware of account types and settings in variance reporting.
    When you set an account as expense in variance reporting declines (between versions, months etc.) in your data for those accounts are taken as a positive change and vice versa. On the other hand, reduction in non-expense accounts are taken as negative change.
    Hence, when you create a report where you define conditional formating on variance field, increases can be shown green in revenue accounts and red in expense accounts.
    You can give this a try in Web Analysis by creating a very simple report using Sample:Basic.
    The other question you ask for can be done via a calculated field in FR or WA. Or you can create a reporting version in Planning where you can multiply expense accounts by (-1) and leave the rest as they are.
    Cheers,
    Alp

  • [svn] 1607: Set svn:mime-type and svn: eol-style on LICENSE and NOTICE files in the lib directory.

    Revision: 1607
    Author: [email protected]
    Date: 2008-05-07 17:02:39 -0700 (Wed, 07 May 2008)
    Log Message:
    Set svn:mime-type and svn:eol-style on LICENSE and NOTICE files in the lib directory.
    Modified Paths:
    flex/sdk/branches/3.0.x/lib/batik-NOTICE.txt
    flex/sdk/branches/3.0.x/lib/commons-discovery-LICENSE.txt
    flex/sdk/branches/3.0.x/lib/xalan-NOTICE.txt
    flex/sdk/branches/3.0.x/lib/xerces-LICENSE.txt
    Property Changed:
    flex/sdk/branches/3.0.x/lib/batik-LICENSE.txt
    flex/sdk/branches/3.0.x/lib/batik-NOTICE.txt
    flex/sdk/branches/3.0.x/lib/commons-collections-LICENSE.txt
    flex/sdk/branches/3.0.x/lib/commons-discovery-LICENSE.txt
    flex/sdk/branches/3.0.x/lib/commons-logging-LICENSE.txt
    flex/sdk/branches/3.0.x/lib/commons-logging-NOTICE.txt
    flex/sdk/branches/3.0.x/lib/mm-velocity-LICENSE.txt
    flex/sdk/branches/3.0.x/lib/mm-velocity-NOTICE.txt
    flex/sdk/branches/3.0.x/lib/xalan-LICENSE.txt
    flex/sdk/branches/3.0.x/lib/xalan-NOTICE.txt
    flex/sdk/branches/3.0.x/lib/xerces-LICENSE.txt

    Thanks for your attention.
    In the above logs, higher resolutions seems to be detected on both screens, hence my surprise :
    [ 391.631] (II) intel(0): Printing probed modes for output LVDS1
    [ 391.631] (II) intel(0): Modeline "1600x900"x60.0 110.00 1600 1664 1706 2010 900 903 906 912 -hsync -vsync (54.7 kHz eP)
    [ 391.897] (II) intel(0): Printing probed modes for output HDMI1
    [ 391.897] (II) intel(0): Modeline "1680x1050"x59.9 119.00 1680 1728 1760 1840 1050 1053 1059 1080 +hsync -vsync (64.7 kHz eP)
    If it can help here is also my current xrandr output (after having called it manually to use the preferred resolution of each screen)
    itanguy ~ $ xrandr
    Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 8192 x 8192
    LVDS1 connected 1600x900+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
    1600x900 60.0*+ 40.0
    1024x768 60.0
    800x600 60.3 56.2
    640x480 59.9
    VGA1 disconnected (normal left inverted right x axis y axis)
    HDMI1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 434mm x 270mm
    1680x1050 59.9*+
    1280x1024 75.0 60.0
    1152x864 75.0
    1024x768 75.1 60.0
    800x600 75.0 60.3
    640x480 75.0 60.0
    720x400 70.1
    DP1 disconnected (normal left inverted right x axis y axis)
    HDMI2 disconnected (normal left inverted right x axis y axis)
    HDMI3 disconnected (normal left inverted right x axis y axis)
    DP2 disconnected (normal left inverted right x axis y axis)
    DP3 disconnected (normal left inverted right x axis y axis)
    If needed, I may reboot and provide xrandr output after boot (it will be 1024x768), or could other logs help you ? Please ask...

  • Resources for designing data types and message types

    Hi
    I wanted to know if anyone can recommend me some good resources which can explain the design considerations for designing data types and message types in XI which can help promote reusability.
    Thanks.
    Best Regards,
    Kiran

    hi,
    there no rare rule whe you define your data type, why i tell you this, because you define a data type since the documentation that sender sistem team gives to you. so you only have to copy this structure to PI.
    now about Message Type less problems, because, you a Data type is assign to a Message Type, whats it means.
    when you define a DATA type you are defining the structure of you XML, que you assing the data type to a message type this structure pass to be an xml document.
    Thanks you
    Rodrigo

  • TRY CAST and setting the type according to destination column

    Hi,
    I am loading data from different sources. I have to do data quality checks for data I am loading into destination. For Decimal Values I have destination data types Decimal(28,2) and Decimal(28,6) 
    I would like to check the source data and covert the type according to destination column. How can I use the try cast in this scenario?
    SELECT TRY_CAST(REPLACE('100,500.000',',','') AS DECIMAL(28,2))
    this statement will convert every thing to two decimal places. but if destination column is decimal(28,6) i would like to convert it to 100500.657899
    What is the best way of doing it?
    MH

    Hi MH,
    According to your description, you need to CAST and setting the type according to destination column which data types is Decimal(28,2) and Decimal(28,6), right?
    "this statement will convert every thing to two decimal places. but if destination column is decimal(28,6) i would like to convert it to 100500.657899" If in this case, then there are different data types on the same column which is not
    supported in current version. So as per my understanding, there is no such a functionality to achieve your requirement. What we can do is convert to corresponding datatype (Decimal(28,2) or Decimal(28,6)), and then convert it to nvarchar datatype.
    CREATE TABLE #TEMP(A NVARCHAR(50))
    INSERT INTO #TEMP VALUES('1538.21'),('1635.326541'),('136.235')
    SELECT
    A,
    CASE
    WHEN (LEN(RIGHT(A,LEN(A)-PATINDEX('%.%',A))))>2
    THEN
    CAST(A AS DECIMAL(28,6))
    WHEN (LEN(RIGHT(A,LEN(A)-PATINDEX('%.%',A))))<=2
    THEN
    CAST(A AS DECIMAL(28,2))
    END AS B,
    CASE
    WHEN (LEN(RIGHT(A,LEN(A)-PATINDEX('%.%',A))))>2
    THEN
    CAST(CAST(A AS DECIMAL(28,6)) AS VARCHAR(99))
    WHEN (LEN(RIGHT(A,LEN(A)-PATINDEX('%.%',A))))<=2
    THEN
    CAST(CAST(A AS DECIMAL(28,2)) AS VARCHAR(99) )
    END AS B2
    FROM #TEMP
    DROP TABLE #TEMP
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • The system could not find a javax.ws.rs.ext.MessageBodyWriter or a DataSourceProvider class for the com.rest.assignment.EmpBean type and application/json mediaType.  Ensure that a javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application for the

    Hi,
    Im trying to create a Rest WS with a @GET method that will return me an Emp object. I need the output as a JSON string.
    I have created a dynamic web project and added javax RS jars:
    When im trying to run this, i'm getting the below mentioned error:
    FlushResultHa E org.apache.wink.server.internal.handlers.FlushResultHandler handleResponse The system could not find a javax.ws.rs.ext.MessageBodyWriter or a DataSourceProvider class for the com.rest.assignment.EmpBean type and application/json mediaType.  Ensure that a javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application for the type and media type specified.
    RequestProces I org.apache.wink.server.internal.RequestProcessor logException The following error occurred during the invocation of the handlers chain: WebApplicationException (500 - Internal Server Error)
    Please help as im stuck with this from long.
    Thanks in advance.
    Below is the code for my service class:
    package com.rest.assignment;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.util.Enumeration;
    import java.util.HashSet;
    import java.util.Properties;
    import java.util.Set;
    import javax.ws.rs.GET;
    import javax.ws.rs.Path;
    import javax.ws.rs.Produces;
    import javax.ws.rs.core.Application;
    import javax.ws.rs.core.MediaType;
    import javax.ws.rs.core.Response;
    @Path("/restService")
    public class RestService extends Application {   
        @GET
        @Path("/getEmpDetails")
        @Produces(MediaType.APPLICATION_JSON)
        public Response getStringResponse()
            EmpBean empBean = new EmpBean();
            String filePath = "C:/Program Files/IBM/workspace/HelloWorld/src/com/rest/resources/EmpData.properties";
            Properties properties = new Properties();
            try {
                properties.load(new FileInputStream(filePath));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
             Enumeration e = properties.propertyNames();
             String result="";
            String[] empDetailsArr;
            while (e.hasMoreElements()) {
              String key = (String) e.nextElement();
              String empDetails = properties.getProperty(key);
              empDetailsArr=empDetails.split(",");    
              empBean.setFirstName(empDetailsArr[0]);
              empBean.setLastName(empDetailsArr[1]);
              empBean.setEmpId(empDetailsArr[2]);
              empBean.setDesignation(empDetailsArr[3]);
              empBean.setSkillSet(empDetailsArr[4]);
              result = empDetailsArr[1];
            //return empBean;
            return Response.ok(empBean).type(MediaType.APPLICATION_JSON_TYPE).build();
        @Override
        public Set<Class<?>> getClasses() {
            Set<Class<?>> classes = new HashSet<Class<?>>();
            classes.add(RestService.class);
            classes.add(EmpBean.class);
            return classes;
    and my empBean goes like this:
    package com.rest.assignment;
    public class EmpBean {
        private String firstName;
        private String lastName;
        private String empId;
        private String designation;
        private String skillSet;
        public String getFirstName() {
            return firstName;
        public void setFirstName(String firstName) {
            this.firstName = firstName;
        public String getLastName() {
            return lastName;
        public void setLastName(String lastName) {
            this.lastName = lastName;
        public String getEmpId() {
            return empId;
        public void setEmpId(String empId) {
            this.empId = empId;
        public String getDesignation() {
            return designation;
        public void setDesignation(String designation) {
            this.designation = designation;
        public String getSkillSet() {
            return skillSet;
        public void setSkillSet(String skillSet) {
            this.skillSet = skillSet;
    Web.xml goes like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <display-name>restWS</display-name>
    <welcome-file-list>
      <welcome-file>index.html</welcome-file>
      <welcome-file>index.htm</welcome-file>
      <welcome-file>index.jsp</welcome-file>
      <welcome-file>default.html</welcome-file>
      <welcome-file>default.htm</welcome-file>
      <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
    <servlet>
      <servlet-name>REST</servlet-name>
      <servlet-class>com.ibm.websphere.jaxrs.server.IBMRestServlet</servlet-class>
      <init-param>
       <param-name>javax.ws.rs.Application</param-name>
       <param-value>com.rest.assignment.RestService</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
      <servlet-name>REST</servlet-name>
      <url-pattern>/rest/*</url-pattern>
    </servlet-mapping>
    </web-app>
    When i try to return a string from my get method, it gives me a proper response. i get this exception when im trying to return a JSON response.

    Hi,
    Im trying to create a Rest WS with a @GET method that will return me an Emp object. I need the output as a JSON string.
    I have created a dynamic web project and added javax RS jars:
    When im trying to run this, i'm getting the below mentioned error:
    FlushResultHa E org.apache.wink.server.internal.handlers.FlushResultHandler handleResponse The system could not find a javax.ws.rs.ext.MessageBodyWriter or a DataSourceProvider class for the com.rest.assignment.EmpBean type and application/json mediaType.  Ensure that a javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application for the type and media type specified.
    RequestProces I org.apache.wink.server.internal.RequestProcessor logException The following error occurred during the invocation of the handlers chain: WebApplicationException (500 - Internal Server Error)
    Please help as im stuck with this from long.
    Thanks in advance.
    Below is the code for my service class:
    package com.rest.assignment;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.util.Enumeration;
    import java.util.HashSet;
    import java.util.Properties;
    import java.util.Set;
    import javax.ws.rs.GET;
    import javax.ws.rs.Path;
    import javax.ws.rs.Produces;
    import javax.ws.rs.core.Application;
    import javax.ws.rs.core.MediaType;
    import javax.ws.rs.core.Response;
    @Path("/restService")
    public class RestService extends Application {   
        @GET
        @Path("/getEmpDetails")
        @Produces(MediaType.APPLICATION_JSON)
        public Response getStringResponse()
            EmpBean empBean = new EmpBean();
            String filePath = "C:/Program Files/IBM/workspace/HelloWorld/src/com/rest/resources/EmpData.properties";
            Properties properties = new Properties();
            try {
                properties.load(new FileInputStream(filePath));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
             Enumeration e = properties.propertyNames();
             String result="";
            String[] empDetailsArr;
            while (e.hasMoreElements()) {
              String key = (String) e.nextElement();
              String empDetails = properties.getProperty(key);
              empDetailsArr=empDetails.split(",");    
              empBean.setFirstName(empDetailsArr[0]);
              empBean.setLastName(empDetailsArr[1]);
              empBean.setEmpId(empDetailsArr[2]);
              empBean.setDesignation(empDetailsArr[3]);
              empBean.setSkillSet(empDetailsArr[4]);
              result = empDetailsArr[1];
            //return empBean;
            return Response.ok(empBean).type(MediaType.APPLICATION_JSON_TYPE).build();
        @Override
        public Set<Class<?>> getClasses() {
            Set<Class<?>> classes = new HashSet<Class<?>>();
            classes.add(RestService.class);
            classes.add(EmpBean.class);
            return classes;
    and my empBean goes like this:
    package com.rest.assignment;
    public class EmpBean {
        private String firstName;
        private String lastName;
        private String empId;
        private String designation;
        private String skillSet;
        public String getFirstName() {
            return firstName;
        public void setFirstName(String firstName) {
            this.firstName = firstName;
        public String getLastName() {
            return lastName;
        public void setLastName(String lastName) {
            this.lastName = lastName;
        public String getEmpId() {
            return empId;
        public void setEmpId(String empId) {
            this.empId = empId;
        public String getDesignation() {
            return designation;
        public void setDesignation(String designation) {
            this.designation = designation;
        public String getSkillSet() {
            return skillSet;
        public void setSkillSet(String skillSet) {
            this.skillSet = skillSet;
    Web.xml goes like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <display-name>restWS</display-name>
    <welcome-file-list>
      <welcome-file>index.html</welcome-file>
      <welcome-file>index.htm</welcome-file>
      <welcome-file>index.jsp</welcome-file>
      <welcome-file>default.html</welcome-file>
      <welcome-file>default.htm</welcome-file>
      <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
    <servlet>
      <servlet-name>REST</servlet-name>
      <servlet-class>com.ibm.websphere.jaxrs.server.IBMRestServlet</servlet-class>
      <init-param>
       <param-name>javax.ws.rs.Application</param-name>
       <param-value>com.rest.assignment.RestService</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
      <servlet-name>REST</servlet-name>
      <url-pattern>/rest/*</url-pattern>
    </servlet-mapping>
    </web-app>
    When i try to return a string from my get method, it gives me a proper response. i get this exception when im trying to return a JSON response.

Maybe you are looking for