Importing external classes

How do I import a downloaded .class file to be used in my project? It shows up in the Explorer [filesystems] view but I still get an error.
BCrowe

>>
uh - don't believe so. You don't need an importwhen
the class is part of the default name space.
That's not what I've experienced, could you show an
example of how that's done?
Show an example of how what is done?
If the class is in the default name space it has no package.
So there is no import statement. So I guess an example would be a blank line?
Amazingly enough I remembered the reason for this.
The import statement allows the compiler to fully resolve the name, so a developer can use a short hand abbreviation.
If I want to use 'java.util.Date' then the compiler will need to know the fully qualified name, which is 'java.util.Date'. I can use the full name or I can import it using either 'java.util.*' or 'java.util.Date'.
And then in my code I can just use 'Date.
And the compiler will always resolve it to 'java.util.Date'.
But what happens if I create a 'Date' in the default name space?
The fully resolved name is 'Date'. There is nothing for the compiler to resolve. There is no shorthand that the developer can use.
Even if 'import Date' was allowed it doesn't tell the compiler anything that it doesn't already know.
Further the compiler must look in the default name space anyways. Whether an import statement is there or not.

Similar Messages

  • How to import GreenSock external classes?

    Hi, I'm having some problems in importing GreenSock external classes into my flash project.
    Line 27: import gs.*;
    Desktop\myFlashAPPS\twitter\src\zainu\twitter\MainClass.as, Line 27
    1172: Definition gs could not be found.
    Here is the directory tree:
    myFlashApp (contains myproject.fla)
         src
              zainu
                   twitter (contains MainClass.as and gs folder)
    MainClass.as:
    package zainu.twitter{

    You could try specifying the path to the gs folder as if you were importing it directly from the myproject.fla file.
    You should set up a classpath for external classes for your system so that Flash has a ready reference for finding them.  YOu can set this up via using Edit -> Preferences... -> Actionscript -> Actionscript 3.0 Settings... -> specify a source path.  Normally what people do is create a folder in a relatively general location and use that as their source path.   Within that they place a "com" folder, and within that com folder they place their subfolders for different classes they acquire from outside sources, such as your gs folder.  So when you want to import the gs classes you can use... import com.gs.*;
    There is a tutorial at gotoandlearn that explains this...   http://www.gotoandlearn.com/play.php?id=30

  • How do I write an external class with global constants?

    Hi you all !
    First I want to explain what exactly I want to do:
    I have an application that should run in different resolutions. The app runs fullscreen, and I don't use Layouts or something, just a single Frame with a Graphics Object.
    Now to handle the different resolutions, I want to write an external class with some constants to use. The usage in my main Class should be something like this:
    public
    class blah
    private Constants myConstants;
    public blah()
    if (highResolution)
    myConstants = new hiResConstants();
    else
    myConstants = new loResConstants();
    System.println(String.valueOf(myConstants.SCREEN_WIDTH);
    }or somthing like that. The important fact is that I can choose the constants at runtime and that I am NOT forced to use methods to get the values, cause something like
    System.println(String.valueOf(myConstants.getScreenWidth());sux if you have methods using 5 or more parameters.
    Anybody out there who understood my problem and can help me??? PLEASE?
    best regards,
    Skippy

    First, what's so much worse about
    System.println(myConstants.getScreenWidth());
    than
    System.println(myConstants.ScreenWidth);
    Is the extra five characters really that bad? (Note
    you don't need the String.valueOf method call.)Well actually it was a wrong example I gave here, but it's not the call that makes me shake but the implementation:
    public int screenWidth = 1024;vs.
    public
    int getScreenWidth()
    return 1024;
    }Here it makes a bigger difference, even when you think of managing about 100 or even more constants.
    Second, why do you have methods that take five or more
    parameters!?Well, maybe this example show up what I mean:
    if (cursorIsInArea(100,100,200,200,areaId))
    doSomeStuff();Ok, I could use Rectangles here, but if you think of the timing here (I draw 30 frames / sec and this check comes about every frame or the animation would be choppy) I refuse to create an Object everytime I make this call.
    Btw: Is it worth thinking about the time of execution like I did in this example? OO is a neat thing, but is it that fast?
    I don't think isCursorInArea(new Rectangle(100,100,200,200),areaId) is such a great idea, but I might be wrong.
    It sounds like you're trying to compound a bad design
    with an even worse design for no good reason!Well, I'm not that experienced Java programmer to judge about that, but I (and my profs at university too) found my codes well structured and designed so far.
    Skippy
    PS: the string.valueOf(123) call came from cut&paste:
    system.out.println(string.valueOf(number1)+string.valueOf(number2));Try this without the function.... ;-)

  • Error while trying to import external web service in webdynpro java

    Hi,
    I am trying to import external webservice in webdynpro java using adaptive webservice model, but i am getting below error..i tried some other external webservices but those are working fine....I wanted to know if there is any issue with this wsdl?? any suggestions?
    com.sap.tc.webdynpro.model.webservice.exception.WSModelRuntimeException: Exception on creation of service metadata for WSDL URL 'https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_SearchService?wsdl' and service factory configuration '{DynamicProxy.ClassPath=C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.tc.cmi_1.0.0/_cmi_api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.exception_2.0.0/lib/exception.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/boot.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/iq-lib.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/util.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/webservices_lib.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/webservices.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/webservices_api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/tc_sec_wssec_lib.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.dictionary.runtime_2.0.0/lib/SapDictionaryTypesRuntime.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.dictionary.services_2.0.0/lib/SapDictionaryTypeServices.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.tssap.sap.libs.logging_2.0.0/lib/logging.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.tssap.sap.libs.logging_2.0.0/lib/loggingStandard.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.tssap.sap.libs.logging_2.0.0/lib/jARM.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.tssap.sap.libs.xmltoolkit_2.0.0/lib/sapxmltoolkit.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/activation.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/jaxm-api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/saaj-api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/jaxrpc-api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/jnet.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/jsse.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/mail.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.tc.webdynpro.model.webservice_2.0.0/lib/_webdynpro_model_webservice.jar;, DynamicProxy.Javac.path=C:\j2sdk1.4.2_19, DynamicProxy.TempDir=C:\Users\sakkav01\AppData\Local\Temp\}'
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getOrCreateWsrService(WSModelInfo.java:414)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.readOperationsFromWSDL(WSModelInfo.java:372)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.importMetadataInternal(WSModelInfo.java:342)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.importMetadata(WSModelInfo.java:306)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.importMetadata(WSModelInfo.java:316)
    at com.sap.ide.webdynpro.modeleditor.wizards.model.creation.PageRenameWS.loadNameSpacesAndModelClasses(PageRenameWS.java:435)
    at com.sap.ide.webdynpro.modeleditor.wizards.model.creation.ModelDialog.nextPressed(ModelDialog.java:105)
    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:316)
    at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:423)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:583)
    at org.eclipse.jface.window.Window.open(Window.java:563)
    at com.sap.ide.webdynpro.modeleditor.ModelEditorCallback.createModel(ModelEditorCallback.java:52)
    at com.sap.ide.webdynpro.service.modeleditor.ModelService.createModelWithUI(ModelService.java:70)
    at com.sap.ide.webdynpro.service.modeleditor.ServiceWithUI.createModel(ServiceWithUI.java:49)
    at com.sap.ide.webdynpro.tsmodel.application.provider.ModelNodeProvider.createUniqueName(ModelNodeProvider.java:55)
    at com.tssap.selena.impl.model.elements.EntityImpl.createChildEntityUin(EntityImpl.java:936)
    at com.tssap.selena.impl.model.elements.EntityImpl.createChildEntity(EntityImpl.java:502)
    at com.sap.ide.webdynpro.tsmodel.application.actions.CreationAction.runInternal(CreationAction.java:76)
    at com.sap.ide.webdynpro.tsmodel.application.actions.CreationAction.access$000(CreationAction.java:24)
    at com.sap.ide.webdynpro.tsmodel.application.actions.CreationAction$1.run(CreationAction.java:51)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1595)
    at com.sap.ide.webdynpro.tsmodel.application.actions.CreationAction.run(CreationAction.java:57)
    at com.sap.ide.webdynpro.projectbrowser.actions.PBCreateModelAction.run(PBCreateModelAction.java:95)
    at com.tssap.selena.model.extension.action.SelenaActionCollector$GenericElementActionWrapper.run(SelenaActionCollector.java:224)
    at com.tssap.util.ui.menu.MenuFactory$MuSiAction.saveRunAction(MenuFactory.java:1425)
    at com.tssap.util.ui.menu.MenuFactory$MuSiAction.run(MenuFactory.java:1407)
    at com.tssap.util.ui.menu.MenuFactory$DelegateAction.processInternal(MenuFactory.java:616)
    at com.tssap.util.ui.menu.MenuFactory$DelegateAction.access$100(MenuFactory.java:586)
    at com.tssap.util.ui.menu.MenuFactory$DelegateAction$BusyProcessWorker.run(MenuFactory.java:716)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
    at com.tssap.util.ui.menu.MenuFactory$DelegateAction.process(MenuFactory.java:610)
    at com.tssap.util.ui.menu.internal.MenuListenerFactory$ProcessAdapter.widgetSelected(MenuListenerFactory.java:172)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
    at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
    at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858)
    at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sap.ide.eclipse.startup.Main.basicRun(Main.java:291)
    at com.sap.ide.eclipse.startup.Main.run(Main.java:789)
    at com.sap.ide.eclipse.startup.Main.main(Main.java:607)
    Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.WebserviceClientException: GenericServiceFactory initialization problem. Could not load web service model. See nested exception for details.
    at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DGenericServiceImpl.generateProxyFiles(DGenericServiceImpl.java:157)
    at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DGenericServiceImpl.<init>(DGenericServiceImpl.java:56)
    at com.sap.engine.services.webservices.espbase.client.dynamic.GenericServiceFactory.createService(GenericServiceFactory.java:88)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getOrCreateWsrService(WSModelInfo.java:412)
    ... 52 more
    Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.ProxyGeneratorException: Proxy Generator Error. Problem with WSDL file parsing. See nested message.
    at com.sap.engine.services.webservices.jaxrpc.wsdl2java.ProxyGenerator.generateProxy(ProxyGenerator.java:182)
    at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DGenericServiceImpl.generateProxyFiles(DGenericServiceImpl.java:154)
    ... 55 more
    Caused by: com.sap.engine.lib.xml.util.NestedException: IO Exception occurred while parsing file:Invalid Response Code: (-1) null. The requested URL was:"https//:xxxxxxxxxxxxxxxxxxxxx_SearchService?wsdl" -> com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (-1) null. The requested URL was:"https://xxxxxxxxxxxxxxxxxxxxxxxxxx_SearchService?wsdl"
    at com.sap.engine.services.webservices.wsdl.WSDLDOMLoader.loadDOMDocument(WSDLDOMLoader.java:1039)
    at com.sap.engine.services.webservices.wsdl.WSDLDOMLoader.loadWSDLDocument(WSDLDOMLoader.java:1126)
    at com.sap.engine.services.webservices.jaxrpc.wsdl2java.ProxyGenerator.generateProxy(ProxyGenerator.java:178)
    ... 56 more
    Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (-1) null. The requested URL was:"https://xxxxxxxxxxxxxxxxxxxx/HCP_SearchService?wsdl"
    at com.sap.engine.services.webservices.tools.WSDLDownloadResolver.resolveEntity(WSDLDownloadResolver.java:180)
    at com.sap.engine.services.webservices.wsdl.WSDLDOMLoader.loadDOMDocument(WSDLDOMLoader.java:1019)
    ... 58 more

    Hi Vijay,
    There was some issues with the wsdl url itselft, now i got the right wsdl url and i tried with wsnavigator , i tested it works fine from there...
    but when i try to import using adaptive web service model it is throwing error..pls find the error log below...i am getting cannot load namespaces and model classes error and also some proxy error..i am giving proxy and 8080 as default...pls let me know what exact proxy settings i have to give here..
    com.sap.tc.webdynpro.model.webservice.exception.WSModelRuntimeException: Exception on creation of service metadata for WSDL URL 'https://xxxxxxxxxxxxxxxxxxchService?wsdl' and service factory configuration '{DynamicProxy.ClassPath=C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.tc.cmi_1.0.0/_cmi_api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.exception_2.0.0/lib/exception.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/boot.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/iq-lib.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/util.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/webservices_lib.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/webservices.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/webservices_api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/tc_sec_wssec_lib.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.dictionary.runtime_2.0.0/lib/SapDictionaryTypesRuntime.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.dictionary.services_2.0.0/lib/SapDictionaryTypeServices.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.tssap.sap.libs.logging_2.0.0/lib/logging.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.tssap.sap.libs.logging_2.0.0/lib/loggingStandard.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.tssap.sap.libs.logging_2.0.0/lib/jARM.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.tssap.sap.libs.xmltoolkit_2.0.0/lib/sapxmltoolkit.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/activation.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/jaxm-api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/saaj-api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/jaxrpc-api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/jnet.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/jsse.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/mail.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.tc.webdynpro.model.webservice_2.0.0/lib/_webdynpro_model_webservice.jar;, DynamicProxy.INetProxy.Bypass="*.sap.corp"|usc1-dpid01|, DynamicProxy.INetProxy.Port=8080, DynamicProxy.Javac.path=C:\j2sdk1.4.2_19, DynamicProxy.TempDir=C:\Users\sakkav01\AppData\Local\Temp\, DynamicProxy.INetProxy.Host=proxy'
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getOrCreateWsrService(WSModelInfo.java:414)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.readOperationsFromWSDL(WSModelInfo.java:372)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.importMetadataInternal(WSModelInfo.java:342)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.importMetadata(WSModelInfo.java:306)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.importMetadata(WSModelInfo.java:316)
    at com.sap.ide.webdynpro.modeleditor.wizards.model.creation.PageRenameWS.loadNameSpacesAndModelClasses(PageRenameWS.java:435)
    at com.sap.ide.webdynpro.modeleditor.wizards.model.creation.ModelDialog.nextPressed(ModelDialog.java:105)
    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:316)
    at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:423)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:583)
    at org.eclipse.jface.window.Window.open(Window.java:563)
    at com.sap.ide.webdynpro.modeleditor.ModelEditorCallback.createModel(ModelEditorCallback.java:52)
    at com.sap.ide.webdynpro.service.modeleditor.ModelService.createModelWithUI(ModelService.java:70)
    at com.sap.ide.webdynpro.service.modeleditor.ServiceWithUI.createModel(ServiceWithUI.java:49)
    at com.sap.ide.webdynpro.tsmodel.application.provider.ModelNodeProvider.createUniqueName(ModelNodeProvider.java:55)
    at com.tssap.selena.impl.model.elements.EntityImpl.createChildEntityUin(EntityImpl.java:936)
    at com.tssap.selena.impl.model.elements.EntityImpl.createChildEntity(EntityImpl.java:502)
    at com.sap.ide.webdynpro.tsmodel.application.actions.CreationAction.runInternal(CreationAction.java:76)
    at com.sap.ide.webdynpro.tsmodel.application.actions.CreationAction.access$000(CreationAction.java:24)
    at com.sap.ide.webdynpro.tsmodel.application.actions.CreationAction$1.run(CreationAction.java:51)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1595)
    at com.sap.ide.webdynpro.tsmodel.application.actions.CreationAction.run(CreationAction.java:57)
    at com.sap.ide.webdynpro.projectbrowser.actions.PBCreateModelAction.run(PBCreateModelAction.java:95)
    at com.tssap.selena.model.extension.action.SelenaActionCollector$GenericElementActionWrapper.run(SelenaActionCollector.java:224)
    at com.tssap.util.ui.menu.MenuFactory$MuSiAction.saveRunAction(MenuFactory.java:1425)
    at com.tssap.util.ui.menu.MenuFactory$MuSiAction.run(MenuFactory.java:1407)
    at com.tssap.util.ui.menu.MenuFactory$DelegateAction.processInternal(MenuFactory.java:616)
    at com.tssap.util.ui.menu.MenuFactory$DelegateAction.access$100(MenuFactory.java:586)
    at com.tssap.util.ui.menu.MenuFactory$DelegateAction$BusyProcessWorker.run(MenuFactory.java:716)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
    at com.tssap.util.ui.menu.MenuFactory$DelegateAction.process(MenuFactory.java:610)
    at com.tssap.util.ui.menu.internal.MenuListenerFactory$ProcessAdapter.widgetSelected(MenuListenerFactory.java:172)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
    at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
    at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858)
    at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sap.ide.eclipse.startup.Main.basicRun(Main.java:291)
    at com.sap.ide.eclipse.startup.Main.run(Main.java:789)
    at com.sap.ide.eclipse.startup.Main.main(Main.java:607)
    Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.WebserviceClientException: GenericServiceFactory initialization problem. Could not load web service model. See nested exception for details.
    at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DGenericServiceImpl.generateProxyFiles(DGenericServiceImpl.java:158)
    at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DGenericServiceImpl.<init>(DGenericServiceImpl.java:56)
    at com.sap.engine.services.webservices.espbase.client.dynamic.GenericServiceFactory.createService(GenericServiceFactory.java:92)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getOrCreateWsrService(WSModelInfo.java:412)
    ... 52 more
    Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.ProxyGeneratorException: Proxy Generator Error. Problem with WSDL file parsing. See nested message.
    at com.sap.engine.services.webservices.jaxrpc.wsdl2java.ProxyGenerator.generateProxy(ProxyGenerator.java:182)
    at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DGenericServiceImpl.generateProxyFiles(DGenericServiceImpl.java:155)
    ... 55 more
    Caused by: com.sap.engine.lib.xml.util.NestedException: IO Exception occurred while parsing file:Cannot connect to https://xxxxxxxxxxxxxxxxx_SearchService?wsdl, passing via http proxy: https://usc1-dpid01:21000: Peer sent alert: Alert Fatal: illegal parameter -> java.io.IOException: Cannot connect to https://xxxxxxxxxxxx_SearchService?wsdl, passing via http proxy:proxy: Peer sent alert: Alert Fatal: illegal parameter
    at com.sap.engine.services.webservices.wsdl.WSDLDOMLoader.loadDOMDocument(WSDLDOMLoader.java:1039)
    at com.sap.engine.services.webservices.wsdl.WSDLDOMLoader.loadWSDLDocument(WSDLDOMLoader.java:1126)
    at com.sap.engine.services.webservices.jaxrpc.wsdl2java.ProxyGenerator.generateProxy(ProxyGenerator.java:178)
    ... 56 more
    Caused by: java.io.IOException: Cannot connect to https://xxxxxxxxxxxxxxx_SearchService?wsdl, passing via http proxy:: Peer sent alert: Alert Fatal: illegal parameter
    at com.sap.engine.services.webservices.tools.WSDLDownloadResolver.resolveEntity(WSDLDownloadResolver.java:175)
    at com.sap.engine.services.webservices.wsdl.WSDLDOMLoader.loadDOMDocument(WSDLDOMLoader.java:1019)
    ... 58 more

  • Message Transformation Bean - Usage of external classes

    Hi SDNers,
    I am planning to write an external Java class to be loaded from AF_Modules/MessageTransformBean . The idea is simple, I want my class to handle an extra level of hierarchy in FCC process. I know writing the Java class which is as generic as the one provided by SAP is too complex. But I just want it for some specific requirements, so I dont intend to make it as a generic class.
    Should the external class that I write implement the interface Transform? If so, what is the jar file that contains this interface and where can I find this jar file in my XI installation?
    Also, what is the jar file that contains the standard class com.sap.aii.messaging.adapter.Conversion that gets loaded by default while using the MessageTransformBean?
    If you have already tried with similar requirements, please share your experience on the same.
    Thanks
    Jaishankar

    You can use the same module in J2SE and J2EE adapter without change.
    I recommend to install a J2SE adapter engine on a local PC for testing.
    I have found a sample code from previous tests:
    package sample;
    import com.sap.aii.messaging.adapter.Parameter;
    import com.sap.aii.messaging.adapter.trans.Transform;
    import com.sap.aii.messaging.adapter.trans.*;
    import java.io.*;
    public class MyModule extends Transform {
    Parameter parameter;
    String filename;
         public void init(TransformConfig config) throws TransformException{
                   super.init(config);
                   parameter = (Parameter) config.getParameters("Parameter");
                   filename = (String) parameter.get("filename");
         // obligatory method service
         public void service(TransformRequest request, TransformResponse response) throws TransformException {
              // Get the input stream for request message
              InputStream in = (InputStream) request.getMessage();
              // Get output stream for response message
              OutputStream out = (OutputStream) response.getMessage(Transform.MT_OutputStream);
              try{
                   execute(in,out);
              } catch (Exception e) {
                   throw new TransformException("TransformException: Error converting Message " + e.getMessage(), e);
         public void execute(InputStream in, OutputStream out) throws Exception{
              String filename = (String) transformConfig.getParameters("FileName");
              if (filename == null){
                   filename = "notfound.txt";
              // open file stream
              OutputStream fileOut = new FileOutputStream(new File(filename));
              // copy input stream to output stream and to file
              int c;
              while ((c = in.read()) != -1) {
                        fileOut.write(c);
                        out.write(c);
    //     main Methode, for local testing. A local XML file is expected.
          public static void main (String[] args) {
               try {
                    // Define Input stream and output stream from file
                    InputStream in = new FileInputStream(new File("source.xml"));
                    OutputStream out = new FileOutputStream(new File("target.xml"));
                    // call Mapping
                    MyModule map = new MyModule();
                    map.execute(in,out);
               } catch (Throwable t) {
                    t.printStackTrace();
               System.exit(0);

  • Flash player caches external class files

    Hi I work for a technology company in San Antonio and we use
    flash for developing interactive course ware. We use a flash shell
    which loads the separate pages of our lessons and have noticed a
    very big problem with the way the flash player caches class files.
    Basically it seems that when you use the 'import' call in
    actionscript the flash movie doesn't import the external class if
    it has already been loaded. the problem is that we have a huge
    amount of developed classes, many of which have been updated
    throughout our development. Is there any way for force clear the
    ASO cache in actionscript or force import external actionscript
    classes?

    Yes we know and use the delete aso files feature all the
    time. this however is a runtime problem. meaning that the flash
    player itself is caching class files and there is no way to get it
    to refresh these links without doing a forced refresh of the shell
    itself. this is something that is not an option as it doesn't allow
    for fluid page loading. Is there any way to force reload/import
    class files that have already been loaded, that is clear the
    class/aso cache in the flash player itself using actionscript
    code?

  • Working with AS3 External Classes

    Ok... trying to work with AS3 external classes. I have a movieClip that I want to also function as a button. Instance name is "_onDemand". This movieClip is on the stage of my Home.fla.  "_onDemand" movieClip properties   Class:HomePage  Base clase: flash.display.MovieClip
    I want the user to click this movieClip and take the user to an external URL within a new browser window or tab.
    Can anyone help me? Or at least point me to a really really good tutroial that does exactly this using external classes?
    Thanks so much,
    Mark
    My code:
    package com.cox4college.pages
    import com.gaiaframework.templates.AbstractPage;
    import com.gaiaframework.events.*;
    import com.gaiaframework.debug.*;
    import com.gaiaframework.api.*;
    import flash.display.*;
    import flash.events.*;
    import com.greensock.TweenMax;
    import flash.net.URLRequest;
    import flash.net.navigateToURL;
    public class HomePage extends AbstractPage
    public function HomePage()
    super();
    alpha = 0;
    //new Scaffold(this);
    override public function transitionIn():void
    super.transitionIn();
    TweenMax.to(this, 0.3, {alpha:1, onComplete:transitionInComplete});
    override public function transitionOut():void
    super.transitionOut();
    TweenMax.to(this, 0.3, {alpha:0, onComplete:transitionOutComplete});
    public class _onDemand extends Sprite
    // Link Navigation button handlers
    public var _onDemand:Sprite;
    // if you want a hand cursor
    _onDemand.buttonMode = true;
    _onDemand.useHandCursor = true;
    _onDemand.addEventListener(MouseEvent.CLICK, onDemandClickHandler);
    _onDemand.addEventListener(MouseEvent.ROLL_OVER, onDemandRollOverHandler);
    _onDemand.addEventListener(MouseEvent.ROLL_OUT, onDemandRollOutHandler);
    public function onDemandClickHandler(e:MouseEvent):void{
    navigateToURL(new URLRequest("http://ww2.cox.com/residential/santabarbara/tv/ondemand.cox"));
    public function onDemandRollOverHandler(event:MouseEvent):void{
    _onDemand.gotoAndStop("hover");
    public function onDemandRollOutHandler(event:MouseEvent):void{
    _onDemand.gotoAndStop("static");
    Getting the following errors:
    1120: Access of undefined property _onDemand.

    Ok. I admit it... I had some wonderful help to resolve this issue. You ever feel like you are on an island learning AS3 External Classes? I feel that way all the time... so far... I plan on not feeling that way soon. I hope this helps someone get off that island.
    package com.domainname.client {
        import flash.display.*;
        import flash.events.*;
        import flash.net.*;
        import flash.utils.*;   
        import caurina.transitions.Tweener;
        import caurina.transitions.properties.*;
        FilterShortcuts.init();   
        ColorShortcuts.init();      
        public class Main extends MovieClip {
            private var coverDelay:Number = 4;
            //#DF6D27
            public function Main():void {
                initMain();
            private function initMain():void {
                mc_form.visible = false;
                Tweener.addTween(mc_cover,{alpha:1,time:1,delay:coverDelay,onComplete:formIn});
                btn_onDemand.buttonMode = true;
                btn_listings.buttonMode = true;
                btn_ppv.buttonMode = true;
                btn_rhapsody.buttonMode = true;
                btn_onDemand.addEventListener(MouseEvent.MOUSE_OVER,navOver);
                btn_onDemand.addEventListener(MouseEvent.MOUSE_OUT,navOut);
                btn_onDemand.addEventListener(MouseEvent.CLICK,navClick);
                btn_listings.addEventListener(MouseEvent.MOUSE_OVER,navOver);
                btn_listings.addEventListener(MouseEvent.MOUSE_OUT,navOut);
                btn_listings.addEventListener(MouseEvent.CLICK,navClick);
                btn_ppv.addEventListener(MouseEvent.MOUSE_OVER,navOver);
                btn_ppv.addEventListener(MouseEvent.MOUSE_OUT,navOut);
                btn_ppv.addEventListener(MouseEvent.CLICK,navClick);
                btn_rhapsody.addEventListener(MouseEvent.MOUSE_OVER,navOver);
                btn_rhapsody.addEventListener(MouseEvent.MOUSE_OUT,navOut);
                btn_rhapsody.addEventListener(MouseEvent.CLICK,navClick);           
                function navOver(evt:MouseEvent):void {
                    Tweener.addTween(evt.target,{_color:0xffc614,time:.2});
                function navOut(evt:MouseEvent):void {
                    Tweener.addTween(evt.target,{_color:0xffffff,time:.2});
                function navClick(evt:MouseEvent):void {
                    var url;
                    switch (evt.target.name) {
                        case 'btn_onDemand':
                        url = new URLRequest("http://ww2.cox.com/residential/santabarbara/tv/ondemand.cox");
                        break;
                        case 'btn_listings':
                        url = new URLRequest("http://ww2.cox.com/myconnection/santabarbara/watch/entertainment/tv-listings.cox");
                        break;
                        case 'btn_ppv':
                        url = new URLRequest("http://ww2.cox.com/residential/santabarbara/tv/pay-per-view.cox");
                        break;
                        case 'btn_rhapsody':
                        url = new URLRequest("http://ww2.cox.com/myconnection/santabarbara/listen.cox");
                        break;                                                           
                    navigateToURL(url,"_blank");

  • Trouble Using DataProvider in External Class

    Hello,
    I am creating a Flash form which will include a drop-down selection menu from which a user may choose their state. I originally accomplished this by adding a ComboBox to the stage and then populated the ComboBox's DataProvider object with an XML listing of all the state names and the corresponding values. Everything works as expected.
    I have decided, however, that it would make the most sense to create an external class to accomplish the same thing. I have attempted to create such a class using the following code:
    package {
    import fl.data.DataProvider;
    import fl.controls.ComboBox;
    public class StateSelectionList extends ComboBox {
    private var xml:XML;
    private var dp:DataProvider;
    private var cb:ComboBox;
    public function StateSelectionList() {
    xml = <states>
    <state name="AL - ALABAMA" value="AL" />
    <state name="AK - ALASKA" value="AK" />
    <state name="AZ - ARIZONA" value="AZ" />
    </states>;
    dp = new DataProvider(xml);
    cb = new ComboBox();
    cb.dataProvider = dp;
    cb.labelField = "name";
    I then attempted to use this class in my Flash file by adding a ComboBox component to my library and then by creating a new StateSelectionList object and adding it the stage using the following code:
    var states:StateSelectionList = new StateSelectionList();
    addChild(states);
    The data provider for the new object is empty, however, as one can find by tracing the length of the object's dataProvider property;
    trace(states.dataProvider.length);
    I am new to creating external class files so I am not sure why the new object is not populated with any data. Thanks in advance for any suggestions.
    P.S. Please feel free to download the complete XML file I created for the states. The file includes all US states and possessions, US military states, and Canadian provinces and territories. http://windhorsemedia.com/private/states.xml

    There is a something tricky:
    first if you extend the combo box ther is no need to create a new instance in its constructor only to pass the data provider. This will work
        var xml:XML =<states>
                <state name="AL - ALABAMA" value="AL" />
                <state name="AK - ALASKA" value="AK" />
                <state name="AZ - ARIZONA" value='AZ' />
                </states>;
                dataProvider=new DataProvider(xml);
    dataProvider is public from base class ComboBox so you can access it anytime. But the properties that are inspactable may be setted with effect only after second frame is passed so try this
    public class StateSelectionList extends ComboBox {
            public function StateSelectionList():void
              addEventListener( Event>ENTER_FRAME, onsecondFrame, false, 0, true )
    private function onsecondFrame( evnt : Event ): void
    removeEventListener( Event>ENTER_FRAME, onsecondFrame
                var xml:XML =<states>
                <state name="AL - ALABAMA" value="AL" />
                <state name="AK - ALASKA" value="AK" />
                <state name="AZ - ARIZONA" value='AZ' />
                </states>;
                dataProvider=new DataProvider(xml);
                labelField="name";
    Note, In my custom components when I extend the UIComponent a set the parameter in afterComponentParameters or CreateUI( I think this was the name ) methods but more fast is just to pass one frame and set the parameturs

  • Importing a .class file into my package?

    Hi. I'm making a java program but I need to use an external .class file to get variables and use methods from. Is it possible to "import" a class file into my package to be able to do so?
    Thanks

    Basically, for our last project we created a class
    that held the information about a year: how many days
    were in a month, how many months were in a year, etc.
    etc. For this project, we'll be having to use that
    same class to make a GUI calendar. Our teacher
    provided a class which he compiled for us to use in
    our projects incase our previous class had some flaws
    in it, which mine did. Unfortunately, it's in .class
    format and I don't know how to use it in my package!That's going to be a problem then. I would assume that it is going to have an API like your old one did. Same name and same methods etc. So do you know what the name and method signatures of your class were supposed to be?

  • How to import a .class in eclipse?

    I have a .class file w/ out the source, and im tiring to import that into my project.
    So I go to import->File System and check the .class file. It shows up in my project but when I try to instantiate it I get a "can not be instantiated to a type" error.
    any thoughts?
    this is happening to a lot of people in my course.
    thanks!

    Hi,
    i tried that what you sad, but my eclipse can't import that class.
    So: I have eclipse 3.1, and i would like to import a class (without source). I develop at the moment a J2ME project with eclipse.
    The class what i want to import is in a package, so i must to import like this: import net.jscience.math.kvm.MathFP;
    Can you tell me how in the hell can i this class to import?
    (I tried about 6 hours long, and i got some result, but not the really perfect.)
    When i make this subdirectory structure (what is in the import line) into my project, then in eclipse work the auto completing, 'till the class name. :-/. But the class is there. Egal i add an external class folder, i got always the same result.
    Please help me, because my brain at the moment wants to explode.
    Thanks a lot.

  • How do I dynamically load a SWF that was compiled from an Fla with a linked external class file

    I am dynamically loading external SWFs in a Main Fla in response to clicks on a menu.
    The loading code is standard and works fine for all of the SWFs except one. When I try to load it I get the following error:
    Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
    I am certain that the URL to the problem SWF is correct. The SWF itself doesn't load any other SWFs or images.
    The problem SWF is linked to an external class file and compiled with it.
    i.e. in the properties panel of the main timeline of the problem SWF's Fla I have entered the path to the external class.
    1. there is no problem compiling this SWF with the class (it works fine by itself)
    2. if I remove the external class from the properties panel and don't use it the resulting SWF imports without a problem into the Main Fla mentioned before
    So the problem seems to be the fact that the external class is linked in the properties panel. Is this a path problem?
    Would appreciate any suggestions,
    Thanks!

    despite what you say, that loaded swf most likely is loading something and that's the cause of the error.
    you could test that by putting the main swf's embedding html file in the same directory with problematic swf.  if the problem is as explained above, you'll have no problem when the main html is in the same directory with the loaded swf.

  • How to import other class in Flex Builder2?

    I use Flex Builder2,I want to import the other class,such as
    ascb,like follows:
    package {
    import flash.display.Sprite;
    import ascb.units.Converter;
    import ascb.units.Unit;
    import flash.events.Event;
    public class ApplicationExample extends Sprite {
    private var _square:Sprite;
    private var _angle:uint;
    public function ApplicationExample() {
    _square=new Sprite();
    _square.graphics.lineStyle(0);
    _square.graphics.drawCircle(0,0,2);
    addChild(_square);
    _angle=0;
    addEventListener(Event.ENTER_FRAME,move);
    private function move(event:Event):void{
    var
    converter:Converter=Unit.DEGREE.getConverterTo(Unit.DADIAN);
    var angleRadians:Number=converter.convert(_angle);
    _square.x=Math.cos(angleRadians)*100+200;
    _square.y=Math.sin(angleRadians)*100+200;
    _angle++;
    ApplicationExample.as is locate in direcotry C:\workspace,and
    I put package ascb into directory C:\workspace too,then I run
    ApplicationExample.as ,it raise following error:
    Description:A file found in a source-path must have an
    externally visible definition. If a definition in the file is meant
    to be externally visible, please put the definition in a package.
    Resource:Converter.as
    In Folder:ApplicationExample/ascb/units
    Location:line -1
    By the way,when I write import ascb.,it should show units,but
    it only show util, I guess I may put package ascb into wrong
    director,or the ascb don't put the route of Flex Builder2. I don't
    know how to do it!
    Please give me detail steps to solve above error!
    Thanks in advance!

    when I put as
    import a;
    while compiling, it prompt : '.' expected
    how to resolve it?
    thanksIn J2SDK 1.4, you can only import a class that is in a named package. The compiler is expecting a package_name.class_name;
    You do not need to import classes that are in the same package and all classes that do not specify a package name are in the same unnamed package. However you must import classes that are in different packages.

  • Including AS3 external class file

    How do I include 2 or more external action script files in my FLA document.The first one is easy and taken care by setting the class property of the FLA document to the class file name. But if I have several external class files? I have tried the 'include' directive but the compiler complains - any suggestions?
    Thanks
    Joseph Karov

    To import the other Class, just start typing its name in an expression, and hold down the control key while hitting the space bar. Both the Flash IDE and Flash Builder will bring up a code completion dropdown. When you select the Class, the import statement will be generated.
    For example, if you are in Foo and you type:
    protected var bar:Bar;
    Then when you have typed in the "Ba" part of the word Bar after the colon, if you use the Ctrl-Space keyboard shortcut, it should show you your Bar Class, possibly among other Classes starting with "Ba." Select "Bar" with either your mouse or your cursor, and Flash will finish the word for you and generate the import statement. Note that you can now create and use instances of Bar, but Bar won't be "merged" into Foo, which it sounds like is what you want. To do that, you'll need to do what I suggested, which is to have one Class extend another Class.
    To have one Class extend the other, change the line that says "public class Foo" to "public class Foo extends Bar". Note that the two Classes must have compatible functionality and have the same base Class. I'm assuming they do, or else trying to "include" the code wouldn't work either.
    Another possible solution, depending on exactly what you're trying to acheive, is to apply the second Class to a symbol in the library and use that by placing it on the stage or accessing it through code. However, you haven't given us very much to go on, so it's really difficult to help you.

  • Exception : importing java classes

    Hi all,
    I'm trying to import java classes in forms 9i, but it generates me this error :
    Import de la classe prj.proxy.MyWebService1SoapHttpPortClient...
    Exception : java.lang.NoClassDefFoundError: oracle/webservices/transport/ClientTransport
    Please give me some help with this issue.

    For the importer to work, your jar-file must be part of the CLASSPATH-environment-variable-setting. If you're classes to be imported contain references to external classes (as you to with your webservices), that jar-file must also be part of the CLASSPATH.

  • Referencing external classes in the classes loaded into ORACLE8i

    Hi
    If I have to load a .class file into oracle8i and if it references another class XYZ.class file in the path /export/home/user what should I do to resolve during the loading. What happens if XYZ.class imports from a test.jar.
    Thanx

    Any external class references from classes loaded in ORACLE 8i must also be loaded into the database. The classes loaded into the db must be transitively closed. All external class reference must be either in the CORE Java api's (provided by Oracle) or must be loaded with the class in question.

Maybe you are looking for