Getting started with a web service client

I am trying to figure out how to create a web service client using NetBeans 6. I started with a class library for testing in Fitnesse. I've been using tutorials and Googling around but now I am stuck. I have added the JAX-RPC library; I am able to add a web service client to the project using the IDE; and I can view all of the objects and methods under "Web Service References" and compile the code; however, at runtime I get the error:
java.lang.NoClassDefFoundError: javax/xml/rpc/Service
     at java.lang.ClassLoader.defineClass1(Native Method) ... etc.
What am I missing?
P.S., when I try to test any web service in the IDE I get an error like this:
InvocationTargetException org.netbeans.modules.websvc.registry.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:540) org.netbeans.modules.websvc.registry.ui.TestWebServiceMethodDlg.invokeMethod(TestWebServiceMethodDlg.java:466) org.netbeans.modules.websvc.registry.ui.TestWebServiceMethodDlg.access$500(TestWebServiceMethodDlg.java:92) org.netbeans.modules.websvc.registry.ui.TestWebServiceMethodDlg$3.run(TestWebServiceMethodDlg.java:409) org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986) Next Exception Layer null sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.netbeans.modules.websvc.registry.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:534) org.netbeans.modules.websvc.registry.ui.TestWebServiceMethodDlg.invokeMethod(TestWebServiceMethodDlg.java:466) org.netbeans.modules.websvc.registry.ui.TestWebServiceMethodDlg.access$500(TestWebServiceMethodDlg.java:92) org.netbeans.modules.websvc.registry.ui.TestWebServiceMethodDlg$3.run(TestWebServiceMethodDlg.java:409) org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986) Next Exception Layer Could not initialize class com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) java.lang.reflect.Constructor.newInstance(Constructor.java:513) java.lang.Class.newInstance0(Class.java:355) java.lang.Class.newInstance(Class.java:308) javax.xml.soap.FactoryFinder.newInstance(FactoryFinder.java:38) javax.xml.soap.FactoryFinder.find(FactoryFinder.java:165) javax.xml.soap.SAAJMetaFactory.getInstance(SAAJMetaFactory.java:61) javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:127) javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:93) com.sun.xml.rpc.soap.message.SOAPMessageContext.getMessageFactory(SOAPMessageContext.java:200) com.sun.xml.rpc.soap.message.SOAPMessageContext.createMessage(SOAPMessageContext.java:131) com.sun.xml.rpc.client.StreamingSenderState. (StreamingSenderState.java:30) com.sun.xml.rpc.client.StubBase._start(StubBase.java:92) webservice.CountCheatServiceSoap_Stub.letterSolutionsMin(CountCheatServiceSoap_Stub.java:54) webservice.CountCheatServiceClient.countcheatservicesoapLetterSolutionsMin(CountCheatServiceClient.java:26) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.netbeans.modules.websvc.registry.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:534) org.netbeans.modules.websvc.registry.ui.TestWebServiceMethodDlg.invokeMethod(TestWebServiceMethodDlg.java:466) org.netbeans.modules.websvc.registry.ui.TestWebServiceMethodDlg.access$500(TestWebServiceMethodDlg.java:92) org.netbeans.modules.websvc.registry.ui.TestWebServiceMethodDlg$3.run(TestWebServiceMethodDlg.java:409) org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Edited by: pjpark on Dec 26, 2007 1:33 PM

I was able to get the web service client to work in Windows XP by following the same steps I was using in Windows 2003 x64. I did not need to add anything to the Class Path in XP to run the test application and execute a web service method; however, NetBeans would not give me the option to test the web method from the IDE.
I will try re-installing java and netbeans on the 64 bit server and see if that helps.

Similar Messages

  • Issue with creating Web Service Client using Oracle JDeveloper

    Hi All,
    I am trying to create a Web Service Client using Oracle JDeveloper. I set the Project compiler property to JRE 1.4
    When I run the web service client, it throws me bunch of errors saying:
    'Error(32,2): annotations are not supported in -source 1.4'
    I am wondering why JDeveloper is using annotations even after I set the compiler property to 1.4
    I am following this link to create the webservice client:
    http://www.oracle.com/technetwork/developer-tools/forms/webservices-forms-11g-094111.html
    Any help in this regard would be greatly appreciated.
    Thanks,
    Scott.

    Dear Shay,
    Thanks for your prompt response.
    You are right. JDeveloper 11g uses JDK 6 style annotations for the clients it creates. But you can change the JRE Version used at compile time by following these steps:
    1. In the Applications Navigator, right-click the Project Nanem node and select Project Properties... from the context menu.
    2. Select the Compiler node and check the Source Files and Generated Class Files dropdown lists. You may change these versions depending on the version of the JRE you are using with Forms to ensure that the compiled
    classes from JDeveloper can be read by the JRE used by Form.
    So I selected JDK version 1.4 there.
    Sorry that I did not mention that we are using Oracle Forms 10g. That is the reason I selected JDK 1.4
    Thank you.
    Scott.

  • How to disable "getting started with Firefox" web page when starting Foxfire?

    Every time I open Firefox I get the additional web page "getting started with Firefox" and do not know how to disable it. Can you help?

    The page may be set as an additional home page, the following link shows how to check and set your home pages - https://support.mozilla.com/kb/How+to+set+the+home+page

  • How to Install, Configure and getting started with Hyperion Web Analyzer9

    i have installed both
    Hyperion Reporting and Analysis - System 9 Services Release 9.3.1 Microsoft Windows x86 Installer.
    Hyperion Reporting and Analysis - System 9 UI Services Release 9.3.1 Microsoft Windows x86 Installer
    Now tell me step by step on how to configure and how start Web analyzer
    I dont know how to start server/services. (Any Web server required?)
    Getting started would be more helpful.
    Need help ASAP.
    thanks,
    Ram

    Hi,
    First of all have you installed Shared Services as you will need that as that foundation of the installation.
    You will also need to install other components such as essbase if you intend to use it with web analysis.
    If you have done that, then you will first need a repository to hold Reporting and Analysis information.
    Afte start up the configuration utility and select the Reporting & analysis elements and go through the steps entering
    details such as shared services connection, repository information.
    It should install the components as a service.
    You should really read the installation document :- http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/hs_windows_install.pdf
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How do I get Started with Dynamic Web Pages?

    I am presently following Janine Warner's Dreamweaver CS3  video series.  I noted that the Advanced part of this tutorial series focuses on Dynamic Web Pages, but only uses Cold Fusion.  From what I can gather, CF costs around $1000, while PHP is free!  My question is really this: in going from static to dynamic web design I'M A COMPLETE NEWBIE, so what do I need?   I am doing some planning here -- I know it won't happen overnight.
    (BTW:  I was surprised to discover that CF is NOT included in my CS3 Master Collection).  It might appear then that support for PHP is better than for CF?
    Apparently, I need a server -- well, OK I have PCs to spare.  Fast internet, I also have: Comcast standard -- 12MP
    Now, I think I also need Apache -- which apparently runs on the server and does something.
    So then I DL PHP, figure out how it works, and it will integrate with DW CS3 in some way.
    Now, what have I missed?  Is there some really basic, first-time-with-using-a-server place or tut I should go to or read?  Before you ask: No, I'm doing all this myself on a shoestring budget.
    Are there expensive hosting fees for dynamic web sites or other items I will run into?  Can I just use a PC over my Comcast cable as the server run from my home?  (Really high traffic is not anticipated)
    All recommendations appreciated, thanks.
    Thom

    Many of these questions have already been answered in your thread in the Dreamweaver General Discussion forum, so I'll just stick to a few basics.
    You need a server whichever server-side technology you choose, but "server" is not a physical machine, but a piece of software that you install on your development computer. You'll find details of how to install a PHP environment in the following article: http://www.adobe.com/devnet/dreamweaver/articles/setting_up_php.html.
    Similar instructions are available for setting up a ColdFusion server at http://www.adobe.com/devnet/dreamweaver/articles/setting_up_coldfusion.html. The article is for ColdFusion 8, but ColdFusion 9 is installed in exactly the same way.
    Hosting for PHP/MySQL is plentiful and relatively cheap. However, make sure the hosting company offers a minimum of PHP 5.2 and MySQL 5.1. Hosting for CF is harder to find and tends to be a bit more expensive, but not prohibitively so.

  • Web Service Client Generation on 7.10 SP3 - No WSDL URL is specified....

    We have a mysterious problem here.
    In out ABAP system we had a WebService created. With "New - Web Service Client" we created a web service client on the java side for that one and we were able to invoke it.
    We had to recreate this Web service due to wrong naming conventions. And now the problem starts.
    In the Main service class we had before something generated by NWDS:
    private static java.net.URL SERVICES_SERVICE_WSDL_LOCATION = null;
    static {
        java.net.URL url = null;
        try {
              java.net.URL tmpUrl = Thread.currentThread().getContextClassLoader().getResource("wsdl/com/sap/document/sap/soap/functions/mc_style/sap/bc/srt/wsdl/bndg_001279D063121DECA58AC5F7200DC55D/wsdl11/allinone/ws_policy/document/rootwsdl_SERVICES.wsdl");
              url = new java.net.URL(tmpUrl.getProtocol(), tmpUrl.getHost(), tmpUrl.getPort(), tmpUrl.getFile());
        } catch (java.net.MalformedURLException e) {
          e.printStackTrace();
        SERVICES_SERVICE_WSDL_LOCATION = url;
    After the new creation with the new Web Service this static initializer is gone an we see:
    private final static java.net.URL SERVICE_WSDL_LOCATION = null;
    This code is ridiculous, to make something static final and set it to Null. And as expected at runtime it results in WebServioceException telling us:
    No WSDL URL is specified for service [class com.sap.document.sap.soap.functions.mc_style.Service] on service creation.
    Anyone knows what is going wrong here??
    Best regards,
    Frank

    Same problem here.
    From Netweaver dev studio, I'm generating a deployable proxy for a Session Bean that is supposed to access a webservice but I keep getting the exception:
    "Caused by: javax.xml.ws.WebServiceException: No WSDL URL is specified for service [class eu.socrades.sap.ServiceMonitorBeanTESTService] on service creation.
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.<init>(SAPServiceDelegate.java:108)
    at com.sap.engine.services.webservices.espbase.client.jaxws.cts.CTSProvider.createDelegate(CTSProvider.java:170)
    at com.sap.engine.services.webservices.espbase.client.jaxws.cts.CTSProvider.createServiceDelegate(CTSProvider.java:151)
    at javax.xml.ws.Service.<init>(Service.java:57)
    at eu.socrades.sap.ServiceMonitorBeanTESTService.<init>(ServiceMonitorBeanTESTService.java:14)"
    I'm injecting the reference to the service with:
    @WebServiceRef(wsdlLocation = "rootwsdl_ServiceMonitorBeanTESTService.wsdl")
    private ServiceMonitorBeanTESTService service;
    I tried changing the location to a URL (where the wsdl can be downloaded from) or to "META-INF/wsdl/eu/socrades/sap/rootwsdl_ServiceMonitorBeanTESTService/rootwsdl_ServiceMonitorBeanTESTService.wsdl" but that did not help.
    Any clue?
    Thanks a lot,
    Dom

  • Problems running Application with Web Service Client

    Im having some problems maybe related to some classpath details?
    I am running a Web Service another computer which works fine. I have also made an application using Sun ONE Studio 1 consisting of a Web Service Client etc. and GUI which uses the Client to get data from the Web Service. This works fine as long as I use Sun ONE Studio to execute the application, but now I have packaged the application to a .jar file and have encountered problems:
    When running the application from the .jar file I get the exception:
    java.lang.NoClassDefFoundError: com/sun/xml/rpc/client/BasicService
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at util.servicelocator.ServiceLocator.getServant(ServiceLocator.java:68)
    at lagerApp.eHandelLager.jRegisterBrukerListeActionPerformed(eHandelLager.java:784)
    at lagerApp.eHandelLager.access$400(eHandelLager.java:20)
    at lagerApp.eHandelLager$5.actionPerformed(eHandelLager.java:277)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:289)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1113)
    at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(BasicMenuItemUI.java:943)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
    at java.awt.Component.processMouseEvent(Component.java:5100)
    at java.awt.Component.processEvent(Component.java:4897)
    at java.awt.Container.processEvent(Container.java:1569)
    at java.awt.Component.dispatchEventImpl(Component.java:3615)
    at java.awt.Container.dispatchEventImpl(Container.java:1627)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
    at java.awt.Container.dispatchEventImpl(Container.java:1613)
    at java.awt.Window.dispatchEventImpl(Window.java:1606)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    I have searched the forum and found simular topics which are resolved by adding some lines to the classpath.
    How do I set the classpath? Do i have to use the classpath parameter from command window? How can I know which classpaths to include (libraries)..
    Any help would be nice.. : )

    Thank you for the reply..
    But im still geting the same error. I have tried to include all the libraries in JWSDP pack but still.. I have managed to narrow down the place where the error occures.. It actually happens when I try to get the WebService Client Servant which is located in the package LSC:
    ---> LSC.LWServiceGenClient.LWS_Impl service = new LSC.LWServiceGenClient.LWS_Impl();
    LSC.LWServiceGenClient.LWSServantInterface lagerServiceServant = LSC.LWServiceGenClient.LWSServantInterface_Stub)service.getLWSServantInterfacePort();
    return lagerServiceServant;
    Could something be wrong with the way I package the Jar? I'm using Sun One Studio and have tried including the 5 packages the application consists of; I have tried including just the files; moving the main class to <root>.. Still same problem..
    Or could there be some different fundemental thingy I have forgotten ??
    thanks
    Aqoi

  • How to create Web Service Client from wsdl with digital signature?

    Please, help me to create Web Service Client from wsdl with digital signature. I know create Web Service client from wsdl file and I know how to add digital signature to XML with jwsdp, but I don't know how to do it together.
    Thanks.

    I'm handling security wit JAX-WS handler. So I insert "manually" ws-security tag and I encrypt (and sign) message parts.
    On client side, all works fine, but on server side I obtain:
    ---Server Inbound SOAP message---|#]
    Decrypting message and rebuilding Valuees... |#]
    Starting decrypt|#]
    . dectypted.!
    --found following string: <ns1:addiziona><num1>80</num1><num2>22222</num2></ns1:addiziona>|#]
    ...MESSAGE Restored.|#]
    <?xml version="1.0" ?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ns1="http://calculator.me.org/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><soapenv:Body><ns1:addiziona><num1>80</num1><num2>22222</num2></ns1:addiziona></soapenv:Body></soapenv:Envelope>|#]
    Error in decoding SOAP Message
    Error in decoding SOAP Message
            at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:89)
            at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.toMessageInfo(SOAPMessageDispatcher.java:187)
            at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(SOAPMessageDispatcher.java:571)
            at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:145)
            at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
            at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:160)
            at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:89)
            at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:178)
            at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:109)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:100)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
            at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Caused by: javax.xml.ws.soap.SOAPFaultException: Cannot find the dispatch method
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.raiseFault(SOAPDecoder.java:674)
            at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.decodeDispatchMethod(SOAPXMLDecoder.java:152)
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBodyContent(SOAPDecoder.java:337)
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBody(SOAPDecoder.java:327)
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeEnvelope(SOAPDecoder.java:250)
            at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:81)
            ... 29 more
    |#]
    --->handleFault O_o<---|#]If you have any idea for solving my problem, then I can post my simple example :(
    Bye!

  • Problems with Web services client

    Hi all,
    I'm trying to build a Web Service Client with netbeans 6.5. I add the Web Service Refefrences by clicking right on my project/new/Web Service Client and giving it the url of the wsdl or the wsdl file itself. All work well, I use the web service without problems but then, after several successful try I don't know why, I get this kind of exception:
    Exception in thread "main" javax.xml.ws.WebServiceException: class net.stuff.webservice.webservices.Upload do not have a property of the name {www.stuff.net/WebService/WebServices}uploadReq
    I precise I don't modify the code that call the web service.
    To make it work again, I have to Clean & Build several time the project and/or Refresh tjh WebClient Reference, gain, without modifying the code.
    The Web Service producer runs on .net and doesn't seems to "move".
    Have you ever see this issue?
    Maybe this could help: I'm using JDK 5 with JAXB-WB
    Thanks

    Hello Eric:
    I have the same problem... but he Clean & Build thing didn't work :(...
    To make it work I call the Web Service from a java application and include the java application's jar in the libraries of the java web application.

  • Web service client needs to share data with a SOAP Message Handler

    I have a web service client that is built using WebLogic 10 clientgen. I also have a Soap Message Handler configured that will create the required Soap Headers for the web service call.
    Creating these Soap Headers works great as long as the header data is static but the problem comes up when I need to place some dynamic data in these headers. The web service client has this data and somehow needs to pass it to the Soap Message Handler. It looks like I need to somehow have the client place this data in the MessageContext before the call so the data can be accessed by the Soap Message Handler.
    How do I get access to the MessageContext from the client or is there a better way to do this?
    Thanks in advance for any help you can give.

    You may want to check the response to this previous post to see if it yields any ideas for you:
    Not able to Pass header info to Microsoft MapPoint WebService using WLS10

  • Standalone Web Service clients in NetBeans with WSIT security

    I'm having a problem create a secure app with NetBeans, any help would be appreciated, here's what I did:
    Following the WSIT tutorial (http://java.sun.com/webservices/reference/tutorials/wsit/doc/index.html) I was able to create a Web Service with (for example) Username Authentication with Symmetric Key. I select the keystore as being the either the default development settings (I installed V3 certificates previously) or what I imagine are the same as them: keystore from domain1, alias xws-server and a username and password that I've created in the glassfish admin console. All good so far.
    I then create a new web app servlet client, configuring the Web Service client with the corresponding cacerts keystore, alias xws-security-server from domain1 and the correct username and password. Deploy that and bingo, it works.
    Try that again with a standalone Java client configuring the client reference in exactly the same way and using:
            try { // Call Web Service Operation
                uk.ac.ox.sddag.glassfish.server.SecureWSService service = new uk.ac.ox.sddag.glassfish.server.SecureWSService();
                uk.ac.ox.sddag.glassfish.server.SecureWS port = service.getSecureWSPort();
                int x = 1200;
                int y = 36;
                int result = port.add(x, y);
                System.out.println("Result = "+result);
            } catch (Exception ex) {
                System.out.println("Exception:");
                ex.printStackTrace();
            }but this time, it doesn't work:
    Exception:
    javax.xml.ws.soap.SOAPFaultException: ERROR: No security header found in the message
            at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:188)
            at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:130)
            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 $Proxy29.add(Unknown Source)
            at securestandaloneclient.Main.main(Main.java:26)
    Caused by: javax.xml.ws.soap.SOAPFaultException: ERROR: No security header found in the message
            at com.sun.xml.ws.security.opt.impl.util.SOAPUtil.getSOAPFaultException(SOAPUtil.java:171)
            at com.sun.xml.wss.provider.wsit.WSITServerAuthContext.validateRequest(WSITServerAuthContext.java:277)
            at com.sun.xml.wss.provider.wsit.WSITServerAuthContext.validateRequest(WSITServerAuthContext.java:179)
            at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:168)
            at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
            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.JAXWSServlet.doPost(JAXWSServlet.java:176)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
            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.connector.grizzly.TaskBase.run(TaskBase.java:265)
            at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)I'm assuming that it's something to do with the WSDL being used to create the request, here's what the source view for the web service reference says:
    <?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.1-hudson-417-SNAPSHOT. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.1-hudson-417-SNAPSHOT. --><definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://server.glassfish.sddag.ox.ac.uk/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://server.glassfish.sddag.ox.ac.uk/" name="SecureWSService">
    <ns1:Policy xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/09/policy" wsu:Id="SecureWSPortBindingPolicy">
    <ns1:ExactlyOne>
    <ns1:All>
    <ns4:SignedSupportingTokens xmlns:ns4="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
    <ns1:Policy>
    <ns1:ExactlyOne>
    <ns1:All>
    <ns4:UsernameToken ns4:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
    <ns1:Policy>
    <ns1:ExactlyOne>
    <ns1:All>
    <ns4:WssUsernameToken10></ns4:WssUsernameToken10>
    </ns1:All>
    </ns1:ExactlyOne>
    </ns1:Policy>
    </ns4:UsernameToken>
    </ns1:All>
    </ns1:ExactlyOne>
    </ns1:Policy>
    </ns4:SignedSupportingTokens>
    <ns5:SymmetricBinding xmlns:ns5="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
    <ns1:Policy>
    <ns1:ExactlyOne>
    <ns1:All>
    <ns5:AlgorithmSuite>
    <ns1:Policy>
    <ns1:ExactlyOne>
    <ns1:All>
    <ns5:Basic128></ns5:Basic128>
    </ns1:All>
    </ns1:ExactlyOne>
    </ns1:Policy>
    </ns5:AlgorithmSuite>
    <ns5:IncludeTimestamp></ns5:IncludeTimestamp>
    <ns5:Layout>
    <ns1:Policy>
    <ns1:ExactlyOne>
    <ns1:All>
    <ns5:Strict></ns5:Strict>
    </ns1:All>
    </ns1:ExactlyOne>
    </ns1:Policy>
    </ns5:Layout>
    <ns5:OnlySignEntireHeadersAndBody></ns5:OnlySignEntireHeadersAndBody>
    <ns5:ProtectionToken>
    <ns1:Policy>
    <ns1:ExactlyOne>
    <ns1:All>
    <ns5:X509Token ns5:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
    <ns1:Policy>
    <ns1:ExactlyOne>
    <ns1:All>
    <ns5:RequireIssuerSerialReference></ns5:RequireIssuerSerialReference>
    <ns5:WssX509V3Token10></ns5:WssX509V3Token10>
    </ns1:All>
    </ns1:ExactlyOne>
    </ns1:Policy>
    </ns5:X509Token>
    </ns1:All>
    </ns1:ExactlyOne>
    </ns1:Policy>
    </ns5:ProtectionToken>
    </ns1:All>
    </ns1:ExactlyOne>
    </ns1:Policy>
    </ns5:SymmetricBinding>
    <ns6:Wss11 xmlns:ns6="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
    <ns1:Policy>
    <ns1:ExactlyOne>
    <ns1:All>
    <ns6:MustSupportRefEncryptedKey></ns6:MustSupportRefEncryptedKey>
    <ns6:MustSupportRefIssuerSerial></ns6:MustSupportRefIssuerSerial>
    <ns6:MustSupportRefThumbprint></ns6:MustSupportRefThumbprint>
    </ns1:All>
    </ns1:ExactlyOne>
    </ns1:Policy>
    </ns6:Wss11>
    <ns7:UsingAddressing xmlns:ns7="http://www.w3.org/2006/05/addressing/wsdl" ns1:Optional="true"></ns7:UsingAddressing>
    </ns1:All>
    </ns1:ExactlyOne>
    </ns1:Policy>
    <ns8:Policy xmlns:ns8="http://schemas.xmlsoap.org/ws/2004/09/policy" wsu:Id="SecureWSPortBinding_add_Input_Policy">
    <ns8:ExactlyOne>
    <ns8:All>
    <ns9:EncryptedParts xmlns:ns9="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
    <ns9:Body></ns9:Body>
    </ns9:EncryptedParts>
    <ns10:SignedParts xmlns:ns10="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
    <ns10:Body></ns10:Body>
    <ns10:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"></ns10:Header>
    <ns10:Header Namespace="http://www.w3.org/2005/08/addressing" Name="To"></ns10:Header>
    <ns10:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"></ns10:Header>
    <ns10:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"></ns10:Header>
    <ns10:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"></ns10:Header>
    <ns10:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"></ns10:Header>
    <ns10:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"></ns10:Header>
    <ns10:Header Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" Name="AckRequested"></ns10:Header>
    <ns10:Header Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" Name="CreateSequence"></ns10:Header>
    <ns10:Header Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" Name="Sequence"></ns10:Header>
    <ns10:Header Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" Name="SequenceAcknowledgement"></ns10:Header>
    </ns10:SignedParts>
    </ns8:All>
    </ns8:ExactlyOne>
    </ns8:Policy>
    <ns11:Policy xmlns:ns11="http://schemas.xmlsoap.org/ws/2004/09/policy" wsu:Id="SecureWSPortBinding_add_Output_Policy">
    <ns11:ExactlyOne>
    <ns11:All>
    <ns12:EncryptedParts xmlns:ns12="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
    <ns12:Body></ns12:Body>
    </ns12:EncryptedParts>
    <ns13:SignedParts xmlns:ns13="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
    <ns13:Body></ns13:Body>
    <ns13:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"></ns13:Header>
    <ns13:Header Namespace="http://www.w3.org/2005/08/addressing" Name="To"></ns13:Header>
    <ns13:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"></ns13:Header>
    <ns13:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"></ns13:Header>
    <ns13:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"></ns13:Header>
    <ns13:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"></ns13:Header>
    <ns13:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"></ns13:Header>
    <ns13:Header Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" Name="AckRequested"></ns13:Header>
    <ns13:Header Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" Name="CreateSequence"></ns13:Header>
    <ns13:Header Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" Name="Sequence"></ns13:Header>
    <ns13:Header Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" Name="SequenceAcknowledgement"></ns13:Header>
    </ns13:SignedParts>
    </ns11:All>
    </ns11:ExactlyOne>
    </ns11:Policy>
    <types>
    <xsd:schema>
    <xsd:import namespace="http://server.glassfish.sddag.ox.ac.uk/" schemaLocation="http://localhost:8080/SecureApplication/SecureWSService?xsd=1"></xsd:import>
    </xsd:schema>
    </types>
    <message name="add">
    <part name="parameters" element="tns:add"></part>
    </message>
    <message name="addResponse">
    <part name="parameters" element="tns:addResponse"></part>
    </message>
    <portType name="SecureWS">
    <operation name="add">
    <input message="tns:add"></input>
    <output message="tns:addResponse"></output>
    </operation>
    </portType>
    <binding name="SecureWSPortBinding" type="tns:SecureWS">
    <ns14:PolicyReference xmlns:ns14="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#SecureWSPortBindingPolicy"></ns14:PolicyReference>
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding>
    <operation name="add">
    <soap:operation soapAction="add"></soap:operation>
    <input>
    <ns15:PolicyReference xmlns:ns15="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#SecureWSPortBinding_add_Input_Policy"></ns15:PolicyReference>
    <soap:body use="literal"></soap:body>
    </input>
    <output>
    <ns16:PolicyReference xmlns:ns16="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#SecureWSPortBinding_add_Output_Policy"></ns16:PolicyReference>
    <soap:body use="literal"></soap:body>
    </output>
    </operation>
    </binding>
    <service name="SecureWSService">
    <port name="SecureWSPort" binding="tns:SecureWSPortBinding">
    <soap:address location="http://localhost:8080/SecureApplication/SecureWSService"></soap:address>
    </port>
    </service>
    </definitions>The contents of META-INF (The WSDL):
    <?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.1-hudson-417-SNAPSHOT. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.1-hudson-417-SNAPSHOT. --><definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://server.glassfish.sddag.ox.ac.uk/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://server.glassfish.sddag.ox.ac.uk/" name="SecureWSService" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:sc="http://schemas.sun.com/2006/03/wss/client" xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy">
    <types>
    <xsd:schema>
    <xsd:import namespace="http://server.glassfish.sddag.ox.ac.uk/" schemaLocation="http://localhost:8080/SecureApplication/SecureWSService?xsd=1"></xsd:import>
    </xsd:schema>
    </types>
    <message name="add">
    <part name="parameters" element="tns:add"></part>
    </message>
    <message name="addResponse">
    <part name="parameters" element="tns:addResponse"></part>
    </message>
    <portType name="SecureWS">
    <operation name="add">
    <input message="tns:add"></input>
    <output message="tns:addResponse"></output>
    </operation>
    </portType>
    <binding name="SecureWSPortBinding" type="tns:SecureWS">
        <wsp:PolicyReference URI="#SecureWSPortBindingPolicy"/>
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding>
    <operation name="add">
    <soap:operation soapAction="add"></soap:operation>
    <input>
    <soap:body use="literal"></soap:body>
    </input>
    <output>
    <soap:body use="literal"></soap:body>
    </output>
    </operation>
    </binding>
    <service name="SecureWSService">
    <port name="SecureWSPort" binding="tns:SecureWSPortBinding">
    <soap:address location="http://localhost:8080/SecureApplication/SecureWSService"></soap:address>
    </port>
    </service>
        <wsp:Policy wsu:Id="SecureWSPortBindingPolicy">
            <wsp:ExactlyOne>
                <wsp:All>
                    <sc:CallbackHandlerConfiguration wspp:visibility="private">
                        <sc:CallbackHandler default="example1" name="usernameHandler"/>
                        <sc:CallbackHandler default="password1" name="passwordHandler"/>
                    </sc:CallbackHandlerConfiguration>
                    <sc:TrustStore wspp:visibility="private" type="JKS" storepass="changeit" location="/Applications/NetBeans/glassfish-v2ur2/domains/domain1/config/cacerts.jks" peeralias="xws-security-server"/>
                </wsp:All>
            </wsp:ExactlyOne>
        </wsp:Policy>
    </definitions>The wsit-client:
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="mainclientconfig"
    >
        <import location="SecureWSService.xml" namespace="http://server.glassfish.sddag.ox.ac.uk/"/>
    </definitions>

    This bug still isn't fixed.
    Thank you, adding Glassfish's webservices-rt.jar does fix it.

  • Creating web service client with WSDL in NetBeans

    NetBeans: 5.5
    Java: 1.6
    WSDL: http://jira.atlassian.com/rpc/soap/jirasoapservice-v2?wsdl
    Using netbeans, I can't seem to successfully generate the stubs for a client based on the WSDL file above.
    SoapUI ( www.soapui.org ) has no problems receiving and creating the client stubs using the same WSDL file.
    The error I'm getting in the dialog is "Illegal attempt to exit early".
    Further details from the output window reads as follows:
    -=-
    warning: src-resolve: Cannot resolve the name 'impl:ArrayOf_tns2_RemoteEntity' to a(n) 'type definition' component.
    line 0 of file:/C:/Documents%20and%20Settings/Alexander%20Trauzzi/JavaApplication2/xml-resources/web-service-references/jirasoapservice-v2/wsdl/jira.atlassian.com/rpc/soap/jirasoapservice-v2.wsdl#types?schema2
    warning: src-resolve: Cannot resolve the name 'soapenc:Array' to a(n) 'type definition' component.
    line 0 of file:/C:/Documents%20and%20Settings/Alexander%20Trauzzi/JavaApplication2/xml-resources/web-service-references/jirasoapservice-v2/wsdl/jira.atlassian.com/rpc/soap/jirasoapservice-v2.wsdl#types?schema3
    error: undefined simple or complex type 'soapenc:Array'
    line 0 of file:/C:/Documents%20and%20Settings/Alexander%20Trauzzi/JavaApplication2/xml-resources/web-service-references/jirasoapservice-v2/wsdl/jira.atlassian.com/rpc/soap/jirasoapservice-v2.wsdl#types?schema3
    -=-
    And on and on...
    What is going on? Why can't I generate my web service client? Any help is greatly appreciated!

    There is a bug in the processLauncher for deploytool. The workaround is to edit the processLauncher.xml located under <AS_INSTALL>/lib/processLauncher.xml and add
    add xalan.jar and mail.jar to the classpath includes of the s1as-deploytool process:
    includes="appserv-assemblytool.jar,activation.jar,appserv-admin.jar,appserv-cmp.jar,appserv-rt.jar,j2ee.jar,jaxrpc-impl.jar,appserv-ext.jar,deployhelp.jar,admin-cli.jar,dom.jar,xercesImpl.jar, xalan.jar, mail.jar"
    The web service wizard should now work.

  • Creating web service client with deploytool

    J2EE 1.4 SDK 2005Q1 Release Candidate
    Windows XP Professional SP1
    I cannot create a web service client from a WSDL file any longer.
    deploytool
    - new
    - web service
    - web service client
    - next (provide the wsdl file): package name is not filled in automatically
    - next: there is no way to continue - next and finish button are both grey
    There are no problems with J2EE 1.4 SDK 2004Q4 Beta

    There is a bug in the processLauncher for deploytool. The workaround is to edit the processLauncher.xml located under <AS_INSTALL>/lib/processLauncher.xml and add
    add xalan.jar and mail.jar to the classpath includes of the s1as-deploytool process:
    includes="appserv-assemblytool.jar,activation.jar,appserv-admin.jar,appserv-cmp.jar,appserv-rt.jar,j2ee.jar,jaxrpc-impl.jar,appserv-ext.jar,deployhelp.jar,admin-cli.jar,dom.jar,xercesImpl.jar, xalan.jar, mail.jar"
    The web service wizard should now work.

  • Standalone Web Service clients in NetBeans with Reliable Messaging

    Following the WSIT tutorial (http://java.sun.com/webservices/reference/tutorials/wsit/doc/index.html) it's possible to create a Web Service with Reliable Messaging and a servlet client which run perfectly, great, but try and create a standalone client in NetBeans and it immediatly fails.
    Basically I created a standard Java application, did New->Web Service Client exactly like I had done in the servlet example and then used the Web Service Client Resources -> Call Web Service Operation context menu to add a Web Service call to my java application.
    The relevant code:
    try { // Call Web Service Operation
                uk.ac.ox.sddag.glassfish.server.NonSecureWSService service = new uk.ac.ox.sddag.glassfish.server.NonSecureWSService();
                uk.ac.ox.sddag.glassfish.server.NonSecureWS port = service.getNonSecureWSPort();
                int x = 0;
                int y = 10;
                int result = port.add(x, y);
                System.out.println("Result = "+result);
                ((Closeable)port).close();
            } catch (Exception ex) {
                System.out.println("Exception:");
                ex.printStackTrace();
            }Result:
    Exception:
    javax.xml.ws.soap.SOAPFaultException: com.sun.xml.ws.rm.RMException: WSRM3018: Non RM Request or Missing wsa:Action header
            at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:188)
            at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:130)
            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 $Proxy29.add(Unknown Source)
            at nonsecurestandaloneclient.Main.main(Main.java:29)
    Caused by: javax.xml.ws.WebServiceException: com.sun.xml.ws.rm.RMException: WSRM3018: Non RM Request or Missing wsa:Action header
            at com.sun.xml.ws.rm.jaxws.runtime.server.RMServerTube.processRequest(RMServerTube.java:343)
            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.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218)
            at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
            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.JAXWSServlet.doPost(JAXWSServlet.java:176)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
            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.connector.grizzly.TaskBase.run(TaskBase.java:265)
            at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Caused by: com.sun.xml.ws.rm.RMException: WSRM3018: Non RM Request or Missing wsa:Action header
            at com.sun.xml.ws.rm.jaxws.runtime.server.RMServerTube.handleProtocolMessage(RMServerTube.java:469)
            at com.sun.xml.ws.rm.jaxws.runtime.server.RMServerTube.processRequest(RMServerTube.java:145)
            ... 45 more
    BUILD SUCCESSFUL (total time: 1 second)By removing the Reliable Messaging from the Web Service this error goes away. Initially I thought this error might be being caused by not specifying the WebMethod annotations 'action' parameter, but it's definitely set.
    package uk.ac.ox.sddag.glassfish.server;
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    @WebService()
    public class NonSecureWS {
        @WebMethod(action = "add")
        public int add(@WebParam(name = "x") int x, @WebParam(name = "y") int y) {
            return x+y;
    }Interestingly, I found that this error also goes away if I add the library webservices-rt.jar from my glassfish libs to the project. Perhaps this is an oversight of NetBeans and should have been added automatically if reliable messaging is enabled, although by default it does have JAX-WS 2.1 jaxws-tools which I'm guessing is for some reason not adequate. JAX-WS version mismatch?

    This bug still isn't fixed.
    Thank you, adding Glassfish's webservices-rt.jar does fix it.

  • NPE when working with connections.xml for Web Service client

    Our ADF Web Service clients needs to read the WSDL and End point URL from connections.xml. But this is giving an Error.
    Here are the details:
    jdevloper 11.1.1.6.0
    Weblogic 10.3.5
    OWSM 11.1.1.6
    From my ADF based Application I need to call out a web service.
    For this I have built a Web Service Proxy and coded to call it from the application.
    Since the app needs to run through the development testing deployment lifecycle and hence be deployed on different environments, we need the ability allow configuration of wsdl and end point URL for the web service call without the need to recompile the app.
    We want to leverage the connections.xml for this purpose.
    http://docs.oracle.com/cd/E23943_01/web.1111/b31974/web_services.htm#autoId6
    My connection.xml looks like:
       <Reference name="MyService" className="oracle.adf.model.connection.webservice.impl.WebServiceConnectionImpl" xmlns="">
          <Factory className="oracle.adf.model.connection.webservice.api.WebServiceConnectionFactory"/>
          <RefAddresses>
             <XmlRefAddr addrType="WebServiceConnection">
                <Contents>
                   <wsconnection description="file:/C:/JDeveloper/mywork/jdev116/DeployTstCnnxtnLov/LovProxy/src/abc/lov/proxy/MyService.wsdl" service="{http://xmlns.oracle.com/Enterprise/HCM/services/MyService.1}MyService">
                      <model name="{http://xmlns.oracle.com/Enterprise/HCM/services/MyService.1}MyService" xmlns="http://oracle.com/ws/model">
                         <service name="{http://xmlns.oracle.com/Enterprise/HCM/services/MyService.1}MyService">
                            <port name="MyService_Port" binding="{http://xmlns.oracle.com/Enterprise/HCM/services/MyService.1}MyService_Binding">
                               <soap addressUrl="http://<machine:port>/PSIGW/PeopleSoftServiceListeningConnector" xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
                               <operation name="MyServiceOperation">
                                  <soap soapAction="MyServiceOperation.v1" xmlns="http://schemas.xmlsoap.org/wsdl/soap/"/>
                                  <output name="MyService_RESP.V1"/>
                                  <input name="MyService_REQ.V1"/>
                               </operation>
                            </port>
                         </service>
                      </model>
                   </wsconnection>
                </Contents>
             </XmlRefAddr>
          </RefAddresses>
       </Reference>
    My code in the Service Client Looks like:
      @WebServiceRef
      private static MyService myservice;
                Context ctx = ADFContext.getCurrent().getConnectionsContext();
                WebServiceConnection wsc =
                    (WebServiceConnection)ctx.lookup("MyService");
                String urlString = wsc.getWsdlUrlStr();
                System.out.println("WSDL URL: "+urlString);
                myservice = wsc.getJaxWSPort(MyService.class);
                MyService_PortType port = myservice.getMyService_Port();
      ServiceRequest request = new ServiceRequest();
      ServiceResponse response = port.MyServiceOeration(request);
    The WSDL URL is being read correctly.
    Error:
    This error appears to be triggered by the code:
        myservice = wsc.getJaxWSPort(MyService.class);
    java.lang.NullPointerException
            at java.lang.Class.isAssignableFrom(Native Method)
            at oracle.j2ee.ws.common.jaxws.runtime.GenericJavaType.create(GenericJavaType.java:97)
            at oracle.j2ee.ws.common.jaxws.runtime.GenericJavaType.create(GenericJavaType.java:118)
            at oracle.j2ee.ws.common.jaxws.runtime.OperationMappingModeler.processParameters(OperationMappingModeler.java:268)
            at oracle.j2ee.ws.common.jaxws.runtime.OperationMappingModeler.processMethod(OperationMappingModeler.java:155)
            at oracle.j2ee.ws.common.jaxws.runtime.ServiceEndpointRuntimeModeler.buildRuntimeModel(ServiceEndpointRuntimeModeler.java:114)
            at oracle.j2ee.ws.client.jaxws.WsClientProxyFactory.getRuntimeMetadata(WsClientProxyFactory.java:69)
            at oracle.j2ee.ws.client.jaxws.WsClientProxyFactory.createProxy(WsClientProxyFactory.java:126)
            at oracle.j2ee.ws.client.jaxws.WsClientProxyFactory.createProxy(WsClientProxyFactory.java:106)
            at oracle.j2ee.ws.common.jaxws.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:219)
            at oracle.j2ee.ws.common.jaxws.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:249)
            at oracle.adf.model.connection.webservice.impl.WebServiceConnectionImpl.getJaxWSPort(WebServiceConnectionImpl.java:385)
            at abc.lov.proxy.MyService_PortClient.fetchDesc(MyService_PortClient.java:84)
            at abc.lov.ServiceManager.fetchEmplID(ServiceManager.java:13)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    Hi Frank,
    I got the following two lines of code just to check if WebServiceConnection was able to read the connections file alright.
                String urlString = wsc.getWsdlUrlStr();
                System.out.println("WSDL URL: "+urlString);
    I am not using urlString for further processing.
    The output is
    WSDL URL: http://<host>/PSIGW/PeopleSoftServiceListeningConnector/MyService.1.wsdl
    java.lang.NullPointerException
            at java.lang.Class.isAssignableFrom(Native Method)
            at oracle.j2ee.ws.common.jaxws.runtime.GenericJavaType.create(GenericJavaType.java:97)
            at oracle.j2ee.ws.common.jaxws.runtime.GenericJavaType.create(GenericJavaType.java:118)
    The WSDL Url pointed to is the one that I configure in the connection while deploying the App.
    Ran a test and WSDL Url is accessible by the app.

Maybe you are looking for

  • Adobe X Pro for teachers/students

    If I puchase the Adobe X Pro teacher/student edition, can I download it on more than one computer?

  • What does this all mean

    Repairing permissions for “Macintosh HD” Warning: SUID file “System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent” has been modified and will not be repaired. Permissions differ on “System/Library/PreferencePanes/.Displa

  • How to alter XY graph label according to property node?

    I have tried to alter the XY graph label (title) programmatically by making a property node of the XY graph and going to label/text. Then I created a constant to rename the graph, ran the VI but it refused to rename the graph. I have consulted the ma

  • How are the standard ACL settings for the installationfolder C:\Program Files\Mozilla Firefox ?

    reasoning: On my Win7 Prof. machine I have an entry for "authentificated users" who can write to that folder and I guess this is a security risk/no standard behaviour? I stumbled upon this because of the newest update for Firefox. My machine is able

  • Flattened image looking different than when layers are all seperate?

    Hello, I have an image that I've made in illustrator/photoshop and I noticed that when I save the image as a jpeg out of photoshop after it is finished it looks way different that it does while in photoshop. I merged the layers just out of curiosity