How can I referece a .class inside a @WebService

I have the following class
package org.rmilian;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.xml.ws.Endpoint;
import org.apache.log4j.Logger;
@WebService
public class Hello {
     static Logger logger = Logger.getLogger(Hello.class);
     @WebMethod
     public void hello(String hello) {
          System.out.println(hello);
     public static void main(String[] args) {
          Hello hello = new Hello();
          Endpoint endpoint = Endpoint
                    .publish("http://localhost:81/hello", hello);
}And when I try to run apt with the above class I get the error below:
warning: Annotation types without processors: [javax.xml.bind.annotation.XmlRoot
Element, javax.xml.bind.annotation.XmlAccessorType, javax.xml.bind.annotation.Xm
lType, javax.xml.bind.annotation.XmlElement]
.\org\rmilian\Hello.java:7: package org.apache.log4j does not exist
import org.apache.log4j.Logger;
^
.\org\rmilian\Hello.java:7: package org.apache.log4j does not exist
import org.apache.log4j.Logger;
^
.\org\rmilian\Hello.java:12: cannot find symbol
symbol : class Logger
location: class org.rmilian.Hello
static Logger logger = Logger.getLogger(Hello.class);
^
3 errors
1 warning
If I remove the Logger statement all work well. I have proved this with references to other classes and I guess that the problem is when the classes I�m referencing are in bytecode format i meant in .class and when are in .java all work well.
My question is if there is any way of generating the wrapper classes and keep the reference to .class files?

1.) Within your comp, you could use the application
heirarchy:
var mainAppTxt = mx.core.Application.application.stxt.text;
or
2.) Bind the box right into your component.
Main.mxml:
<mx:Text id="stxt" text="" width="240" height="650"/>
<myComponent txtField="{stxt}" />
myComponent.as / .mxml:
var txtField; // ready to use as-is (as long as you used
{binding} )

Similar Messages

  • How can I hide the class file ??

    Hi !
    I has a question, when i write a program of Java, then use the command "javac" to compiler to class file for other people using, but the class file can be disassembled and convert to source code. How can I hide the class file and let people can not disassemble, or can not see the source code. Thinks

    See these....
    http://www.saffeine.com/
    http://www.jarsafe.com/
    I recently read this. This will help you.
    http://developer.java.sun.com/developer/qow/archive/160/index.jsp
    Enojy....
    Rajesh

  • How can I convert a class file to Exe file

    hai
    How can I convert a class file to Exe file

    Please search the forums before asking questions - this has been answered hundreds (really!) of times.

  • Can any one suggest me how can I use relative path inside SSIS pacakge to access config file ?

    Can any one suggest me how can I use relative path inside SSIS pacakge to access config file ? Please help me as its urgent.THanks for your help in advance.

    Hi Jay,
    SSIS can only recognize the absolute path of a XML Configuration file, the relative path is not supported. Furthermore, if the XML Configuration file is already generated, we can use the Environment variable package configuration type instead so that
    SSIS runtime automatically looks for the configuration file from the path defined in the environment variable. This is convenient when we need to deploy a package to different environment. We only need to define the environment variable for package configurations
    once on each server, and then the variable can be used by all the packages on this server.
    Regards,
    Mike Yin
    TechNet Community Support

  • Than how can i get java class by using it's class file?

    Hi
    After compilation of a java program, it creates a class file.
    After getting class file suppose class file has been deleted.
    Than how can i get java class by using it's class file?
    Thanks in advance.

    get a decompiler and run your class file through it--I'll assume you want the source code back and that you are not trying to recover a missing class file by attempting to use the class file that is missing--if it's missing, then I've not a clue on how to get it back by using what is already missing.
    BTW: many of your compilers have source control--if it does, just restore your missing file.

  • How can I access another class in a MembershipRule's Expression

    Hello,
    I want to create an InstanceGroup using Module Microsoft.SystemCenter.GroupPopulator.
    I need to collect all Logical Disks which contain an MS SQL DB Log File.
    I would start as follows:
    <DataSource ID="DS" TypeID="SC!Microsoft.SystemCenter.GroupPopulator">
      <RuleId>$MPElement$</RuleId>
      <GroupInstanceId>$Target/Id$</GroupInstanceId>
      <MembershipRules>
        <MembershipRule>
          <MonitoringClass>$MPElement[Name="Windows!Microsoft.Windows.LogicalDisk"]$</MonitoringClass>
          <RelationshipClass>$MPElement[Name="MSIL!Microsoft.SystemCenter.InstanceGroupContainsEntities"]$</RelationshipClass>     
    <Expression>
            <And>
      <!--
       First Expression
      -->
              <Expression>
                <SimpleExpression>
                  <ValueExpression>
                    <Property>$MPElement[Name="Windows!Microsoft.Windows.LogicalDevice"]/Name$</Property>
                  </ValueExpression>
                  <Operator>Equal</Operator>
                  <ValueExpression>
      <!--
        How can I access another class's properties ? 
      -->
                    <GenericProperty>$MPElement[Name="SQL!Microsoft.SQLServer.2008.DBLogFile"]/Drive$</GenericProperty>
                  </ValueExpression>
                </SimpleExpression>
              </Expression>
              <Expression>
                <SimpleExpression>
                  <ValueExpression>
                    <HostProperty>
                      <MonitoringClass>$MPElement[Name="Windows!Microsoft.Windows.Computer"]</MonitoringClass>
                      <Property>PrincipalName</Property>
                    </HostProperty>
                  </ValueExpression>
                  <Operator>Equal</Operator>
                  <ValueExpression>
                    <GenericProperty>$MPElement[Name="SQL!Microsoft.SQLServer.2008.DBLogFile"]/Drive$</GenericProperty>
                  </ValueExpression>
                </SimpleExpression>
              </Expression>
            </And>
          </Expression>
        </MembershipRule>
      </MembershipRules>
    </DataSource>
    In the first expression you "see" my question:
    I want to compare the LogicalDisk's Name Property with the DB Log File's Drive property.
    But how can I access the DB Log File's Drive property in this MembershipRule ?
    Furthermore LogicalDisk and DB Log File must be hosted on the same Windows Computer.
    Would be great if somebody could help.
    Thanks
    Sebastian

    Hi Niki,
    thanks for the idea, but that will not work. $Target/Id$ refers always to the group to be discovered.
    On last week end I was given following idea, hope it will work:
    Step 1
    Collect all the DB SQL Logfile Objects and write computername (PrincipalName?) and Driveletter into a textfile, line by line. Shouldn't be a problem, PowerShell is your friend.
    Step 2
    Read the file from Step 1, build discovery data for each disk drive as object of class "Logical Disk (Server)",
    and then discover the containment-relationships from those Logical Drive(Server) Objects to the InstanceGroup.
    Perhaps I must do it for the OS-Version related Disks, because I need the target classes  of the Logical Disk Freespace monitors. Some more work. "Risks": I donot know the discovery algorithm for the Logical Disk(Server) Objects, but a "deep
    dive" into the MPs should help.
    Thanks to all, who have read.
    I will inform you about progress and success
    sebastian

  • How can we call a class file of one package for class file of another

    How can we call a class file of one package from class file of another package and both packages exist in a same folder

    How can we call a class file of one package from
    class file of another package and both packages exist
    in a same folder
    Luckily they don't so it's really not a problem after all.

  • How can I import a class in my program?

    In my program I want to use a class named "WordExtractor" that resides in a jar file named "poi-3.0.1-FINAL-20070705.jar".
    This jar file is stored on my computer under:
    D:\java_projects\Word Reader\poi-bin-3.0.1-FINAL-20070705\poi-3.0.1-FINAL\poi-3.0.1-FINAL-20070705.jar
    How can I import this class WordExtractor into my program?
    import ????????? ;

    In my program I want to use a class named
    "WordExtractor" that resides in a jar file named
    "poi-3.0.1-FINAL-20070705.jar".
    This jar file is stored on my computer under:
    D:\java_projects\Word
    Reader\poi-bin-3.0.1-FINAL-20070705\poi-3.0.1-FINAL\po
    i-3.0.1-FINAL-20070705.jar
    How can I import this class WordExtractor into my
    program?
    import ????????? ;After you add this jar file to the lib , you can use a tools(rar extracter tools) to extract "poi-3.0.1-FINAL-20070705.jar" file and find the position of that class "WordExtractor" .
    write "import XXXX.WordExtractor"into your program,"XXXX" is the position that you have found.

  • HT1338 WHAT IS 802.1 MEANING? HOW CAN I CHOOSE ABOUT OPTION INSIDE BETWEEN 802.1WEP OR WPA ENTERPRISE? WHAT'S DIFFERENT? T

    WHAT IS 802.1 MEANING? HOW CAN I CHOOSE ABOUT OPTION INSIDE BETWEEN 802.1WEP OR WPA ENTERPRISE? WHAT'S DIFFERENT?

    802.11 refers to a document that specifies how wireless networking works. It goes into detail about the radio signals, frequencies, signal strengths, encoding of data, etc. From a practical standpoint, the typical person really only care about a couple of things: speed and encryption.
    802.11b - describes networks that transmit 11 mbps using a 2.4 GHz radio frequency
    802.11g - describes networks that transmit 54 mbps using a 2.4 GHz radio frequency
    802.11n - describes networks that transmit up to 600 mbps using 2.4 GHz and 5 GHz frequencies
    n is faster than g which is faster than b. The speed of a network connection is limited to the slowest part (so, if you have an 'n' router, but your laptop only supports 'g', you get the 'g' speed).
    WEP, WPA, and WPA2 refer to data encryption schemes specified in parts of the 802.11 document. With Wi-Fi, you are broadcasting your network activity over a radio, and it's pretty obvious that anyone could eavesdrop on the transmission. By using cryptography, you can scramble the data being passed back and forth so that the sender and receiver still understand the messages sent, but an eavesdropper cannot.
    WEP is a very simple encryption scheme, one that the methods to decrypt the data is pretty straight-forward. It's not effective against someone that wants to intentionally eavesdrop on your activities (or access your computer) because they can use software to determine the password simply enough.
    WPA and WPA2 are improvements over WEP that make cracking the password even more difficult (WPA2 being better than WPA).
    The "enterprise" version of WPA2 refers to a variation on WPA2 that requires special security servers, security certificates, and other complicated systems most likely only applicable to a corporate or military environment. It's impractical for a home or small office.
    To connect to a wireless network, you generally don't have to worry about the encryption used since the computer will receive a notice from the wireless network about how it is setup and use the appropriate method. It's probably good for you to pay attention whether the network you are connecting to is secure or not.
    If you are setting up a network at home using a cable modem or broadband router, or even just a Wi-Fi access point, you want to set it up to use WPA2 unless you have some very old computers that only support WPA. You should avoid using WEP.

  • How can i use one datatable inside the other?

    Hi all,
    i need help ... i have this page that shows information from a relational table... for example a mapped table "Countries" that has a java.util.Set inside named "Cities" and i would like 2 know how can i do this using jsf...
    The display would be like this:
    Brasil
    Rio de Janeiro
    Sao Paulo
    USA
    New York
    Washington
    New Orleans
    And Goes on... So i guess it would be a dataTable inside the other, right? but i dunno how to do it...
    Thanks for any info. cya

    this is somehow a messy example. But just focus on the var attribute of outer datatable and how value attribute of inner datatable is referencing it.
    <h:dataTable id="table1" value="#{pc_City_state.listofstates.states}" var="varstates" styleClass="dataTable">
                   <h:column id="column1">
                        <f:facet name="header">
                             <h:outputText styleClass="outputText" value="StateName" id="text2"></h:outputText>
                        </f:facet>
                        <h:outputText id="text3" value="#{varstates.stateName}" styleClass="outputText">
                        </h:outputText>
                   </h:column>
                   <h:column id="column3">
    <f:facet name="header">
    </f:facet>
              <h:dataTable id="table2" value="#{varstates.cities}" var="varcities" styleClass="dataTable">
                                       <f:facet name="footer">
                                       </f:facet>
                                       <h:column id="column4">
              <f:facet name="header">
              <h:outputText styleClass="outputText" value="CityName" id="text6"></h:outputText>
              </f:facet>
              <h:outputText id="text7" value="#{varcities.cityName}" styleClass="outputText">
              </h:outputText></h:column>
              </h:dataTable>
    </h:column>
    </h:dataTable>

  • How can i change the class in the Class Library project to be static or public so i can use it from the windows application project ?

    First i know that when i make any changes to the class library project i need to rebuild the project then to remove the Capture.dll from the TestScreenshot project and then to add again the updated Capture.dll
    The problem for example in this case i'm trying to use a public static variable i add in the DXHookD3D9.
    In the DXHookD3D9 i added this public static variable:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    //using SlimDX.Direct3D9;
    using EasyHook;
    using System.Runtime.InteropServices;
    using System.IO;
    using System.Threading;
    using System.Drawing;
    using Capture.Interface;
    using SharpDX.Direct3D9;
    namespace Capture.Hook
    internal class DXHookD3D9: BaseDXHook
    public DXHookD3D9(CaptureInterface ssInterface)
    : base(ssInterface)
    LocalHook Direct3DDevice_EndSceneHook = null;
    LocalHook Direct3DDevice_ResetHook = null;
    LocalHook Direct3DDevice_PresentHook = null;
    LocalHook Direct3DDeviceEx_PresentExHook = null;
    object _lockRenderTarget = new object();
    Surface _renderTarget;
    public static decimal framesperhourtodisplay = 0;
    protected override string HookName
    get
    return "DXHookD3D9";
    List<IntPtr> id3dDeviceFunctionAddresses = new List<IntPtr>(
    framesperhourtodisplay
    The problem is i can't even get to the Capture.Hook namespace and not to the DXHookD3D9 from the TestScreenshot application window project.
    This is a screenshot:
    For example fro the FramesPerSecond class i can use it get to it from the windows forms application.
    namespace Capture.Hook
    /// <summary>
    /// Used to determine the FPS
    /// </summary>
    public class FramesPerSecond
    int _frames = 0;
    int _lastTickCount = 0;
    float _lastFrameRate = 0;
    Since it's public i guess.
    But if i will change the DXHookD3D9 class from internal to public:
    public class DXHookD3D9: BaseDXHook
    I will get error on the DXHookD3D9: 
    Error 1
    Inconsistent accessibility: base class 'Capture.Hook.BaseDXHook' is less accessible than class 'Capture.Hook.DXHookD3D9'
    And the BaseDXHook class:
    namespace Capture.Hook
    internal abstract class BaseDXHook: IDXHook
    protected readonly ClientCaptureInterfaceEventProxy InterfaceEventProxy = new ClientCaptureInterfaceEventProxy();
    public BaseDXHook(CaptureInterface ssInterface)
    this.Interface = ssInterface;
    this.Timer = new Stopwatch();
    this.Timer.Start();
    this.FPS = new FramesPerSecond();
    Interface.ScreenshotRequested += InterfaceEventProxy.ScreenshotRequestedProxyHandler;
    Interface.DisplayText += InterfaceEventProxy.DisplayTextProxyHandler;
    InterfaceEventProxy.ScreenshotRequested += new ScreenshotRequestedEvent(InterfaceEventProxy_ScreenshotRequested);
    InterfaceEventProxy.DisplayText += new DisplayTextEvent(InterfaceEventProxy_DisplayText);
    ~BaseDXHook()
    Dispose(false);
    How can i solve it so i can use the variable framesperhourtodisplay in the DXHookD3D9 class with the TestScreenshot windows forms application ?

    Hi,
    I dont know if it will work here, since I dont know the complete structure, but the base call must be public, if the derived class is public, so the base class is at least as accessible as the derived class.
    Try make the base class public. (And maybe the base-class IDXHook of the base also...)
    Or use a different approach and make only the properties public that are needed to be public by adding an extra class...
    A structure could look like:(you need to create a class thats public in your dll and expose a property, and set this property in the internal class...)
    In the Accessing class (here Form1)
    public partial class Form1 : Form
    public Form1()
    InitializeComponent();
    private void Form1_Load(object sender, EventArgs e)
    C c = new C();
    MessageBox.Show(B.F.ToString());
    and in the class Lib:
    internal class A
    public A()
    B.F = DateTime.Now.Millisecond;
    public class B
    public static int F { get; set; }
    public class C
    public C()
    A a = new A();
    (add a referenc to the class lib from the accessing project)
    Regards,
      Thorsten

  • How can my custom DCErrorHandler class throw/handle an exception?

    I had written a custom DCErrorHandler extending the DCErrorhandlerImpl as similar as shown in SRDemo example.
    Assume that i have a method authenticateUser() in AppmoduleService Class calling from Backing Bean.java where in i encountered ArrayOutOfBoundsException. So how can i catch this exception without using try catch block? if i use
    try{
    authenticateUser();
    catch(Exception eX)
    {} the exception is well-handled.Then what exactly my customErrorHandler class doing?
    Do the above customErrorHandler class help in this case by replacing try-catch?

    From where my customErrorHandler's methods are invoked.
    If i want to do it exlicitly from any method of my backing bean class can i do it?
    LoginBackingBean.java
    public String loginButton_Action()
    ArrayList userDetailsList = null;
    LoginService service = (LoginService)ADFUtils.getLoginServiceInterface();
    if(service != null)
    userDetailsList = service.checkUserLoginDetails(getUsername(), getPassword());
    if(userDetailsList != null && userDetailsList.size()>0) {                 
    JSFUtils.storeOnSession("key_loggedUserDetails",userDetailsList);
    return "success";
    else
    JSFUtils.addFacesErrorMessage("You have entered an invalid User name and/or Password.");
    return "wrongLogin";
    else{
    return "wrongLogin";
    Now assume that i have customDCErrorHandler class and also assume that an exception will be thrown ..say ArrayOutOfBoundException.
    if i keep the above code in try and catch block the user login screen is remained as it is by catching the exception.
    if i remove the try and catch block user screen if filled up with so many debugging messages as shown : "500 Internal Server Error
    javax.faces.FacesException: #{login.loginButton_Action}: javax.faces.el.EvaluationException: java.lang.IndexOutOfBoundsException: Index: 1, Size: 0     at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)     at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)     at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)     at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)     at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
    So can we avoid this by using my customDCErrorHandler ???? If so i need a sample code.
    More over if i use a customDCErrorHandler class,
    Do i need to bother about the exceptions occuring in the application?

  • How can i import my classes in jsp?

    Dear All,
    i want to access my classes in jsp. i am using apache tomcat
    server. let me know where i have to put my own packages and
    how can i use them in jsp.
    thanks

    Put them in directory /WEB-INF/classes under you webcontext. You can use them in your jsp by importing them or using the useBean directive.

  • How can I get the class(ification)  for an equipment with  BAPI ?

    Hello Experts,
    I have created an Equipment with a BAPI. ("BAPI_EQUI_CREATE")
    and  i  create  the assignment   to a (equipment-)class with the BAPI BAPI_OBJCL_CREATE.
    When I use another BAPI  BAPI_EQUI_GETDETAIL I get all information to the equipment,
    but I don't get the information to wich class is it assigned.
    How can I get this ?
    Thanx in advance

    Hi,
    As Keshav mentioned you can get the classification data by using BAPI_OBJCL_GETDETAIL
    you have to pass the following parameters to it.
    CALL FUNCTION  'BAPI_OBJCL_GETDETAIL'
    EXPORTING
    objectkey =  equipment no in your case
    objecttable = 'EQUI''
    classnum =  Class Name
    classtype =  Class Type
    Thanks.

  • How can I import a servlet inside a JSP?

    Hi! I have seen tons of instructions on importing beans inside a JSP page but I want to use servlets instead. This question might be stupid, but I'm not really adept with JSPs yet and I hope you can help me.
    I need to import classes inside my JSP page so that I can use the methods and manipulate them through the JSP.
    Thank you!
    lauramos

    I'm curious, have you looked into using the MVC or Struts framework? One idea would be to map the Servlet you created to a JSP via XML (or any other mapping you want #?.jhtml for all that matters) and jsp:include as needed. Just a few mappings needed in WEB-INF/web.xml for instance...
    <servlet>
    ��<servlet-name>HeaderPageHandler</servlet-name>
    ��<servlet-class>packagename.HeaderPageHandler</servlet-class>
    </servlet>
    <servlet-mapping>
    ��<servlet-name>HeaderPageHandler</servlet-name>
    ��<url-pattern>/header_page.jsp</url-pattern>
    </servlet-mapping>
    In the JSP:
    <jsp:include page = "header_page.jsp" flush = "true" />
    The Servlet could forward the information over to another page using the getRequestDispatcher(String url).include(req, resp); From there, use the application or request scope to handle the jsp:useBean to output what you need. You could take that further and customize some of your own TLDs so you could state simple tags like <tag:output class="text">some text here</tag:output>

Maybe you are looking for

  • Error in using bapi

    Hi, I am using bapi 'BAPI_QUOTATION_CREATEFROMDATA' for creating quotation. it is giving error 'External number assignment is not defined for document type ZSQ' Can you please suggest me the reason of this error. Thanks, Sushant.

  • How do i find a PDF sent to me

    how do i find a PDF sent to my e-mail address it doesn' t load when i open it

  • Error handling in bapi

    hi all,       how to handle errors in bapis,and also can anyone send faqs on bapis.

  • Semi-automatic update/upgrade; is Arch wrong distro for these boxen?

    I wanted to post here a semi-automatic update/upgrade solution I--with a lot of help from someone more knowledgeable--came up with in case it might be of benefit to anyone else. It's been working pretty well for me over the course of the last couple

  • Treasury deals without bank details not updated in CM report

    Hi all, when creating a deal in Transaction Manager via trans. code FTR_CREATE without Bank details the respective cash flows data are not transferred to Cash Management report FF70 due to some reason. please note, that planning level Bank unknown (D