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

Similar Messages

  • 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.

  • Netbeans 6.1: Can not create Web Service Client

    Hi
    I am trying to create a Web Service Client in Netbeans 6.1. The error message is:
    Web Service Client can not be created by JAXWS:wsimport utility.
    Reason: Could not initialize class com.sun.xml.ws.api.addressing.AddressingVersion
    Does someone have an idea what problems is? Note that I have created web service clients many times before without problems.
    Thanks in advance for any help
    Ralf

    Hi
    It works now... I rebooted the workstation.
    Regards,
    Ralf

  • 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

  • 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.

  • 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!

  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

  • Error creating a web service client from th WSDL document (soamanager)

    Hello everyone,
    we have generate with the wizard a web-service using the function module BAPI_CONTROL_RECIPE_GET_LIST. Then we have generated with SOAMANAGER the end point. As test, we have used a web-service explorer of Eclispe and we can retrieve without problems the data.
    Then we wanted to generate the web-servcie client with Eclipse Galileo (3.5.0) wiith the server GlassFish v2.1 Java EE 5 we first installed the WSIT jars, in order to support WS-RM protocol
    We have started the generation based on the document obtainend within the soamanager under the "Open WSDL document for selected binding" link.
    We have tried it several times and we always got the following error is:
    IWAB0399E Error in generating Java from WSDL: WSDLException (at /wsdl:definitions/wsdl:portType/wsp:Policy):
    faultCode=INVALID_WSDL: Encountered unexpected element 'Policy'.: <br>
        WSDLException (at /wsdl:definitions/wsdl:portType/wsp:Policy): faultCode=INVALID_WSDL: Encountered unexpected element 'Policy'.:
    at com.ibm.wsdl.util.xml.DOMUtils.throwWSDLException(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.parsePortType(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
    at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
    at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
    at java.lang.Thread.run(Unknown Source)
    Do you know if we took the right document in order to generate the web-service client? Do we need to have some specifics settings in the configurations of th endpoint? (provider security, transport settings, etc...?)
    If needed, or if someone would be nice enough to try to generate it on its side, I can post here the whole wsdl document, but due to its length, I first wait your comments.
    Thanks a lot in advance for your feed-back
    best regards
    Pierre-André
    addtions:
    maybe this should have been better posted within the forum Service-Oriented Architecture than standards?
    I forgot to mention the following threads, which seems to me to be somehow in this direction. But I do not get really how I could use them, or how is is releated.
    Edited by: Pierre-andre Jacquod on Sep 23, 2009 4:02 PM

    Hi,
    I am facing the same issue while generating the client java class from IBM RAD 6.0.
    Here is the error I am getting.
    WSDLException (at /wsdl:definitions/wsdl:portType/wsp:Policy): faultCode=INVALID_WSDL: Encountered unexpected element 'Policy'.:
         [java] at com.ibm.wsdl.util.xml.DOMUtils.throwWSDLException(Unknown Source)
         [java] at com.ibm.wsdl.xml.WSDLReaderImpl.parsePortType(Unknown Source)
         [java] at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
         [java] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
         [java] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
         [java] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
         [java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
         [java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
         [java] at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
         [java] at java.lang.Thread.run(Thread.java:571)
    Please guide me to resolve this issue.
    Thanks & Regards,
    Vijay

  • Creating And Deploying A JWSDP Web Service Client to Weblogic 8.1

    This setup produces an EAR containing a message driven bean in a jar file. When the MDB receives a message
    it checks to see if there is any data in a database table and if so calls the web service with that data. These instructions
    are for MS-Windows environments.
    In my setup I have:
    the weblogic domain at c:\b2b80
    the jwsdp at c:\apps\jwsdp-1.3
    extra jar files for the app server in c:\b2b80\lib
    the main weblogic installation at c:\apps\weblogic810\
    1> Download the the JWSDP version you wish to use and install it. (In this example I'm using 1.3)
    2> Create a project structure for you client like this:
         /project
              /earbuild
                   /META-INF
              /ejbbuild
                   /META-INF
              /ejbsource
              /wssource
    3> in the /project directory you will need a build.xml file that looks something like this: (the ant build targets are described at the end of this document)
    ==============================================================
    <?xml version="1.0"?>
    <project name="svcowner" default="buildall" basedir=".">
         <property file="classpath.settings"/>
         <property name="wssource" value="wssource"/>
         <property name="ejbsource" value="ejbsource"/>
         <property name="compileejbdest" value="ejbbuild"/>
         <property name="earbuilddest" value="earbuild"/>
         <property name="jarfilename" value="svcownerejb.jar"/>
         <property name="earfilename" value="svcowner.ear"/>
         <property name="debug" value="true"/>
         <property name="deprecation" value="true"/>
         <!-- this runs the create.bat which has all of the wscompile parameters -->
         <target name="cmdline_wscompile">
              <exec executable="wssource/create.bat"/>
         </target>
         <target name="compileejb" depends="cmdline_wscompile">
              <javac debug="${debug}" srcdir="${wssource}" classpath="${BUILD_CLASSPATH}"
                   destdir="${compileejbdest}" includes="**/*.java" deprecation="${deprecation}"/>
              <javac debug="${debug}" srcdir="${ejbsource}" classpath="${BUILD_CLASSPATH}"
                   destdir="${compileejbdest}" includes="**/*.java" deprecation="${deprecation}"/>
         </target>
         <target name="buildejbjar" depends="compileejb">
              <jar jarfile="${earbuilddest}/${jarfilename}" manifest="${compileejbdest}/META-INF/MANIFEST.txt">
                   <fileset dir="${compileejbdest}">
                        <include name="**/*.*"/>
                   </fileset>
              </jar>
         </target>
         <target name="buildear" depends="buildejbjar">
              <jar jarfile="${earfilename}">
                   <fileset dir="${earbuilddest}">
                        <include name="**/*.*"/>
                   </fileset>
              </jar>
         </target>
         <target name="deploy">
              <copy file="${earfilename}" todir="../../config/domain/applications"/>
         </target>
         <target name="buildall" description="build everything" depends="buildear, deploy">
         </target>
    </project>
    ==============================================================
    4> You need a matching classpath.settings file in the same directory, something like this:
    ==============================================================
    BUILD_CLASSPATH=/b2b80/lib/saaj-impl.jar;/b2b80/lib/saaj-api.jar;/b2b80/lib/jaxrpc-api.jar;/b2b80/lib/jaxrpc-impl.jar;c:/b2b80/lib/jaxrpc-spi.jar/b2b80/classes/;/b2b80/classes;/apps/weblogic810/server/lib/weblogic.jar;/apps/weblogic810/server/lib/weblogic_sp.jar;/apps/weblogic810/server/lib/xmlx.jar;/apps/weblogic810/server/ext/weblogic-tags.jar;/apps/weblogic810/server/ext/jdbc/oracle/920/ojdbc14_g.jar;/b2b80/lib/log4j.jar
    ==============================================================
    5> In the /project/earbuild/META-INF directory you need an application.xml file:
    ==============================================================
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
    <application>
    <display-name>svcownerb2b</display-name>
    <description>Application description</description>
    <module>
    <ejb>svcownerejb.jar</ejb>
    </module>
    </application>
    ==============================================================
    6> The /project/ejbsource directory contains the source for the client application. In my case this is a message driven bean (note that code below isn't complete). The most important part of the code below is the setting of the javax.xml.soap.MessageFactory system property.
    System.getProperties().put("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");
    If you don't do this a weblogic class will be used and the code will fail.
    ==============================================================
    package com.svcclient.ejb.svcownershipment;
    import java.text.*;
    import java.io.*;
    import java.sql.*;
    import java.util.Properties;
    import javax.ejb.*;
    import javax.jms.*;
    import javax.naming.*;
    import javax.sql.DataSource;
    import com.svcclient.util.*;
    import org.w3c.dom.*;
    import com.svcclient.websvc.svcowner.*;
    import javax.xml.rpc.Stub;
    public class SvcOwnerShipmentSubscriberMDB implements MessageDrivenBean, MessageListener
    private transient MessageDrivenContext mdc = null;
    private static Context context;
    private final static String CLASSNAME = "SvcOwnerShipmentSubscriberMDB";
    private String DATASOURCE_JNDI = "svcclient.b2b";
    private static DataSource mDS = null;
    private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
    public SvcOwnerShipmentSubscriberMDB()
    System.getProperties().put("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");
    try
    if (context == null)
    context = new InitialContext() ;
    if (mDS == null)
    mDS = (DataSource)context.lookup(DATASOURCE_JNDI);
    catch (NamingException ex)
    ex.printStackTrace();
    catch(Exception ex)
    ex.printStackTrace();
    public void onMessage(javax.jms.Message message)
    TextMessage msg = null;
    String ordernumber = null;
    String lineid = null;
    try
    if (message instanceof TextMessage)
    msg = (TextMessage) message;
    ordernumber = msg.getStringProperty("ordernumber");
                   // the JMS message contains a property that is an order number
    createAndSendXML(ordernumber);
    catch (Throwable ex)
    ex.printStackTrace();
    private void createAndSendXML(String ordernumber)
    if(ordernumber==null)
    return;
    PreparedStatement statement = null;
    ResultSet rset = null;
    java.sql.Connection conn = null;
    try
    conn = DBHelper.getConnection(mDS,"SvcOwnerShipmentSubscriberMDB.createAndSendXML");
    statement = conn.prepareStatement("select * from ..."); // you SQL here
    statement.setString(1,ordernumber);
    rset = statement.executeQuery();
    StringBuffer data = new StringBuffer();
    data.append("<? version=\"1.0\"?>\n");
    data.append("<shippingRequest>\n");
    while(rset.next())
    data.append("\t<order_date>"+dateFormat.format(new java.util.Date(rset.getTimestamp("SCHEDULE_SHIP_DATE").getDate()))+"</order_date>\n");
    data.append("\t<brand_name>svcclient</brand_name>\n");
    data.append("\t<shipRequestType>Sale</shipRequestType>\n");
    data.append("</shippingRequest>\n");
              // call the web service with the data from the database
    DataExchanger_Impl impl = new DataExchanger_Impl();
    Stub stub = (Stub)(impl.getDataExchangerSoap());
    DataExchangerSoap dx = (DataExchangerSoap)stub;
    String resp = dx.exchangeData("svcclient", "mypassword", "Sales", data.toString());
    catch(SQLException sqle)
    sqle.printStackTrace();
    catch(Exception e)
    e.printStackTrace();
    finally
    try
    if (rset != null)
    rset.close();
    if (statement != null)
    statement.close();
    if (conn != null)
    conn.close();
    catch(Exception x){}
    public void ejbCreate() { System.out.println("In SvcOwnerShipmentSubscriberMDB.ejbCreate()"); }
    public void setMessageDrivenContext(MessageDrivenContext mdc) { this.mdc = mdc; }
    public void ejbRemove() throws javax.ejb.EJBException { System.out.println("In SvcOwnerShipmentSubscriberMDB.remove()"); }
    ==============================================================
    7> The /project/ejbbuild/META-INF directory needs a MANIFEST.txt file.
    Manifest-Version: 1.0
    8> The /project/ejbbuild/META-INF directory needs a ejb-jar.xml file. This just sets up the MDB which is the client.
    ==============================================================
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <display-name>SvcOwnerShipmentSubscriberMDB</display-name>
    <enterprise-beans>
    <message-driven>
    <display-name>SvcOwnerShipmentSubscriberMDB</display-name>
    <ejb-name>SvcOwnerShipmentSubscriberMDB</ejb-name>
    <ejb-class>com.svcclient.ejb.svcownershipment.SvcOwnerShipmentSubscriberMDB</ejb-class>
    <transaction-type>Container</transaction-type>
    <message-driven-destination>
    <destination-type>javax.jms.Topic</destination-type>
    <subscription-durability>NonDurable</subscription-durability>
    </message-driven-destination>
    </message-driven>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>SvcOwnerShipmentSubscriberMDB</ejb-name>
    <method-name>onMessage</method-name>
    <method-params>
    <method-param>javax.jms.Message</method-param>
    </method-params>
    </method>
    <trans-attribute>NotSupported</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    ==============================================================
    9> The /project/ejbbuild/META-INF directory needs a weblogic-ejb-jar.xml file.
    ==============================================================
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN" "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd">
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>SvcOwnerShipmentSubscriberMDB</ejb-name>
    <message-driven-descriptor>
    <pool>
    <max-beans-in-free-pool>5</max-beans-in-free-pool>
    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
    </pool>
    <!-- JNDI Name of the Topic that the SvcOwnerShipmentSubscriberMDB listens for messages on -->
    <destination-jndi-name>jms.svcownerShipmentsTopic</destination-jndi-name>
    </message-driven-descriptor>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    ==============================================================
    10> The /project/wssource directory needs a dataexchange.wsdl file. This is the WSDL describing the web service
    we want to connect to with our client.
    ==============================================================
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:tns="https://www.svcowner.com/mfg/DataExchange/"
    xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    targetNamespace="https://www.svcowner.com/mfg/DataExchange/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    name="">
    <wsdl:types>
    <s:schema elementFormDefault="qualified"
    targetNamespace="https://www.svcowner.com/mfg/DataExchange/">
    <s:element name="exchangeData">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="sender" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="transactionType" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="data" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="exchangeDataResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="exchangeDataResult" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:schema>
    </wsdl:types>
    <wsdl:message name="exchangeDataSoapIn">
    <wsdl:part name="parameters" element="tns:exchangeData" />
    </wsdl:message>
    <wsdl:message name="exchangeDataSoapOut">
    <wsdl:part name="parameters" element="tns:exchangeDataResponse" />
    </wsdl:message>
    <wsdl:portType name="DataExchangerSoap">
    <wsdl:operation name="exchangeData">
    <wsdl:input message="tns:exchangeDataSoapIn" />
    <wsdl:output message="tns:exchangeDataSoapOut" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="DataExchangerSoap" type="tns:DataExchangerSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="exchangeData">
    <soap:operation soapAction="https://www.svcowner.com/mfg/DataExchange/exchangeData"
    style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="DataExchanger">
    <wsdl:port name="DataExchangerSoap" binding="tns:DataExchangerSoap">
    <soap:address location="https://svc.svcowner.com/mfg/dataexchange.php" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    ==============================================================
    10> The /project/wssource directory needs a websvc_config.xml file. This file tells wscompile where
    to find the WSDL file and the package name for the generated classes.
    ==============================================================
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
         <wsdl location="wssource/dataexchange.wsdl" packageName="com.svcclient.websvc.svcowner"/>
    </configuration>
    ==============================================================
    11> The /project/wssource directory needs a create.bat file. This just sets up the environment
    and calls the wscompile batch file in the JWSDP. I had to tweak the wscompile.bat file to match
    my environment as well.
    ==============================================================
    SETLOCAL
    SET WSDP=C:\apps\jwsdp-1.3\
    SET ANT_HOME=%WSDP%;apache-ant
    SET PATH=%ANT_HOME%\bin;%WSDP%jaxrpc\bin;%PATH%
    SET JAVA_HOME=c:\apps\weblogic810\jrockit81sp2_141_05
    call wscompile -gen:client -s ./wssource -keep -g -d ejbbuild wssource/websvc_config.xml
    ==============================================================
    12> The /project directory needs a build.bat file. Just a way for me to make sure my
    environment is set up right before doing the build.
    ==============================================================
    SETLOCAL
    SET ANT_HOME=c:\apps\jakarta-ant-1.4.1
    SET PATH=%ANT_HOME%\bin;%PATH%
    SET JAVA_HOME=c:\apps\weblogic810\jrockit81sp2_141_05
    call ant -buildfile build.xml %1 %2 %3 %4 %5 %6 %7 %8 %9
    ==============================================================
    13> You need to copy the following jar files from the JWSDP into a location they can be used by the
    app server during run time and also for the build process. In my set up this is c:\b2b80\lib. Note that
    these are pointed to by the file in step 4.
    c:\apps\jwsdp-1.3\jaxrpc\lib\jaxrpc-api.jar
    c:\apps\jwsdp-1.3\jaxrpc\lib\jaxrpc-impl.jar
    c:\apps\jwsdp-1.3\jaxrpc\lib\jaxrpc-spi.jar
    c:\apps\jwsdp-1.3\saaj\lib\saaj-api.jar
    c:\apps\jwsdp-1.3\saaj\lib\saaj-impl.jar
    14> You must make sure that the jar file in step 13 are at the front of the classpath for the
    weblogic server. WL comes with classes that conflict with these jars.
    15> I also had to add the root ssl certificate from the partners certificate authority to the java keystore
    using the keytool because this service uses SSL:
    C:\apps\weblogic810\jrockit81sp2_141_05\jre\bin>keytool -import -keystore ..\lib\security\cacerts -alias svcownerroot -keypass password -file c:\temp\svcownerroot.cer
    ==============================================================
    So the idea is this, you run the /project/build.bat file from within the /project directory. This
    calls ant which uses the build.xml file to create everything and copy the EAR to the weblogic deployment
    directory. The default ant target is buildall.
    The cmdline_wscompile target runs the /project/wssource/create.bat file which in turn runs the wscompile.bat
    file from the jwsdp. This causes the dataexchange.wsdl file to processed and the client files to be generated.
    The generated java files go into the /project/wssource directory. The generated class files go into the
    /project/ejbbuild directory. They need to be there so the MDB can use them.
    Next the compileejb ant target compiles the MDB java file and places the resulting class file into the
    /project/ejbbuild directory.
    Next the buildejbjar ant target takes everything in the /project/ejbbuild directory and creates the ejb jar
    file that will be included in the EAR. This file is placed in the /project/earbuild directory.
    Finally the buildear ant target takes everything in the /project/ejbbuild directory and produces the EAR
    file for deployment. The EAR file is placed in the /project directory.
    The deploy task simply copies the EAR file into the weblogic domain applications directory.

    It's really the web service that determines what kind of authentication is required. You can't just use any old strategy. If the web service isn't expecting it in that form, it won't work. Typically, either HTTP BASIC Auth or WS-Security is used. You'd have to contact the people responsible for the web service to know what kind of auth it requires.

  • Deploying Web Service clients to earlier versions of AS

    Hello,
    I'm using JDeveloper to create web service proxy for existing service to use in my Web Service client. For development, I'm using JDeveloper 10.1.3.3, for deployment of client application I'm using Application Server 10.1.3.0.
    The problem is that AS 10.1.3.0 contains other versions of the libraries, for example, wsclient.jar, so, there's an error using Web Service Proxy (stub) as method setSOAPVersion() doesn't exist.
    The question is how can I use generated stub with earlier versions of Application Server.
    I've tried some things, but they didn't work. Maybe I did something wrong and step-by-step guidelines to deploy application are needed - I hope, it could be useful not only for me.
    So, I found JDev 10.1.3 Release Notes (http://www.oracle.com/technology/products/jdev/htdocs/10.1.3.0.3/readme.html) and the following abstract:
    Workaround for URL / WS Data Control Apps When Deploying to Third Party Application Servers or Oracle Application Server 10.1.2 (4931009)
    1. Copy the following JAR files to your target application server along with the rest of the ADF installed JAR files. The following JAR files are available under your JDeveloper's home directory.
    bc4j/jlib/dc-adapters.jar
    bc4j/jlib/adf-connections.jar
    j2ee/home/lib/http_client.jar
    webservices/lib/wsdl.jar
    webservices/lib/orajaxr.jar
    webservices/lib/orawsrm.jar
    webservices/lib/wsclient.jar
    webservices/lib/orasaaj.jar
    webservices/lib/xsdlib.jar
    webservices/lib/mdds.jar
    jlib/osdt_core.jar
    jlib/osdt_cert.jar
    jlib/osdt_xmlsec.jar
    jlib/osdt_wss.jar
    jlib/osdt_saml.jar
    jlib/ojpse.jar
    jlib/oraclepki.jar
    webservices/lib/wssecurity.jar
    webservices/lib/orawsdl.jar
    j2ee/home/jazncore.jar
    2. Shutdown the application server and modify the application server's class path to include all of the JAR files that were extracted from the archive. Please refer to the application server documentation for details on how to modify the class path.
    3. Restart the application server. You are now ready to deploy / run the application successfully.
    So, I've created a new Shared Library with Enterprise Manager, uploaded all this files and, deploying application, checked this library too. This didn't help.
    Thanks in advance, Valeriy

    Hi Valeriy,
    I have exactly the same problem. Have you been able to resolve this yet?
    Thanks
    Stu

Maybe you are looking for