How to convert Java code to Webservice and deploy in to JBOSS via JDEV11g

Hi All,
Greetings. I am trying to develop Java Web service from JDeveloper 11g which has 2 basic methods. I can able to develop the WS out of the Java through Jdev and can able to test the webservice with the help of "Test Web Service" menu option under .JPR.
But when I am trying to deploy the WS.War file in to JBOSS app server (which is our project default server) from JDEV I couldn't able to get the option thought I have created the JBOSS server connection in Jdev. I can see only weblogic server connection under DEPLOY menu. Even if I edit the SOAP URL in WSDL to point JBOSS host and port and manually deploy the WAR in to JOBSS, it is not working, getting deployment error.
Anyone please guide me how to edit the WDSL which should point my JBOSS server (http://localhost:8080) and how to deploy the WAR and access the webservice from my Browser. Step by step help will be really appreciated since I am new to WS. Make this WS work is very important and urgent task in our project. But no luck so far.
Thanks in advance for each of you. Waiting for the position help.
klogube

Hi Shay,
Thanks for providing the blog URL which helped me to solve my first project. Now I have changed my WebServices deployment server from JDEV Default Apps server (Weblogic) to JBOSS. Now I can directly deploy Ws.WAR from JDEV to JBOSS. But I am getting the error in the JBOSS log as soon as I deploy the WAR.
2009-02-02 17:21:29,985 ERROR [org.jboss.deployment.MainDeployer] Could not create deployment: file:/opt/jboss-4.2.3.GA/server/default/deploy/Testing-SampleWebServices-context-root.war
java.lang.IllegalStateException: Endpoint already registered: jboss.ws:context=Testing-SampleWebServices-context-root,endpoint=DateTestingWSSoapHttpPort
     at org.jboss.wsf.framework.management.DefaultEndpointRegistry.register(DefaultEndpointRegistry.java:89)
     at org.jboss.wsf.framework.management.ManagedEndpointRegistry.register(ManagedEndpointRegistry.java:59)
     at org.jboss.wsf.framework.deployment.EndpointRegistryDeploymentAspect.create(EndpointRegistryDeploymentAspect.java:49)
.................etc
2009-02-02 17:21:29,987 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@a99914c8{ url=file:/opt/jboss-4.2.3.GA/server/default/deploy/Testing-SampleWebServices-context-root.war, deployedLastModified=0 }
org.jboss.deployment.DeploymentException: Could not create deployment: file:/opt/jboss-4.2.3.GA/server/default/deploy/Testing-SampleWebServices-context-root.war; - nested throwable: (java.lang.IllegalStateException: Endpoint already registered: jboss.ws:context=Testing-SampleWebServices-context-root,endpoint=DateTestingWSSoapHttpPort)
     at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
     at org.jboss.deployment.MainDeployer.create(MainDeployer.java:991)
     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
     at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
.....etc
Please help me, how to overcome this error and invoke my WS from http://localhost:8080...... (JBOSS path). I am trying to create client application too for invoke my WS and I failed to create the same while I am mapping the WSDL path in to the client application. Getting error, WSDL path is not available under localhost. (Note: I can able to see the list of WS's deployed in to JBOSS under: http://localhost:8080/jbossws/services which display the Endpoint name and address. But cant able to access the URL)
Thanks
klogube

Similar Messages

  • Problem with servicegen and how to convert java classes to webservices

    I am a beginner and am trying to convert all my java code into webservices,I have
    a java class Test.java and number of other third party libraries and my own java
    files that are reffered in Test.java. I want to expose the public methods in Test.java
    as webservices.
    the serivegen part of My build.xml is as below
    <servicegen
    destEar="${APPLICATIONS}/${ear_file}"
    warName="${war_file}">
    <service
    javaClassComponents="com.verizon.Test"
    targetNamespace="${namespace}"
    serviceName="Test"
    serviceURI="/Test"
    generateTypes="True"
    expandMethods="True">
    </service>
    <classpath>
    <pathelement path="${build}"/>
    <pathelement path="${java.class.path}"/>
    </classpath>
    </servicegen>
    When i run ant it complains:
    [servicegen] weblogic.xml.schema.binding.BindingException: Invalid class received:
    interface org.apache.crimson.tree.ElementFactory loaded from file:/apps/opt/crimson.jar!/org/apache/crimson/tree/ElementFactory.class.
    All classes that will be serialized or deserialized must be non-interface, non-abstract
    classes that provide a public default constructor
    I have no clue,Why is Servicegen introspecting the third party class file also?I
    just need the public methods in Test.java exposed and Test.java will just use
    the third party library.
    also,is there a way to tell servicegen to include all these java files X,Y,Z to
    the war file/ear files but expose only the public methods of X in the WSDL.
    Please help
    thanks
    Suresh

    Hi Bruce,
    Thanks very much for the insight u provided.Yes one of my public methods was returning
    a element factory.
    But let me ask my question this way:
    Is there a way to tell servicegen to take only the specified public methods in
    a class to make them as webservices?
    by default servicegen is taking all the public methods..,i workaround i found
    is to deploy the webservice manually by writing the web-services.xml to include
    only the required public methods.
    thanks
    Suresh
    Bruce Stephens <[email protected]> wrote:
    Hi Suresh,
    Does your Test.java have a public method that returns the element
    factory of an XML document, like "public ElementFactory
    getElementFactory ();" or such?
    If so, you may want to check out the supported build-in and non-built-in
    data types:
    http://edocs.bea.com/wls/docs81/webserv/assemble.html#1060696
    Concerning your last question, you can use the excludeEJBs, includeEJBs
    (in combination with the ejbJar attribute) to specify which non-built-in
    data type components should be generated. Or if you use the
    javaClassComponents then simply use a comma separated list of class
    names.
    Hope this helps,
    Bruce
    suresh wrote:
    I am a beginner and am trying to convert all my java code into webservices,Ihave
    a java class Test.java and number of other third party libraries andmy own java
    files that are reffered in Test.java. I want to expose the public methodsin Test.java
    as webservices.
    the serivegen part of My build.xml is as below
    <servicegen
    destEar="${APPLICATIONS}/${ear_file}"
    warName="${war_file}">
    <service
    javaClassComponents="com.verizon.Test"
    targetNamespace="${namespace}"
    serviceName="Test"
    serviceURI="/Test"
    generateTypes="True"
    expandMethods="True">
    </service>
    <classpath>
    <pathelement path="${build}"/>
    <pathelement path="${java.class.path}"/>
    </classpath>
    </servicegen>
    When i run ant it complains:
    [servicegen] weblogic.xml.schema.binding.BindingException: Invalidclass received:
    interface org.apache.crimson.tree.ElementFactory loaded from file:/apps/opt/crimson.jar!/org/apache/crimson/tree/ElementFactory.class.
    All classes that will be serialized or deserialized must be non-interface,non-abstract
    classes that provide a public default constructor
    I have no clue,Why is Servicegen introspecting the third party classfile also?I
    just need the public methods in Test.java exposed and Test.java willjust use
    the third party library.
    also,is there a way to tell servicegen to include all these java filesX,Y,Z to
    the war file/ear files but expose only the public methods of X in theWSDL.
    Please help
    thanks
    Suresh

  • How to embid java code in JavaScript

    Hi!!
    I am writing JSP program.
    Do u know how to embid java code in javascirpt
    ex:
    <SCRIPT>
    alert("hello");
    <%
    System.out.println("Hello...Satish. ");
    %>
    </SCRIPT>
    This alert message is not comming when i add the java code.

    Do u know how to embid java code in javascirptYou can't.
    Java/JSP code runs, and produces a web page. At this point any html/javascript is treated just as "text" to output.
    That web page is then sent to the browser which runs javascript.
    All java code has been run/removed - maybe generating HTML in its place.
    The only way to call java code again is to submit an HTTP request - normally by clicking a link/submitting a form.

  • How to use Java code inside WebDynpro-ABAP

    Hi,
        How to use Java code inside WebDynpro-ABAP.
    Could any one provide sample code.
    Cheers,
    Sam

    Hi Sam,
    We can't Bring Java Inside the ABAP. Both are running in different Environments.
    and also ABAP Codes are runs on BASIS.
    -Basis is a middleware between ABAP codes and Ur OS.
    -Contains set of programs to load,RUN,intepret the ABAP program..
    So Both are Different.
    Regards,
    Ramganesan K.

  • Convert java code into UML

    hello,
    anybody knows a software convert java code into UML? Classes Diagram.
    for example JBuilder do that.
    // i use Netbeans.

    its not a speed issue although sometimes it can be painfully slow (but now slower that sun one). I constantly found myself getting into infinite error message loops (e.g. "incorrect input"... click ok... "incorrect input"... errr click ok.... "incorrec..." etc etc), and also it (relatively) regularly falls over. I tried to export diagrams as GIFs, and when I imported them into Word they looked ok, but when I printed them they printed negative!! I used about 100g of toner before I realised, and had to go thru all diagrams changing them to JPGs. Plus, I think the interface for 6 is a lot less intuitive than 4.2, and it's trying to be too feature rich. Personally I would never use it as a code editor as it's too big and lumbering. For me, it's a diagramming tool, but it doesn't even put pretty pictures as nodes on deployment diagrams!! I want pictures of workstations, PDAs and databases!! Only kidding...

  • Converting  JAVA  code to JSP

    Hi every one, I am new to JSP I have a code in JAVA which is used to generate an image from a temporary file of size 34.1MB.
    I am unable to convert that JAVA code into JSP,can anyone help me in this regard
    Here is my code
    import java.awt.image.*;
    import java.io.*;
    import java.util.*;
    import javax.imageio.*;
    import javax.swing.*;
    public class ExampleCreate {
        public static void main(String[] args) throws Exception {
            final int H = 2530;
            final int W = 3630;
            int[] pixels = createPixels(W*H);
            BufferedImage image = toImage(pixels, W, H);
            display(image);
            ImageIO.write(image, "jpg", new File("static.jpg"));
      static int[] createPixels(int size) throws Exception{
           int[] pixels = new int[size];
           int[] colors = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,102,104,106,108,110,112,114,116,118,120,122,124,126,0xff0000,0x00ff00,0x0000ff,0x00000f,0xfff000,0xff00ff,0xffffff,0xf00000};
           FileReader fr = new FileReader("SST.tmp");
           BufferedReader br = new BufferedReader(fr);
           String text = br.readLine();
           int c = 0;
           for(int i = 0; i < size; ++ i){
                     text = br.readLine();
                     c = Integer.parseInt(text);
                     if(c < 0)
                          c = 0;
                     pixels[i] = colors[c];
           br.close();
       return pixels;
        static BufferedImage toImage(int[] pixels, int w, int h) {
            DataBuffer db = new DataBufferInt(pixels, w*h);
            WritableRaster raster = Raster.createPackedRaster(db,
                w, h, w, new int[] {0xff0000, 0xff00, 0xff}, null);
            ColorModel cm = new DirectColorModel(24, 0xff0000, 0xff00, 0xff);
            return new BufferedImage(cm, raster, false, null);
        static void display(BufferedImage image) {
            final JFrame f = new JFrame("");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(new JLabel(new ImageIcon(image)));
            f.pack();
            SwingUtilities.invokeLater(new Runnable(){
                public void run() {
                    f.setLocationRelativeTo(null);
                    f.setVisible(true);
    }thanks&regards
    Mahender

    According to me just convert ths code to servlet and instead of displaying the image with BufferedImage just stream it (the image) to the browser. This will be useful to catch the general idea.

  • How to convert Java Objects into xml?

    Hello Java Gurus
    how to convert Java Objects into xml? i heard xstream can be use for that but i am looking something which is good in performance.
    really need your help guys.
    thanks in advance.

    There are apparently a variety of Java/XML bindings. Try Google.
    And don't be so demanding.

  • How to write java code to read the pixel color in some place of screen?

    Hello all:
    How to write java code to read the pixel color in some place of screen?
    The java application iteself doesn't have any GUI.
    thank you
    -Danel

    See java.awt.Robot

  • How to obtain source code of weka and enable to modify it

    hello,
    how to obtain source code of weka and enable to modify it such i want to extract code of some process that I make

    Hi ENG,
    Since the issue regards to Weka. It is out of the support boundaries of our forum, I suggesT you post the question in the following forum:http://forums.pentaho.com/forumdisplay.php?81-Pentaho-Data-Mining-WEKA.
    It is appropriate and more experts will assist you.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to convert the code from 8.2 to 7.1

    Hello friends
                   I have to convert the one vi from 8.2 to 7.1 Version.How to convert this code.
    Jayavel

    Hello Friends
                  i attached the code in 8.2 version.Convert this code into 7.1
    Jayavel
    Attachments:
    FreenrunTest.vi ‏1456 KB

  • How to generate payment advice in F110 and send it to Vendors Via Email

    Dear SAP Experts
    Could anybody tell me how to generate payment advice in F110 and send it to Vendors Via Email?
    It would be much appreciated if someone can provide the configuration procedure, thanks so much in advance.
    Cheers & Best Regards
    Ray

    Hi Sama,
    Thanks for your post, here I just share some of my idea.
    The following step is to configure the payment advice.
    In OBVU (payment methods in cpy code) I entered my payment advice form
    In OBVU (payment methods in cpy code)  set  "Always pyt advice"
    In OBVCU (payment method by country)  leave the payment medium program (RFFOD__T)
    For the email sending program, should develp some customized program to realize that, Thanks.
    Cheers & Best Regards
    Ray

  • HT1338 java doesn't work and there is no update (via apple) available.

    Now running mountain lion. Unfortunately java doesn't work and there is no update (via apple) available. What do I do?

    Open Terminal (Applications/Utilities/Terminal.app) and type
    java -version
    press 'return' on the keyboard.
    Either
    1. You get a version number for Java, in which case enable Java in
    Applications/Utilities/Java Preferences.app
    Or
    2. You get an installer window pop up. After clicking through and installing that, enable Java as in 1. above.

  • How to use Java code to implement Divide-and-Conquer multiplication???

    i think use Divide-and-Conquer multiplication algorithm to multiply 31415975 by 81882818. Because i have study data structure and algorithm for needs people helps to solve this problem!!! The answer is should equals the both number (31415975 * 81882818) multiplication! There are must pass the program to calculation the multiply with use divide-and-Conquer!
    How to use the program calculation the both number multiplication with divide-and-Conquer??? That is needs display the different number multiplication on the screen!!!

    This is what I think you meant to say
    yijun1988 wrote:
    I am considering using Divide-and-Conquer multiplication algorithm to multiply 31415975 by 81882818.
    Because i have study data structure and algorithm.
    I need help to solve this problem!
    The result should equal the product (multiplication) of the two numbers (31415975 * 81882818)
    The input must be passed as parameters to the program to calculate the product using Divide-and-Conquer!
    How to implement number multiplication with divide-and-Conquer?
    The steps of the algorithm need to be displayed on the screen!Which part of this are you having problems with?

  • How to use java code in my forms.................

    Hi All,
    I want to use the below java code in my form 6i ..but don't know how????????
    related function is also given below..........
    Any idea .......Please
    Thanks
    Harry.....
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.sql.*;
    public class MyProgram {
    private static Connection con = null;
    private static Statement st;
    public static ResultSet rs;
    public static String s;
    /* public void setlable(int n)
    rs = st.executeQuery("SELECT number_to_words("+n+") FROM dual");
    while (rs.next())
    output.setText(rs.getString(1));
    public static void main(String[] args) {
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection con = DriverManager.getConnection("jdbc:oracle:thin:@172.19.193.38:1525:ITSTIN", "scott", "tiger");
    st = con.createStatement();
    }catch(Exception exp){
    System.out.println("Error"+exp.toString());
    JFrame f = new JFrame("Conver Digit to Words..");
    JLabel input = new JLabel("Enter Numeric digits :");
    final JLabel output = new JLabel("Please enter value into TestBox.....",JLabel.CENTER);
    final JTextField TF1 = new JTextField(90);
    final JButton B1 = new JButton("Close");
    f.setSize(750, 250);
    f.setLocation(300,200);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container contentPane = f.getContentPane();
    contentPane.setLayout(null);
    contentPane.setBackground(Color.CYAN);
    TF1.setLocation(300,25);
    TF1.setSize(150,30);
    input.setLocation(175,25);
    input.setSize(150,30);
    input.requestFocus();
    output.setLocation(15,100);
    output.setSize(650,30);
    output.setForeground(Color.RED);
    B1.setSize(100,32);
    B1.setLocation(620,175);
    contentPane.add(TF1);
    contentPane.add(input);
    contentPane.add(output);
    contentPane.add(B1);
    f.setVisible(true);
    B1.addMouseListener(new MouseAdapter(){
    public void mouseClicked(MouseEvent me)
    System.exit(0);
    TF1.addKeyListener(new KeyAdapter(){
    public void keyReleased(KeyEvent event){
    if (TF1.getText().equals("") )
    output.setText("Please enter value into TestBox.....");
    else
    try
    if (TF1.getText().length()<12)
    s = "SELECT initcap(number_to_words("+Long.parseLong(TF1.getText())+")) FROM dual";
    rs = st.executeQuery(s); //Function number_to_words exists in scott@itstin created by AMUY-IN
    while (rs.next())
    output.setText(rs.getString(1));
    }catch(Exception e)
    System.out.println("Error-2"+e.toString());
    ================================function===============
    CREATE OR REPLACE FUNCTION amuy_con_to_eng(nm2 NUMBER) RETURN VARCHAR2 IS
    nm1 NUMBER(10,0) := nm2;
    NM VARCHAR2(100):='';
    div NUMBER;
    BEGIN
    WHILE nm1>0 LOOP
    IF nm1>=20 THEN
    div :=Floor(nm1/10);
    NM := NM||' '||base_convert(div*10);
    nm1:=Mod(nm1,10);
    END IF;
    IF nm1>=1 AND nm1<20 THEN
    NM := NM||' '||base_convert(nm1);
    nm1:=nm1/10;
    END IF;
    nm1 :=Floor(nm1/10);
    END LOOP;
    RETURN NM;
    END;
    CREATE OR REPLACE FUNCTION number_to_words(inm NUMBER) RETURN VARCHAR2 IS
    /* Function that converts number's to word's*/
    /* Created buy amuy-in */
    l_inm NUMBER(35,0);
    NM VARCHAR2(1000):='';
    div NUMBER;
    BEGIN
    l_inm := inm;
    IF inm<=0 THEN
    RETURN 'ZERO';
    ELSE
    WHILE l_inm>0 LOOP
    case when Length(l_inm) >= 1 AND Length(l_inm)<=2
    then RETURN NM||' '||sf_num_to_words(l_inm);
    when Length(l_inm) = 3
    then div :=Floor(l_inm/RPad(1,3,0));
    l_inm := Mod(l_inm,RPad(1,3,0));
    NM :=NM||' '||sf_num_to_words(div)||' '||'HUNDRED';
    when Length(l_inm) >= 4 AND Length(l_inm) <= 5
    then div :=Floor(l_inm/RPad(1,4,0));
    l_inm := Mod(l_inm,RPad(1,4,0));
    NM :=NM||' '||sf_num_to_words(div)||' '||'THOUSAND';
    when Length(l_inm) >= 6 AND Length(l_inm) <= 7
    then div :=Floor(l_inm/RPad(1,6,0));
    l_inm := Mod(l_inm,RPad(1,6,0));
    NM :=NM||' '||sf_num_to_words(div)||' '||'LAKH';
    when Length(l_inm) >= 8 AND Length(l_inm) <= 9
    then div :=Floor(l_inm/RPad(1,8,0));
    l_inm := Mod(l_inm,RPad(1,8,0));
    NM :=NM||' '||sf_num_to_words(div)||' '||'CRORE';
    when Length(l_inm) >= 10 AND Length(l_inm) <= 11
    then div :=Floor(l_inm/RPad(1,10,0));
    l_inm := Mod(l_inm,RPad(1,10,0));
    NM :=NM||' '||sf_num_to_words(div)||' '||'ARAB';
    ELSE RETURN 'ERROR {Length of input value should be <12}';
    END CASE;
    END LOOP;
    RETURN NM ;
    END IF;
    END;
    /

    You cannot use java directly inside forms. You can either create a java-bean to enhance the GUI (as you have some UI-components in your java-code, i guess this would be the direction) or use the java-importer and call server-side-java. Both require that you are running forms in a web-version and not as client-server.
    What exactly is your requirement?

  • How to use Java code signing certificate in oracle 11i

    Hello,
    I am try to configure java code signing certificate in 11.5.10.2 application. we got java sign certificate from verisgin. SA's imported the certificate and created alias XXX_XXX with password and passphrase.
    I am able to see the my certificate. keytool -list -v -keystore xxx_xxxx.jks -storepass Password.
    how do I use it. I am using Enhance Jar Signing for EBS DOC ID 1591073.1.
    could you please give me some advice on it?
    Thanks
    Prince

    Hussien,
    I find out apps keystore keypassword and storepassword, I imported the java code sign certificate. I generated Jar files through adadmin, but I am getting  warning error
    adogif() unable to generate Jar Filers under JAVA_TOP.
    executing /usr/jdk/jdk1.6.0_45/bin/java sun.security.tools.JarSigner keysotre **** -sigfile CUST Signer /apps/......
    Error JarSigner subcommand Exited With status 1.
    No standard output from jarsigner JarSigner error output: Exception in thread "main" java.lang.NoClassDefFoundError: sun/security/tools/JarSigner Caused by: java.lang.ClassNotFoundException: sun.security.tools.JarSigner         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)         at java.security.AccessController.doPrivileged(Native Method)         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)         at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main class: sun.security.tools.JarSigner.  Program will exit. WARNING: The following path(s), defined in /apps2/property/product/tst/appl/cz/11.5.0/java/make/czjar.dep as elements of the output:   oracle/apps/cz/runtime/tag WARNING: Copying cztag.lst from the old fndlist.jar ...   About to Analyze flmkbn.jar : Fri Nov 22 2013 10:45:51
    Please let me know if you have any idea. Thanks Prince

Maybe you are looking for

  • Creating a new keyboard shortcut

    Hi there, Can anyone tell me how to create a keyboard shortcut for a function that is not on the shortcut list in CS5? I want to make a keyboard shortcut for adjusting the 'space after' a paragraph. Thanks very much,

  • How can I redeuce my pdf files once time adobe reader pro

    Dear, I would like to reduce my all pdf files once time.

  • How can I get a HOT mix on Output 1-2 without clipping?

    Hello, I'm unable to get a hot mix on Output 1-2 with either AU instruments or Audio tracks. If I start with a hot track, by the time I add EQ and compression, the tracks are clipping. I've tried reducing the gain on the plug-ins, and/or the gain on

  • Select options default value

    Hi, Kindly assist me on how to set a default value for dynamically created Select options. I am coding the below code snippet for default value and it's working but when I remove the default value for the select option on portal screen ...I encounter

  • Portal runtime error : com.sap.portal.pcm.Title

    Hi All I have  the problem in the Portal , in time  whe I open the portal y all tabs there are  this message: Portal runtime error. An exception occurred while processing your request. Send the exception ID to your portal administrator. Exception ID: