I've created a Dynamic Web Project and tried to add a Web Client from a WSDL.
I'm using Eclipse Luna for Java EE and JDK 1.7.
On the final screen for adding a Web Service Client, when I click on Finish I get the following warning messages:
IWAB0182W The Sample JSP client does not support the following type: {0} org.csapi.www.schema.parlayx.cloudmovil.v1_0.NamedParameter[]
IWAB0237W The Sample JSP client does not support arrays: {0}operatorUser
IWAB0189W The Sample JSP client omitted some methods because they contained unsupported types.
And finally I get an error message:
java.lang.NullPointerException
at org.eclipse.jst.ws.internal.consumption.sampleapp.codegen.InputFileAttributeGenerator.visit(InputFileAttributeGenerator.java:57)
at org.eclipse.jst.ws.internal.consumption.codegen.RelVisitor.run(RelVisitor.java:83)
at org.eclipse.jst.ws.internal.consumption.sampleapp.codegen.InputFileTypeGenerator.visit(InputFileTypeGenerator.java:294)
at org.eclipse.jst.ws.internal.consumption.codegen.RelVisitor.run(RelVisitor.java:83)
at org.eclipse.jst.ws.internal.consumption.sampleapp.codegen.InputFileHelp2Generator.visit(InputFileHelp2Generator.java:82)
at org.eclipse.jst.ws.internal.consumption.codegen.RelVisitor.run(RelVisitor.java:83)
at org.eclipse.jst.ws.internal.consumption.sampleapp.codegen.InputFileHelp1Generator.visit(InputFileHelp1Generator.java:78)
at org.eclipse.jst.ws.internal.consumption.codegen.RelVisitor.run(RelVisitor.java:83)
at org.eclipse.jst.ws.internal.consumption.sampleapp.codegen.InputFileGenerator.visit(InputFileGenerator.java:93)
at org.eclipse.jst.ws.internal.consumption.sampleapp.command.GeneratePageCommand.execute(GeneratePageCommand.java:82)
at org.eclipse.jst.ws.internal.consumption.ui.widgets.test.wssample.GSTCGenerateCommand.generatePages(GSTCGenerateCommand.java:144)
at org.eclipse.jst.ws.internal.consumption.ui.widgets.test.wssample.GSTCGenerateCommand.execute(GSTCGenerateCommand.java:71)
at org.eclipse.jst.ws.internal.consumption.ui.widgets.test.ClientTestDelegateCommand.commandFactoryExecution(ClientTestDelegateCommand.java:126)
at org.eclipse.jst.ws.internal.consumption.ui.widgets.test.ClientTestDelegateCommand.execute(ClientTestDelegateCommand.java:99)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:419)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.visitTop(CommandFragmentEngine.java:359)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.moveForwardToNextStop(CommandFragmentEngine.java:254)
at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$6.run(SimpleCommandEngineManager.java:294)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:466)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:374)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1059)
at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager.runForwardToNextStop(SimpleCommandEngineManager.java:264)
at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.runForwardToNextStop(WizardPageManager.java:91)
at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.performFinish(WizardPageManager.java:262)
at org.eclipse.wst.command.internal.env.ui.widgets.DynamicWizard.performFinish(DynamicWizard.java:382)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:853)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:438)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
at org.eclipse.jface.window.Window.open(Window.java:808)
at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:269)
at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:290)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:343)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:159)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
The WSDL is for a web service that I will have to access through my own endpoints. I was just trying to create a test client to start building my endpoints on top of it. Will these warnings cause me any trouble to access to this web service?
Change Settings of your Eclipse :
To generate the Web service client without errors, you must make the following settings.
1. Choose Window → Preferences → Web Services.
2. Under Axis Emitter specify: Wsdl2Java.
3. Select Prefers Building Beans to Straight Arrays for Wrapped XML Array Types.
If you leave this step out, then two-dimensional arrays are created during generation for the GenericPropertyTable type.
Related
I'm using the class "org.eclipse.jetty.server.Server" in XML file to intialize it with various parameters(Please note this is an OSGi environment). However my bundle which is using the class "org.eclipse.jetty.server.Server" is not starting and throwing the following exception:
java.lang.ClassNotFoundException: org.eclipse.jetty.server.Server
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.ContextFinder.loadClass(ContextFinder.java:129)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.jetty.util.Loader.loadClass(Loader.java:92)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.nodeClass(XmlConfiguration.java:349)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:327)
I've made sure that the jetty server bundle is up and running and also I've made sure that I've given proper version in the "Imported-Packages" section of my manifest file. Please help.
If you want to use Jetty in the way that
Jetty is initialized based on XML configuration
It is used within an OSGi environment
I recommend that you should use jetty-osgi-boot bundle. You can find more information about its usage in the documentation of Jetty.
In case you want to develop a custom solution based on jetty-xml, you should check how jetty-boot does it.
Some tips:
The configuration is read from the XML file in the end of ServerInstanceWrapper.configure() function.
That is called from DefaultJettyAtJettyHomeHelper.startJettyAtJettyHome(...)
There you will find the trick that the Thread Context Classloader is overridden until the Server is configured from the XML.
ClassLoader contextCl = Thread.currentThread().getContextClassLoader();
try
{
Thread.currentThread().setContextClassLoader(JettyBootstrapActivator.class.getClassLoader());
...
Server server = ServerInstanceWrapper.configure(null, configURLs, properties);
...
return server;
}
...
finally
{
Thread.currentThread().setContextClassLoader(contextCl);
}
Please note that the links and example is from Jetty 9.2.9 as the code is a bit nicer there, but you can find the same or similar logic in the jetty-osgi-boot of your Jetty version.
It is not a good thing to play around with the Thread Context ClassLoader, but sometimes it is necessary, when code is called that use TCL. The best would be if the XMLConfiguration class of Jetty accepted a ClassLoader as a parameter.
I am new to wso2.. I have searched through articles and found that ,we can install features into carbon using OSGI Console... For eg,I want to install student management feature (Sample) in wso2 carbon,without using feature management(without UI) .
How to do this... I have the REPO in my local (Say D://p2-repo) I want to install these features in carbon using OSGI console
Steps Tried
1) Started wso2 in OSGI console (bin\wso2server.bat -DosgiConsol)
2) Then i need to add the Repo right?
3) i tried provaddrepo command
Say provaddrepo file://D:/p2-repo
My p2-repo structure is
features folder,plugins folder,content.jar,artifact.jar
But while doing this, i am getting the error like below
`osgi> provaddrepo file://C:/Users/473294nneh/Desktop/p2-repo
java.io.FileNotFoundException: \\C\Users\473294nneh\Desktop\p2-repo\artifacts.xml (The network path was not found)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:212)
at java.io.FileOutputStream.<init>(FileOutputStream.java:165)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.save(SimpleArtifactRepository.java:1187)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.save(SimpleArtifactRepository.java:1168)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.<init>(SimpleArtifactRepository.java:348)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepositoryFactory.create(SimpleArtifactRepositoryFactory.java:134)
at org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.factoryCreate(ArtifactRepositoryManager.java:61)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.doCreateRepository(AbstractRepositoryManager.java:286)
at org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.createRepository(ArtifactRepositoryManager.java:49)
at org.eclipse.equinox.internal.p2.console.ProvisioningHelper.addArtifactRepository(ProvisioningHelper.java:87)
at org.eclipse.equinox.internal.p2.console.ProvCommandProvider._provaddrepo(ProvCommandProvider.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.equinox.console.command.adapter.CommandProviderAdapter.main(CommandProviderAdapter.java:46)
at org.eclipse.equinox.console.command.adapter.CommandProviderAdapter._main(CommandProviderAdapter.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:469)
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:395)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
at org.apache.felix.gogo.shell.Console.run(Console.java:62)
at org.apache.felix.gogo.shell.Shell.console(Shell.java:203)
at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:128)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:469)
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:395)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)
at java.lang.Thread.run(Thread.java:722)`
As i told,i am new to wso2..>CAN anyone please help me to resolve this issue...
I have used this article (http://wiki.eclipse.org/Equinox_p2_Console_Users_Guide)
CAN anyone please help me to resolve this issue...Thanks in Advance
I believe that it may simply be an extra forward slash in your URI after "file:".
Try this:
osgi> provaddrepo file:/C:/Users/473294nneh/Desktop/p2-repo
I need help creating a webservice. Basically the company whom im trying to connect with has provided me with a wsdl and xsd files. But when I try to create the web service using the rad webservice widget I get the error below. please help. If you think I need to explain more just ask me dont down vote please! HELP!
ERROR:
Errors occurred during wsimport.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.ibm.ast.ws.jaxws.emitter.jdk6.jws22.command.WsImportCommand.execute(Unknown Source)
at com.ibm.ast.ws.jaxws.emitter.command.WsImportCommand.execute(Unknown Source)
at com.ibm.ast.ws.jaxws.creation.command.WsimportNonUIThreadCommand$RunCmdInNonUIThread.run(Unknown Source)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(Unknown Source)
Caused by: java.lang.InternalError: unresolved reference
at com.ibm.jtc.jax.xml.xsom.impl.parser.DelayedRef._get(Unknown Source)
at com.ibm.jtc.jax.xml.xsom.impl.parser.DelayedRef$Type.getType(Unknown Source)
at com.ibm.jtc.jax.xml.xsom.impl.ElementDecl.getType(Unknown Source)
at com.ibm.jtc.jax.xml.xsom.impl.ElementDecl.updateSubstitutabilityMap(Unknown Source)
at com.ibm.jtc.jax.xml.xsom.impl.parser.ParserContext.getResult(Unknown Source)
at com.ibm.jtc.jax.xml.xsom.parser.XSOMParser.getResult(Unknown Source)
at com.ibm.jtc.jax.tools.xjc.ModelLoader.createXSOM(Unknown Source)
at com.ibm.jtc.jax.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(Unknown Source)
at com.ibm.jtc.jax.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(Unknown Source)
at com.ibm.jtc.jax.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(Unknown Source)
at com.ibm.jtc.jax.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(Unknown Source)
at com.ibm.jtc.jax.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(Unknown Source)
at com.ibm.jtc.jax.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(Unknown Source)
at com.ibm.jtc.jax.tools.ws.wscompile.WsimportTool.run(Unknown Source)
at com.ibm.ast.ws.jaxws.emitter.jdk6.jws22.command.WsimportToolWrapper.run(Unknown Source)
... 8 more
Have you tried using Java JAX-WS api for webservice skeleton generation insteed of IBM solution you are using right now? There is even ant task for such generations, and as far as i know i works quite well (I have used such solutions in my previous workplace). Here you have
Oracles documentation describing how to use WSIMPORT tools
or blog post showing simple usage of WSIMPORT
For your needs, I'd look at using Maven (since you're using vanilla JAX-WS) with Metro: http://www.jroller.com/gmazza/entry/web_service_tutorial. Try to stay out of the IDE when creating the JAX-WS artifacts, you'll find most of the headaches are with the IDE rather than the wsimport tool.
I want to send Push notification using Coldfusion. I couldn't find much help on google. I could find only one article that discusses this topic. But unfortunately I am getting exceptions while following that method. As that method uses a JAR file, I am not able to debug the exception. Even I cannot see the exceptions.
I just want to know is there a simple way to send Push Notifications? Like there is one for Android. In Android you just have to send an http request and you're done. But I can see things are so complicated in case of Apple.
But I am sure that someone would have definitely achieved this. Can anyone please help me on this?
Finally from suggestions, I implemented onError in my Application.cfc and got the following error:
Could not initialize class com.rsa.jcm.c.br
ava.lang.NoClassDefFoundError: Could not initialize class com.rsa.jcm.c.br at
com.rsa.jcm.c.ch.g(Unknown Source) at com.rsa.jcm.c.ch.h(Unknown Source) at
com.rsa.jcm.c.ch.f(Unknown Source) at com.rsa.jcm.c.jt.newSymmetricCipher(Unknown Source) at
com.rsa.cryptoj.o.mu.newSymmetricCipher(Unknown Source) at com.rsa.cryptoj.o.an.d(Unknown Source) at com.rsa.cryptoj.o.li.<init>(Unknown Source) at com.rsa.cryptoj.o.hh.<init>(Unknown Source) at com.rsa.cryptoj.o.gu.<init>(Unknown Source) at com.rsa.cryptoj.o.cc$240.a(Unknown Source) at com.rsa.cryptoj.o.da.a(Unknown Source) at com.rsa.cryptoj.o.da.a(Unknown Source) at
com.rsa.cryptoj.o.gx.b(Unknown Source) at com.rsa.cryptoj.o.gx.a(Unknown Source) at
com.rsa.cryptoj.o.gx.a(Unknown Source) at com.rsa.cryptoj.o.gx.a(Unknown Source) at
com.rsa.cryptoj.o.gx.a(Unknown Source) at com.rsa.cryptoj.o.gx.engineLoad(Unknown Source) at java.security.KeyStore.load(KeyStore.java:1185) at
com.notnoop.apns.internal.Utilities.newSSLContext(Utilities.java:87) at
com.notnoop.apns.ApnsServiceBuilder.withCert(ApnsServiceBuilder.java:139) at
com.notnoop.apns.ApnsServiceBuilder.withCert(ApnsServiceBuilder.java:114) 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:597) at
coldfusion.runtime.StructBean.invoke(StructBean.java:508) at
coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2465) at
Edit:
CF Code:
<cfset APNSService = createObject( "java", "com.notnoop.apns.APNS" ).newService()
.withCert("E:\WEB\mysite.com\login\JAR\DevPushCertificates.p12", "")
.withSandboxDestination()
.build() />
<!--- I get the exception here and the code bellow is not executed --->
<cfset payload = createObject( "java", "com.notnoop.apns.APNS" ).newPayload()
.badge(3)
.alertBody("Hello, world.")
.sound("PushNotification.caf")
.build()/>
<cfset APNSService.push('#deviceToken#', payload) />
I am using this JAR file: https://github.com/notnoop/java-apns/downloads
I got it from this blog: http://www.raymondcamden.com/index.cfm/2010/9/13/Guest-Post-Apple-Push-Notifications-From-ColdFusion-in-Ten-Minutes-or-Less#c843ED990-C791-2A3E-1E9FD9B78ECADFF7
If you post that question at several location please add a link to the other copies of the questions.
Have a look at my answer to your java-apns issue on github.
(Updated with response from link)
This looks like a problem with ColdFusion. In the above stack dump you
see:
com.notnoop.apns.internal.Utilities.newSSLContext(Utilities.java:87)
calls into
java.security.KeyStore.load(KeyStore.java:1185)
which in turn fails after some ruminations in the com.rsa.cryptoj
library. So obviously something doesn't work with accessing the java
key store in ColdFusion.
Googling for one of the classes in the error yields some
interesting results:
Diagnosing a CFHTTP issue - peer not authenticated which
links in turn to
OpenID And ColdFusion which lists some
things you can try (disable Crypto-J in Cold Fusion)
As my server is on shared hosting. So, for every single change, I had to submit a ticket to the hosting site. It was causing headache. Finally, I had the php server setup placed the push notification code (easily available in PHP on google) on PHP server. Then I called that php file from the Coldfusion code. This worked for me.
I have two webservices A and B. A needs to invoke one of the webMethods in B.
How can I achieve this?
I am using maven's wsimport plugin to build A. This is to generate the necessary stubs for B and include them as part of the Webservice A.
However, when I try to Invoke the webmethod o f B, I get an Exception. Can anyone please tell me what is going on?
Below Is the code and the exception trace:
Code:
BBeanService bbs = new BBeanService();
BBean bb = bbs.getBBeanPort();
bb.invokeWebService(); // this is throwing exception
This is the exception trace:
java.lang.NullPointerException at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:188) at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:116) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:119) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89) at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118) at $Proxy175.getCase(Unknown Source) at com.kebok.ais.billing.server.ejb.impl.ChargeManagerBean.generateBillDetails(ChargeManagerBean.java:144) 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:597) at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1011) at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:175) at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2920) at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4011) at com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:190) at $Proxy173.generateBillDetails(Unknown Source) 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:597) at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java:78) at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(EjbInvokerImpl.java:82) at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146) at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257) at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436) at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106) at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:147) at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436) at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106) at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java:317) at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:222) at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:133) at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436) at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135) at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113) at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87) at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:228) at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:157) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214) at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) Caused by: javax.xml.ws.WebServiceException: java.lang.NullPointerException at com.sun.enterprise.security.jmac.config.PipeHelper.makeFaultResponse(PipeHelper.java:328) at com.sun.enterprise.security.jmac.config.PipeHelper.getFaultResponse(PipeHelper.java:366) at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:227) at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:133) at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436) at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135) at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113) at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87) at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:228) at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:157) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.
Me too, I had got the same probleme but I have solved it like this:
If you use NetBeans :
Create a project : web --> webapplication --> etc
you should create a client of your web service that you want to call.
The methode is : right click your project---> webservice client.
You should give the url of your WSDL and Netbeans will parse this WSDL and create the client.
Create your second web service (the web service that will call the first one ) in the same package. Juste right click your project ---> webservice.
This part is the most important for your probleme
Please create a simple standard Java class in your project but with another package name.
Create a default constructor (optional but good)
Outside your default constructor, create a function that you give the name TestService(this is a simple exemple of name)
Inside your function, right click and choose : Insert code ---> call web service operation.
If any think is OK, you must see the service coming from the other web service that you want call its operations.(This, because of the client that you had created in step 2)
Choose the operation that you want to call.
In your webservice, you can now call your TestService operation as a standard Java operation (instanciate your class, call the operation using the "." notation)
That is the all you need.
Please, keep me informing about your progress...
If you have any other problem about this, we can share informations until you get success... ok?
I think that the best way is to use Netbeans if you want to work with webservices.
Courage and sorry for my english....
I am a frensh speeker.
Ok, I finally got it working. All I had to do was annonate the method I am calling (In this case invokeService() in WebService BB with "#TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)" and it all works without a hitch. I am not quite sure the reason behind this. Anyone?