JAX-WS newbie

Hi All,
I am new to web services. I am still learning.
I want to know how to develop JAX-WS(metro webservices) using contract-first approach? I just read in Axis2 you can do it using wsdl2java.
I may be wrong but what I read about wsimport in metro webservices is used to generate only client side classes for JAX-WS. No server side code is generated. I tried to find something like wsdl2java( which comes with Axis2) in metro web services, I could not find anything like that. If so, how to develop contract first web services in metro web services?
Edited by: Sagar_Kale on May 26, 2009 11:53 AM

double post http://forums.sun.com/thread.jspa?messageID=10722082

Similar Messages

  • Newbie to attachment with JAX-RPC

    Hi,
    I am new to Web Services. I am developing a web services using oracle technology. I use JDeveloper 10g to create my web services using stateless Java class. Everything are so simple with clicking here and there to generate my WSDL file, web service stub and so on. Oracle use their own servlet as shown below.
    <servlet-name>MyWebService1</servlet-name>
    <servlet-class>oracle.j2ee.ws.StatelessJavaRpcWebService</servlet-class>I had created my interface and implements (Hello.java & HelloImpl.java respectively). Having a method public String sayHello(String param).
    Now, I want to send a attachment (or more than one) to the client using JAX-RPC. My problem now is don't-know-where-to-start. I have gone through a few example but most of the examples are so misleading. I understand that the endpoint of a web services is from servlet. Am I suppose to start my coding to attach the document(*.doc, *.pdf, and so on) to the SOAP object in my Hello.java or HelloImpl.java? Correct me if I am wrong.
    Anyone out there has a sample code of how-to send attachment with JAX-RPC with step-by-step (especially using oracle jdeveloper 10g if exist) article, if any?
    Please help, I am lost. Thanks in advance.
    regards,
    yientau

    Hi,
    I am new to Web Services. I am developing a web services using oracle technology. I use JDeveloper 10g to create my web services using stateless Java class. Everything are so simple with clicking here and there to generate my WSDL file, web service stub and so on. Oracle use their own servlet as shown below.
    <servlet-name>MyWebService1</servlet-name>
    <servlet-class>oracle.j2ee.ws.StatelessJavaRpcWebService</servlet-class>I had created my interface and implements (Hello.java & HelloImpl.java respectively). Having a method public String sayHello(String param).
    Now, I want to send a attachment (or more than one) to the client using JAX-RPC. My problem now is don't-know-where-to-start. I have gone through a few example but most of the examples are so misleading. I understand that the endpoint of a web services is from servlet. Am I suppose to start my coding to attach the document(*.doc, *.pdf, and so on) to the SOAP object in my Hello.java or HelloImpl.java? Correct me if I am wrong.
    Anyone out there has a sample code of how-to send attachment with JAX-RPC with step-by-step (especially using oracle jdeveloper 10g if exist) article, if any?
    Please help, I am lost. Thanks in advance.
    regards,
    yientau

  • Jax-ws and apache axis

    This is a newbie question. Can you tell me the difference between jax-ws and apache axis. Is it possible to build web services just using jax-ws and not apache axis. What would be advantages and disadvantages.
    Thanks.

    Yeah you can just use jax ws:http://java.sun.com/developer/technicalArticles/J2SE/jax_ws_2/
    I find it more intuitive. Some would tell you that axis is more bloated :http://blogs.msdn.com/b/dotnetinterop/archive/2008/07/30/changing-of-the-guard-axis-out-jaxws-in.aspx
    I would rather decide between jax ws and REST :https://blogs.oracle.com/enterprisetechtips/entry/implementing_restful_web_services_in

  • Help needed for newbie EJB

    Hi, all
    I am a newbie in EJB and I am following the example in the URL:
    http://www.huihoo.com/jboss/online_manual/3.0/
    I am working on the 'interest' example in the first chapter.
    When it come to 'Packaging and deploying the bean', I got some meaage like this:
    ant intro-interest-jar
    Buildfile: build.xml
    validate-servlet:
    validate-jboss:
    fail_if_not_valid:
    init:
    [echo] Using JBoss directory=/opt/jboss
    [echo] Using base classpath=/opt/jboss/client/jboss-j2ee.jar:/opt/jboss/client/jaas.jar:/opt/jboss/client/jbosssx-client.jar:/opt/jboss/client/jboss-client.jar:/opt/jboss/client/jnp-client.jar:/home/xiaobo/learningejb/examples/COULD_NOT_FIND_SERVLET_JAR
    [echo] Using Source directory=/home/xiaobo/learningejb/examples
    [echo] Using Build directory=/home/xiaobo/learningejb/examples/build-examples
    intro-interest-jar:
    compile:
    ejb-jar:
    [delete] Deleting directory /home/xiaobo/learningejb/examples/build-examples/interest/META-INF
    [mkdir] Created dir: /home/xiaobo/learningejb/examples/build-examples/interest/META-INF
    [copy] Copying 1 file to /home/xiaobo/learningejb/examples/build-examples/interest/META-INF
    [copy] Copying 1 file to /home/xiaobo/learningejb/examples/build-examples/interest/META-INF
    [jar] Building jar: /home/xiaobo/learningejb/examples/build-examples/interest/interest.jar
    BUILD SUCCESSFUL
    Total time: 2 seconds
    Why did I get this:
    /home/xiaobo/learningejb/examples/COULD_NOT_FIND_SERVLET_JAR.
    But if I check the "interest.jar" by using 'jar -tvf interest.jar' in the "~/learningejb/examples/build-examples/interest$" directory, it seems it had all files and directories in it.
    But if I copy this jar file into the deploy directory in jboss, and I check the log file 'server.log'
    I found this error message:
    2005-11-28 17:31:03,536 DEBUG [org.jboss.management.j2ee.LocalJBossServerDomain] handleNotification: javax.management.Notification[source=jboss.ejb:service=EJBDeployer,type=org.jboss.deployment.SubDeployer.stop,sequenceNumber=15,timeStamp=1133213463536,message=null,userData=org.jboss.deployment.DeploymentInfo@c36a9f52 { url=file:/opt/jboss-3.2.5/server/default/deploy/interest.jar }
    deployer: org.jboss.ejb.EJBDeployer@3c9c31
    status: Deployment FAILED reason: ejb-jar.xml must define a valid DOCTYPE!
    state: FAILED
    watch: file:/opt/jboss-3.2.5/server/default/deploy/interest.jar
    lastDeployed: 1133210324921
    lastModified: 1133210324000
    mbeans:
    Then I add the follwoing line into the 'ejb-jar.xml':
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    so the 'ejb-jar.xml' looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <description>JBoss Interest Sample Application</description>
    <display-name>Interest EJB</display-name>
    <enterprise-beans>
    <session>
    <ejb-name>Interest</ejb-name>
    <home>org.jboss.docs.interest.InterestHome</home>
    <remote>org.jboss.docs.interest.Interest</remote>
    <ejb-class>org.jboss.docs.interest.InterestBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Bean</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    and I rejar it and copy the jar file into the deploy directory. I still got the same error message in the log file???!!!
    Please help!
    X.Chen

    It's a no brainer between the AirPort Extreme and Airport Express.
    The AirPort Extreme has 6 wireless antennas up at the top of the "tower", while the AirPort Express has four, so the Extreme has significantly better wireless speed and range than the Express.
    As you know, the broadcast power of wireless routers is limited by law, and most routers are running full blast. Apple routers are not known for their broadcast power, so what we cannot tell you is whether the Extreme will outperform the existing wireless router that you already have in terms of range.
    Also as you know, the speed of your Internet connection is limited to the plan that you have with Verizon. An Apple router cannot take the speed of Internet connection that it receives from your Verizon plan and make it go any faster.
    A user who has both the same Verizon router as you and an AirPort Extreme might be able to tell you how the products compare in his home.
    But...and this is a big BUT...... the bottom line with any wireless router is that you will not know how well it performs in your home until you try it out in your home. To think otherwise would be foolhardy at best.
    Buy from Apple and you have a 14 day return privilege in case things don't work as well as hoped. Other stores may offer a similar option. Check first, before you buy.

  • What is the difference between RMI and JAX-RPC?

    Dear All
    First of all my understanding of RMI and JAX-RPC:
    RMI is JAVA only version of RPC. It can't talk to any other language.
    JAX-RPC is a part of JWSDP and if you implement your client and server with JAX-RPC, client written in any language can talk with JAX-RPC implementation.
    What else makes them different and am I right with my understanding?
    Finally, I would like to develop clients which will have a java class, say httpserver.java, which will act like a http server, listens to a http port. Now, Two such client will run in two different PC and I want to call a module from one client to another which should be accessible via my httpserver.java. For that which should be my choice RMI or JAX-RPC? Can I achive it with http get-post method, as I am expecting to read some value of variables from one client to the another.
    Say class A has variable a, aa, aaa and clas B has variable b, bb, bbb. Now I want to read the value of b, bb, bbb from class A. How do I do that when class B is listening to a http port with my httpserver.java class.
    Lastly, say B is listening to a http port and I want to send a file to B from A. How can I do that? Remember, B didn�t ask for that. How can A send a file to B when B is listening to a http port with my httpserver.java.
    With regards
    Mohammed Jubaer Arif
    Mobile: +61-0411215302
    Personal Web: http://www.geocities.com/jubairarifctg/
    Org. Web.: http://www.geocities.com/halimschamber/

    simply put, RMI allows you to (semi) transparently treat remote objects as if they were local, and your distributed application can be written (more or less) like a "normal" java app. Sockets just give you a "raw" connection to work with, and you get to build up your application from that.
    I hope that helped
    Lee

  • Application based on JAX-WS running slow on AIX 3.5 of 64 bits

    Hi all,
    I’m running a java web service based on JAX-WS the release included in java6, this application load the information from tables to data structures in memory such as hash map, and has it available for a client application that consume it.
    My problem is that when I run my application on windows the time of processing is acceptable but when I try to run the same application on AIX 3.5 of 64 bits the communication between client and the web service is up 10 times slower.
    I tried the following test.
    Run the WS and client in the same windows server its success (fast)
    Run the WS in a windows server the client in my windows 7 laptop the result is success (fast)
    Run the Web Service on windows server and the client in AIX server this is slow
    Run the Web Service on the same AIX server that the client it is slow
    When I run the applications, I compile it whit the java6_64 version and run whit –d64 option on AIX
    Regards

    Try to isolate the problem by finding out where the delay is e.g
    1.) Is the delay in loading data from the database into memory?
    2.) Is the delay in getting a request from the client side to the server side components?
    3.) Is the delay in processing a request on the server side with the in memory data?
    Also verify that jvm settings and hardware (e.g) processors between the two environments are comparable.

  • Question about JAX-WS together with EJB 3.0 on WLS 10.3

    Hi all,
    I am developing a application that it is running on WebLogic 10.3. The application expose EJB 3.0 methods as web services by @WebService & @WebMethod annotation. And my question is,
    1. Is there any way to specify the context path/root for those exposed EJB? Currently the contextpath is same as the EJB's name
    2. And is there a method to disable the "scanning" of JAX-WS annotation on startup/deployment? The reason behind is that, some of the EJB jar files are coming from other team. I need to deploy it as EJB but not as a web service.
    Thanks
    Regards,
    Rock

    Hi guys,
    Here is what Eduardo is talking about:
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=407022.1
    (Doc ID: Note:407022.1)
    Rgds,
    Fábio.

  • Newbie Alert: Problem with saving downloads to a network drive

    I'm a new Mac user so, I apologize for the newbie question.
    I've have a NAS on my home network. I can see it and access it just fine. I have Firefox set to ask me where I want something downloaded. I don't get the option of putting, say a PDF in a folder on my network storage device.
    I can put it anywhere on the iMac's hard drive or even a USB/Firewire drive but not a network location. In Windows, you'd map a drive and be off to the races.
    How do I do this on a Mac?
    Thank you in advance,
    Rick

    AFAIK, not doable for NAS HDs. Since you're new to Macs, you're going to have erase windoze stuff from you lexicon, check these out:
    Switching from Windows to Mac OS X,
    Basic Tutorials on using a Mac,
    MacFixIt Tutorials, and
    MacTips Learning Centre.
    Additionally, *Texas Mac Man* recommends:
    Quick Assist.
    Welcome to the Switch To A Mac Guides, and
    A guide for switching to a Mac.

  • JAX-WS Client throws NULL Pointer Exception in NW 7.1 SP3 and higher

    All,
    My JAX-WS client is throwing an exception when attempting to create a client to connect to the calculation service. The exception is coming out of the core JAX-WS classes that are part of NetWeaver. (see exception below)
    Caused by: java.lang.NullPointerException
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContextExistingPort(SAPServiceDelegate.java:440)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContext(SAPServiceDelegate.java:475)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:492)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:484)
         at javax.xml.ws.Service.createDispatch(Service.java:166)
    I have done some research and it appears that as of NetWeaver 7.1 SP3 SAP stopped using the SUN JAX-WS runtime and implemented their own SAP JAX-WS runtime. I also took the time to decompile the jar file that contained the SAPServiceDelegate class which is throwing the null pointer exception. (see method from SAPServiceDelegate below)
        private ClientConfigurationContext createDispatchContextExistingPort(QName portName, JAXBContext jaxbContext)
            BindingData bindingData;
            InterfaceMapping interfaceMap;
            InterfaceData interfaceData;
            bindingData = clientServiceCtx.getServiceData().getBindingData(portName);
            if(bindingData == null)
                throw new WebServiceException((new StringBuilder()).append("Binding data '").append(portName.toString()).append("' is missing!").toString());
            QName bindingQName = new QName(bindingData.getBindingNamespace(), bindingData.getBindingName());
            interfaceMap = getInterfaceMapping(bindingQName, clientServiceCtx);
            interfaceData = getInterfaceData(interfaceMap.getPortType());
            ClientConfigurationContext result = DynamicServiceImpl.createClientConfiguration(bindingData, interfaceData, interfaceMap, null, jaxbContext, getClass().getClassLoader(), clientServiceCtx, new SOAPTransportBinding(), false, 1);
            return result;
            WebserviceClientException x;
            x;
            throw new WebServiceException(x);
    The exception is being throw on the line where the interfaceMap.getPortType() is being passed into the getInterfaceData method. I checked the getInterfaceMapping method which returns the interfaceMap (line above the line throwing the exception). This method returns NULL if an interface cannot be found. (see getInterfaceMapping method  below)
       public static InterfaceMapping getInterfaceMapping(QName bindingQName, ClientServiceContext context)
            InterfaceMapping interfaces[] = context.getMappingRules().getInterface();
            for(int i = 0; i < interfaces.length; i++)
                if(bindingQName.equals(interfaces<i>.getBindingQName()))
                    return interfaces<i>;
            return null;
    What appears to be happening is that the getInterfaceMapping method returns NULL then the next line in the createDispatchContextExistingPort method attempts to call the getPortType() method on a NULL and throws the Null Pointer Exception.
    I have included the code we use to create a client below. It works fine on all the platforms we support with the exception of NetWeaver 7.1 SP3 and higher (I already checked SP5 as well)
          //Create URL for service WSDL
          URL serviceURL = new URL(null, wsEndpointWSDL);
          //create service qname
          QName serviceQName = new QName(targetNamespace, "WSService");
          //create port qname
          QName portQName = new QName(targetNamespace, "WSPortName");
          //create service
          Service service = Service.create(serviceURL, serviceQName);
          //create dispatch on port
          serviceDispatch = service.createDispatch(portQName, Source.class, Service.Mode.PAYLOAD);
    What do I need to change in order to create a JAX-WS dispatch client on top of the SAP JAX-WS runtime?

    Hi Guys,
    I am getting the same error. Any resolution or updates on this.
    Were you able to fix this error.
    Thanks,
    Yomesh

  • Im a newbie in java and i need help. im a student

    im an I.T student in Adamson University here in the philippines i went here to ask help about our activity in school about java. our professor told us to make a program in java (btw were using netbeans) that will ask the user his birth year and then the output will tell the zodiac sign of the year entered. she told us (our prof) to make it using showInputDialog. and then to show the output we must use the JOptionPane.showMessageDialog.
    i try to do it but i found myself in trouble bcoz im new in java.
    i try to to it and here's what i did
    import javax.swing.JOptionPane;
    public class Zodiac;
    public static void main(String args[])
    String name=JOptionPane.showInputDialog("Enter your year of birth?");
    String message=String.format("Your zodiac sign is tiger");
    JOptionPane.showMessageDialog(null,message);
    i knew that i need to use conditional statements here but i dont know where to put it and how to declare the JOptionPane.etc.
    pls help me asap im a newbie.

    as you wish heres what i did. this is not a gui version
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package marlonestipona;
    * @author ESTIPONA
    import java.util.Scanner;
    public class Main {
    public static void main(String[] args) {
    Scanner input = new Scanner(System.in);
    int yr1;
    String tgr ="Tiger";
    String dog ="Dog";
    String rbt ="Rabbit";
    String ox ="Ox";
    String drgn ="Dragon";
    String rat ="Rat";
    String pig ="Pig";
    String rst ="Rooster";
    String hrs ="Horse";
    String shp ="Sheep";
    String mky ="Monkey";
    String snk ="Snake";
    System.out.print("Enter your birth year: ");
    yr1=input.nextInt();
    if (yr1==1974 || yr1==1986 || yr1==1998)
    System.out.printf("Your zodiac sign is %s!\n",tgr);
    }else if (yr1==1982 || yr1==1994 || yr1==2006){
    System.out.printf("Your zodiac sign is %s!\n",dog);
    }else if (yr1==1975 || yr1==1987 || yr1==1999){
    System.out.printf("Your zodiac sign is %s!\n",rbt);
    }else if (yr1==1973 || yr1==1985 || yr1==1997){
    System.out.printf("Your zodiac sign is %s!\n",ox);
    }else if (yr1==1976 || yr1==1988 || yr1==2000){
    System.out.printf("Your zodiac sign is %s!\n",drgn);
    }else if (yr1==1972 || yr1==1984 || yr1==1996){
    System.out.printf("Your zodiac sign is %s!\n",rat);
    }else if (yr1==1983 || yr1==1995 || yr1==2007){
    System.out.printf("Your zodiac sign is %s!\n",pig);
    }else if (yr1==1981 || yr1==1993 || yr1==2005){
    System.out.printf("Your zodiac sign is %s!\n",rst);
    }else if (yr1==1978 || yr1==1990 || yr1==2000){
    System.out.printf("Your zodiac sign is %s!\n",hrs);
    }else if (yr1==1971 || yr1==1991 || yr1==2003){
    System.out.printf("Your zodiac sign is %s!\n",shp);
    }else if (yr1==1980 || yr1==1992 || yr1==2004){
    System.out.printf("Your zodiac sign is %s!\n",mky);
    }else if (yr1==1977 || yr1==1989 || yr1==2001){
    System.out.printf("Your zodiac sign is %s!\n",snk);
    } else
    System.out.println("Invalid");
    now my problem is how to turn this whole code into gui using those dialog boxes.

  • 10.5 Server : Standard Installation : Newbie Tutorial /  Setup Walk-Through

    Hello all,
    I recently setup OS X Server 10.5 for a client after doing it many times at my home. I could not have possibly done it without the help of this discussion board so thanks to everyone asking and answering questions!
    To help other server newbies easily setup Server 10.5 (as apple claims), I'm hoping to make a basic installation procedure that will always work for newbies. Right now it's not exactly "detailed" - just the basic steps to ensure success.
    Below is my setup procedure that has worked well for me (especially at my house). It's for a Standard installation; and we'll be setting up the server to include Mail (local only), iChat, VPN, File Sharing, iCal, Web Server/Wiki, Apple Remote Desktop access, and Time Machine (may not work well).
    Please let me know if I'm missing something that will help ensure this setup works as perfectly as possible on any system.
    +to help make sure this works, try using all the names i've used below (besides perhaps user names & passwords); like "server.house"+
    *1) Setup Router*
    • ensure router is properly connected to modem/internet
    • router lan address = 10.0.2.1
    • subnet mask = 255.255.255.0
    • dhcp on
    • dhcp server starts at = 10.0.2.9
    • dhcp server ends at = 10.0.2.99
    • dns server (opendns servers) = 208.67.222.222, 208.67.220.220 (not a completely necessary step, but may help ensure it works)
    • port forward to 10.0.2.2 = vpn (udp: 500, 4500; udp/tcp: 50)
    • port forward to 10.0.2.2 = ard (tcp: 5900, 5988; udp/tcp: 3283)
    *2) Install/Setup Server*
    • startup server computer with installation cd and start installation process
    • choose "Standard Installation"
    • setup administrator account with the following settings:
    user name: Administrator
    short name: admin
    password: admin
    • setup network settings (choose manual configuration):
    manual ip address = 10.0.2.2
    subnet mask = 255.255.255.0
    router = 10.0.2.1
    dns server = 10.0.2.2
    search domain = house
    • primary dns server = server.house
    • server name = server
    +choose all the services and let installation complete; wait until desktop loads+
    Verify things are initially okay:
    • Open safari, and type "server.house" in the address bar (ensure wiki appears)
    Good, now:
    • Download latest 10.5 server combo update, install, restart.
    • Run software update until all updates are installed (may require several restarts)
    • Setup a dyndns account for your server, install dyndns software (make sure it's updating via web and the ip address doesn't start with 10.x)
    *3) Setup Server Preferences*
    • open server preferences
    • go to file sharing: turn on file sharing
    • go to vpn: turn on vpn
    shared secret = somethingsecretive
    ip address range = 10.0.2.101 - 10.0.2.199
    • go to users
    • make new user(s) with all options enabled
    +you should now have all services in server preferences enabled (if not, enable them) and user names setup; for good measure, restart the computer again+
    *4) Setup Client Computers*
    +make sure client computers have all software updates installed before proceeding+
    • Open system preferences: network
    • Make a new location called "Server"
    • Set TCP/IP to DHCP
    • DNS Server = 10.0.2.2
    • Search domain = house
    • Click apply
    It's probably a good time to double check that the internet works - open Safari and google something. Good, it works.
    There are two ways to setup the client computers to connect to the server with basically no manual configuration needed:
    First way:
    Go to system preferences: accounts: select user name to associate with server: select "server account" (if available): enter appropriate info for user on server: wait a bit: restart computer
    or (if "server account" isn't available):
    Second way:
    Open finder: applications: utilities: directory utility. once opened, it should automatically find your server. if it doesn't, click the lock, click "plus sign", type = "open directory", server name = server.house, click ok
    • enter appropriate info to connect to server and ensure it's set to automatically setup all services, once finished - restart.
    *5) If the automatic setup didn't work, here's how to manually setup the client workstations:*
    Safari
    • Open Safari and type "server.house" in the address bar, enter user/pass, make sure it connects to wiki.
    iChat
    • add new jabber account
    • jabber id = [email protected]
    • server = server.house
    • port = 5222
    • kerbos = on (you can leave off if you want)
    You can test by connecting to your Jabber account
    VPN
    • open Network in system preferences
    • click lock
    • click "plus sign"
    • interface = VPN
    • vpn type = L2TP over IPSec
    • service name = server
    • server address = your dyndns address
    • click advanced
    • dns server = 10.0.2.2
    • search domain = house
    • click ok
    • click authentication
    • enter user's server password
    • enter "somethingsecretive" in "shared secret"
    • click ok - click apply
    You can test by clicking "connect" - after verified, disconnect.
    _File sharing_
    • Open finder: click "Server" under "Shared"
    • If it connects as guest, click "connect as"
    • enter your server username/password
    Drag a file to and from a folder to make sure file sharing works
    Mail
    • Add new mail account (imap)
    • Incoming mail server = server.house
    • Outgoing mail server = server.house
    • Outgoing authentication = kerberos 5 (or password)
    • user name = [email protected]
    • enter password
    Check to make sure you get the server welcome e-mail and that you can send email to other users on the server.
    *Time Machine* (very problematic at this time)
    • Open Time Machine in System Preferences
    • Click "options"
    • Eliminate as many folders as possible to keep backup times shorter; click done
    • Click "change disk"
    • Select "Server" disk; click "use for backup"
    ** I highly recommend using local SuperDuper! backups and/or Retrospect for networked backups to the server. Other options include the dot mac Backup application or online backups (google it).
    *If you have PCs on your network that you want to be able to connect to the server for file sharing*
    • Open Windows Explorer (my computer)
    • Click tools: map network drive
    • Enter "\\server\public" (or if you setup a user account on the server for the pc user(s) i think you can use "\\server\pcusername" - and follow the next two steps)
    -Click "connect using different user name"
    -Enter pc user account username/password
    • save settings
    Check to make sure the drive shows up and you can move files to/from server
    Helpful info for newbies setting up server 10.5:
    • Apple's Server Resources page with all manuals
    • Probably the most helpful newbie setup discussion
    • Probably the most helpful newbie setup discussion #2
    • Discussion about DNS
    • "Time Machine is a dog... discussion"
    • Manage Central Address Book discussion
    • Leopard to Windows Files Sharing Issues discussion
    • Lynda's 10.5 Server Training Videos (this does cost money and I haven't personally used it, but it looks very helpful)
    I hope that's a good start for people, but I'm sure some setting(s) can be tweaked or I missed something that could make this process go even more smoothly. Lets make this the definitive newbie standard installation setup tutorial.
    -Brian
    corewerkz

    Hi gikku,
    Good idea! I forgot about the web server port forwarding, that will allow the wiki to be seen over the internet.
    One question: what does adding the dyndns address to "Server Admin > web > settings > sites" actually do? I'm not too knowledgeable about Server Admin.
    Thanks,
    Brian
    corewerkz

  • FileUpload using JAX-WS webservice on weblogic 10.3.5 is taking long time for files greater than 10MB

    I am trying to upload a file using JAX-WS webservice which is deployed on the weblogic 10.3.5 server.Even before the code reaches the Service Endpoint lot of time is being spent at the weblogic layer. for files less than 10MB the performance is good but for files greater than 10 MB it takes around 3 mins to complete the request. I did take thread dumps  and I see the thread servicing the requests is taking lot of time when executing SAX2DOMEx.characters  it consumes around 80 -85 % of time here. Is there anything that I can do to improve the performance here ?
    "[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'" id=37 idx=0x90 tid=16848 prio=5 alive, suspended, native_blocked, daemon
                    at jrockit/vm/Allocator.allocLargeObjectOrArray(JIZ)Ljava/lang/Object;(Native Method)
                    at jrockit/vm/Allocator.allocObjectOrArray(Allocator.java:349)[optimized]
                    at jrockit/vm/StringMaker.toString(StringMaker.java:188)[inlined]
                    at com/sun/org/apache/xerces/internal/dom/CharacterDataImpl.appendData(CharacterDataImpl.java:191)[optimized]
                    at com/sun/xml/bind/marshaller/SAX2DOMEx.characters(SAX2DOMEx.java:218)[inlined]
                    at com/sun/xml/bind/marshaller/SAX2DOMEx.characters(SAX2DOMEx.java:209)[optimized]
                    at com/sun/xml/ws/message/SAX2DOMWriterEx.writeCharacters( .java:108)
                    at com/sun/xml/ws/util/xml/XMLStreamReaderToXMLStreamWriter.handleCharacters(XMLStreamReaderToXMLStreamWriter.java:153)
                    at com/sun/xml/ws/util/xml/XMLStreamReaderToXMLStreamWriter.bridge(XMLStreamReaderToXMLStreamWriter.java:114)
                    at com/sun/xml/ws/message/stream/StreamMessage.writePayloadTo(StreamMessage.java:313)
                    at com/sun/xml/ws/message/stream/StreamMessage.writeEnvelope(StreamMessage.java:343)
                    at com/sun/xml/ws/message/stream/StreamMessage.writeTo(StreamMessage.java:321)
                    at com/sun/xml/ws/message/AbstractMessageImpl.readAsSOAPMessage(AbstractMessageImpl.java:226)
                    at com/sun/xml/ws/handler/SOAPMessageContextImpl.getMessage(SOAPMessageContextImpl.java:87)
                    at weblogic/wsee/jaxws/framework/jaxrpc/SOAPMessageContext.getMessage(SOAPMessageContext.java:252)
                    at weblogic/wsee/security/wssp/handlers/WssHandler.getSecurityContext(WssHandler.java:318)
                    at weblogic/wsee/security/wssp/handlers/WssHandler.preValidate(WssHandler.java:420)
                    at weblogic/wsee/security/wssp/handlers/PreWssServerPolicyHandler.processRequest(PreWssServerPolicyHandler.java:25)
                    at weblogic/wsee/security/wssp/handlers/WssHandler.handleRequest(WssHandler.java:112)
                    at weblogic/wsee/jaxws/framework/jaxrpc/TubeFactory$JAXRPCTube.processRequest(TubeFactory.java:222)
                    at com/sun/xml/ws/api/pipe/Fiber.__doRun(Fiber.java:866)
                    at com/sun/xml/ws/api/pipe/Fiber._doRun(Fiber.java:815)
                    at com/sun/xml/ws/api/pipe/Fiber.doRun(Fiber.java:778)
                    at com/sun/xml/ws/api/pipe/Fiber.runSync(Fiber.java:680)
                    ^-- Holding lock: com/sun/xml/ws/api/pipe/Fiber@0x83736a70[biased lock]
                    at com/sun/xml/ws/server/WSEndpointImpl$2.process(WSEndpointImpl.java:403)
                    at com/sun/xml/ws/transport/http/HttpAdapter$HttpToolkit.handle(HttpAdapter.java:532)
                    at com/sun/xml/ws/transport/http/HttpAdapter.handle(HttpAdapter.java:253)
                    at com/sun/xml/ws/transport/http/servlet/ServletAdapter.handle(ServletAdapter.java:140)
                    at weblogic/wsee/jaxws/WLSServletAdapter.handle(WLSServletAdapter.java:171)
                    at weblogic/wsee/jaxws/HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:708)
                    at weblogic/security/acl/internal/AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
                    at weblogic/security/service/SecurityManager.runAs(SecurityManager.java:146)
                    at weblogic/wsee/util/ServerSecurityHelper.authenticatedInvoke(ServerSecurityHelper.java:103)
                    at weblogic/wsee/jaxws/HttpServletAdapter$3.run(HttpServletAdapter.java:311)
                    at weblogic/wsee/jaxws/HttpServletAdapter.post(HttpServletAdapter.java:336)
                    at weblogic/wsee/jaxws/VerboseHttpProcessor.post(VerboseHttpProcessor.java:39)
                    at weblogic/wsee/jaxws/JAXWSServlet.doRequest(JAXWSServlet.java:98)
                    at weblogic/servlet/http/AbstractAsyncServlet.service(AbstractAsyncServlet.java:99)
                    at javax/servlet/http/HttpServlet.service(HttpServlet.java:820)
                    at weblogic/servlet/internal/StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
                    at weblogic/servlet/internal/StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
                    at weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:300)
                    at weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:183)
                    at weblogic/servlet/internal/WebAppServletContext$ServletInvocationAction.wrapRun(Lweblogic/servlet/internal/ServletStubImpl;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Ljava/lang/Object;(Unknown Source)
                    at weblogic/servlet/internal/WebAppServletContext$ServletInvocationAction.run()Ljava/lang/Object;(Unknown Source)
                    at weblogic/security/acl/internal/AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                    at weblogic/security/service/SecurityManager.runAs(SecurityManager.java:120)
                    at weblogic/servlet/internal/WebAppServletContext.securedExecute(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Z)V(Unknown Source)
                    at weblogic/servlet/internal/WebAppServletContext.execute(Lweblogic/servlet/internal/ServletRequestImpl;Lweblogic/servlet/internal/ServletResponseImpl;)V(Unknown Source)
                    at weblogic/servlet/internal/ServletRequestImpl.run()V(Unknown Source)
                    at weblogic/work/ExecuteThread.execute(ExecuteThread.java:209)
                    at weblogic/work/ExecuteThread.run(ExecuteThread.java:178)
                    at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)

    I am trying to upload a file using JAX-WS webservice which is deployed on the weblogic 10.3.5 server.Even before the code reaches the Service Endpoint lot of time is being spent at the weblogic layer. for files less than 10MB the performance is good but for files greater than 10 MB it takes around 3 mins to complete the request. I did take thread dumps  and I see the thread servicing the requests is taking lot of time when executing SAX2DOMEx.characters  it consumes around 80 -85 % of time here. Is there anything that I can do to improve the performance here ?
    "[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'" id=37 idx=0x90 tid=16848 prio=5 alive, suspended, native_blocked, daemon
                    at jrockit/vm/Allocator.allocLargeObjectOrArray(JIZ)Ljava/lang/Object;(Native Method)
                    at jrockit/vm/Allocator.allocObjectOrArray(Allocator.java:349)[optimized]
                    at jrockit/vm/StringMaker.toString(StringMaker.java:188)[inlined]
                    at com/sun/org/apache/xerces/internal/dom/CharacterDataImpl.appendData(CharacterDataImpl.java:191)[optimized]
                    at com/sun/xml/bind/marshaller/SAX2DOMEx.characters(SAX2DOMEx.java:218)[inlined]
                    at com/sun/xml/bind/marshaller/SAX2DOMEx.characters(SAX2DOMEx.java:209)[optimized]
                    at com/sun/xml/ws/message/SAX2DOMWriterEx.writeCharacters( .java:108)
                    at com/sun/xml/ws/util/xml/XMLStreamReaderToXMLStreamWriter.handleCharacters(XMLStreamReaderToXMLStreamWriter.java:153)
                    at com/sun/xml/ws/util/xml/XMLStreamReaderToXMLStreamWriter.bridge(XMLStreamReaderToXMLStreamWriter.java:114)
                    at com/sun/xml/ws/message/stream/StreamMessage.writePayloadTo(StreamMessage.java:313)
                    at com/sun/xml/ws/message/stream/StreamMessage.writeEnvelope(StreamMessage.java:343)
                    at com/sun/xml/ws/message/stream/StreamMessage.writeTo(StreamMessage.java:321)
                    at com/sun/xml/ws/message/AbstractMessageImpl.readAsSOAPMessage(AbstractMessageImpl.java:226)
                    at com/sun/xml/ws/handler/SOAPMessageContextImpl.getMessage(SOAPMessageContextImpl.java:87)
                    at weblogic/wsee/jaxws/framework/jaxrpc/SOAPMessageContext.getMessage(SOAPMessageContext.java:252)
                    at weblogic/wsee/security/wssp/handlers/WssHandler.getSecurityContext(WssHandler.java:318)
                    at weblogic/wsee/security/wssp/handlers/WssHandler.preValidate(WssHandler.java:420)
                    at weblogic/wsee/security/wssp/handlers/PreWssServerPolicyHandler.processRequest(PreWssServerPolicyHandler.java:25)
                    at weblogic/wsee/security/wssp/handlers/WssHandler.handleRequest(WssHandler.java:112)
                    at weblogic/wsee/jaxws/framework/jaxrpc/TubeFactory$JAXRPCTube.processRequest(TubeFactory.java:222)
                    at com/sun/xml/ws/api/pipe/Fiber.__doRun(Fiber.java:866)
                    at com/sun/xml/ws/api/pipe/Fiber._doRun(Fiber.java:815)
                    at com/sun/xml/ws/api/pipe/Fiber.doRun(Fiber.java:778)
                    at com/sun/xml/ws/api/pipe/Fiber.runSync(Fiber.java:680)
                    ^-- Holding lock: com/sun/xml/ws/api/pipe/Fiber@0x83736a70[biased lock]
                    at com/sun/xml/ws/server/WSEndpointImpl$2.process(WSEndpointImpl.java:403)
                    at com/sun/xml/ws/transport/http/HttpAdapter$HttpToolkit.handle(HttpAdapter.java:532)
                    at com/sun/xml/ws/transport/http/HttpAdapter.handle(HttpAdapter.java:253)
                    at com/sun/xml/ws/transport/http/servlet/ServletAdapter.handle(ServletAdapter.java:140)
                    at weblogic/wsee/jaxws/WLSServletAdapter.handle(WLSServletAdapter.java:171)
                    at weblogic/wsee/jaxws/HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:708)
                    at weblogic/security/acl/internal/AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
                    at weblogic/security/service/SecurityManager.runAs(SecurityManager.java:146)
                    at weblogic/wsee/util/ServerSecurityHelper.authenticatedInvoke(ServerSecurityHelper.java:103)
                    at weblogic/wsee/jaxws/HttpServletAdapter$3.run(HttpServletAdapter.java:311)
                    at weblogic/wsee/jaxws/HttpServletAdapter.post(HttpServletAdapter.java:336)
                    at weblogic/wsee/jaxws/VerboseHttpProcessor.post(VerboseHttpProcessor.java:39)
                    at weblogic/wsee/jaxws/JAXWSServlet.doRequest(JAXWSServlet.java:98)
                    at weblogic/servlet/http/AbstractAsyncServlet.service(AbstractAsyncServlet.java:99)
                    at javax/servlet/http/HttpServlet.service(HttpServlet.java:820)
                    at weblogic/servlet/internal/StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
                    at weblogic/servlet/internal/StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
                    at weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:300)
                    at weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:183)
                    at weblogic/servlet/internal/WebAppServletContext$ServletInvocationAction.wrapRun(Lweblogic/servlet/internal/ServletStubImpl;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Ljava/lang/Object;(Unknown Source)
                    at weblogic/servlet/internal/WebAppServletContext$ServletInvocationAction.run()Ljava/lang/Object;(Unknown Source)
                    at weblogic/security/acl/internal/AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                    at weblogic/security/service/SecurityManager.runAs(SecurityManager.java:120)
                    at weblogic/servlet/internal/WebAppServletContext.securedExecute(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Z)V(Unknown Source)
                    at weblogic/servlet/internal/WebAppServletContext.execute(Lweblogic/servlet/internal/ServletRequestImpl;Lweblogic/servlet/internal/ServletResponseImpl;)V(Unknown Source)
                    at weblogic/servlet/internal/ServletRequestImpl.run()V(Unknown Source)
                    at weblogic/work/ExecuteThread.execute(ExecuteThread.java:209)
                    at weblogic/work/ExecuteThread.run(ExecuteThread.java:178)
                    at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)

  • Real newbie-I can hear my loops in my library, but when I drag them to a track, there is no audio.  What am I doing wrong?

    Real newbie question-I can hear the loops in my library, but when I drag them to a track, there is no audio when I playback or record.  What am I doing wrong?

    You probably put Midi loops (green) on audio tracks, and audio loops (blue) on Midi tracks.
    That won´t play.
    JanD

  • Dont know why these buttons dont work (newbie)

    hi this is a procedure that activates/deactivates buttons
    accordingly to the record number..
    but it doesnt work, does any1 know why....
    sory but a newbie...
    calling the procedure in
    WHEN-NEW-RECORD-INSTANCE
    BEGIN
    BUTTON_CONTROL;
    END
    /*This is the Procedure*/
    PROCEDURE BUTTON_CONTROL IS
    BEGIN
    if :system.last_record = 'TRUE' and :system.cursor_record
    = '1' then
         set_item_property('button_palette.NEXT', enabled,
    property_off);
         set_item_property('button_palette.PREVIOUS', enabled,
    property_off);
    elsif :system.last_record = 'TRUE' then
         set_item_property('button_palette.NEXT', enabled,
    property_off);
         set_item_property('button_palette.PREVIOUS', enabled,
    property_on);
    elsif :system.cursor_record = '1' then
         set_item_property('button_palette.NEXT', enabled,
    property_on);
         set_item_property('button_palette.PREVIOUS', enabled,
    property_off);
    else
         set_item_property('button_palette.NEXT', enabled,
    property_on);
         set_item_property('button_palette.PREVIOUS', enabled,
    property_on);
    end if;
    END;

    hi master
    please guid me where you define that procedure i need that
    please guid me event name or sample code
    thanking you

  • 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

  • System Image Backup in Windows 10

    I'm trying to do an image Backup on the Windows 10 Build 9879 system disk but find that it's no longer possible. How do I do it? Renee "MODERN PROGRAMMING is deficient in elementary ways BECAUSE of problems INTRODUCED by MODERN PROGRAMMING." Me

  • HOT Problem connecting with Exporting application!

    When I try to export my ApEx application I receive an error: ORA-04030: out of process memory when trying to allocate num 16396 bytes (koh-kghu sessi,pl/sql vc2) Error exporting flow 101. ORA-04030: out of process memory when trying to allocate num 1

  • Table for Webtemplate and Query mapping

    Hi Experts, Is there any table which has the mapping for BW Web template and the Query on which this Web Template is built. Any help would be highly appreciated. Regards, Rk.

  • Games in Widescreen Mode on 24" iMac (Doom 3 etc)?

    Hi, I'm struggling to get some games to play in widescreen on my iMac 24". In Doom 3 for example i get two black lines down the edge but Quake 4 (which uses the same engine) is fine. I read on the net that if i hold the command key down when launchin

  • Volume shadow copies

    Hi, My server's hard disk partition (compressed NTFS) is of 1.5 TB and it has shared folders on it and Volume Shadow Copies were configured. for more than a year there has not been any problem with the shadow copies. But suddenly it stopped taking th