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.

Similar Messages

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

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

  • Error when creating web service client in netbeans

    i tried to create a web service client from a wsdl and an error pops up:
    web service client can not be created by jaxws:wsimport utility.
    reason: com.sun.tools.xjc.api.schemacompiler.resetschema()v
    There might be a problem during java artifacts creation: for example a name conflict in generated classes.
    To detect the problem see also the error messages in output window.
    You may be able to fix the problem in WSDL Customization dialog
    (Edit Web Service Attributes action)
    or by manual editing of the local wsdl or schema files, using the JAXB customization
    (local wsdl and schema files are located in xml-resources directory).
    end of error message
    I am using netbeans 6.0 RC 2 and the bundled tomcat 6.0.13. Please help me.

    Hi Yatan
    The error is mostly there may be some Duplicate variable/schema element decalared in the wsdl or the xsd referred in the wsdl. Like in WSDL for any Operations, most of the times, we use input and outputs as complex xsd element. We declare these xsd in the same file or in another file and import that in the .wsdl file. So check or validate your XSD file for any Duplicates.
    In JDeveloper itself, I think, you can open XSD or WSDL and validate it from right click menu options like that.
    Thanks
    Ravi Jegga

  • Standalone Web Service Client: NullPointerException

    Hello,
    I failed running a standalone SAP Web Service application. I built the jar using Netweaver Developer Studio and wrote an application using the stubs. When running the client I get a NullPointerException with its root cause in a SAP provided class:
    Caused by: java.lang.NullPointerException
         at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.buildRequestRpc(MimeHttpBinding.java:251)
         at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1453)
         at test.BasicTest.echoDouble(BasicTest.java:446)
         ... 20 more
    Any hints what the problem might be?
    Maybe I forgot some libraries, however, a NullPointerException is not a common exception in this case. Anyway, is there a list of SAP libraries needed for a standalone client?
    Thanks,
    Peter

    My response is a bit late, but the problem is still occurring.
    The full exception trace is not longer. I use a very simple example that invokes a webservice echoing a string:
    java.rmi.RemoteException: Service call exception; nested exception is:
         java.lang.NullPointerException
         at xxx.webservices.client.sap.rpc.BasicFunctionsRpcPortBindingStub.echoStringBox(BasicFunctionsRpcPortBindingStub.java:903)
         at Test.main(Test.java:24)
    Caused by: java.lang.NullPointerException
         at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.buildRequestRpc(MimeHttpBinding.java:251)
         at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1453)
         at xxx.webservices.client.sap.rpc.BasicFunctionsRpcPortBindingStub.echoStringBox(BasicFunctionsRpcPortBindingStub.java:896)
         ... 1 more
    The error happens before anything is sent to the server.
    Thank you.

  • Web service client not working with HTTP Analyzer turned on

    So the subject explains it all.
    I have a simple JAXWS web service with @Policy(uri = "policy:Wssp1.2-2007-Https.xml") on remote secured (real SSL cert) Weblogic 10.3.5.
    A simple client is generated in JDev 11.1.2.3 and run on my machine locally.
    I'm really not sure I've tuned everything right with client certificates but the thing is when JDeveloper HTTP Analyzer is turned on client run gives bad_certificate SSLException.
    With Analyzer turned off the service call is successfull.
    javax.net.ssl.SSLKeyException: [Security:090542]Certificate chain received from localhost - 127.0.0.1 --> wl1n2.miit.ru was not trusted causing SSL handshake failureCould someone explain me this issue?

    Puthanampatti,
    First of all, how am I to determine what security folder is being used for certificates when I run local client in JDev?
    My JDev folder is D:\JDeveloper-11.1.2.*3* and there's D:\JDeveloper-11.1.2.3\jdk160_24\jre\lib\security
    My JDEV_USER_DIR is set to another folder: D:\JDeveloper-11.1.2.*2* \home so I'm not sure where should I import certificates.
    To import a certificate I:
    Open our https web site in Chrome browser. Click the HTTPS mark and expoer the certificate as Base64 (does it matter what encoding to use?) .cer file.
    Then I open Windows command line and run setDomainEnv in my local weblogic folder:
    D:\JDeveloper-11.1.2.2\home\system11.1.2.3.39.62.76.1\DefaultDomain\bin\setDomainEnv.exe
    cd D:\JDeveloper-11.1.2.3\jdk160_24\jre\lib\security
    keytool -import -alias miitcert -keystore cacerts -file d:\cer\miit-base64.cerA bit confusing might be the fact that system11.1.2.*3* folder is inside JDeveloper-11.1.2.*2* folder but that is how it is.
    So that were the steps I did to import a certificate, but the problem with HTTP Analyzer is still here.
    And what is demotrust.jks? There's no such file in security folder.

  • 10.1.3.3 JDev web service client proxy: Issue with XSD:anySimpleType

    Hi,
    One of our Web services XSD elementss has "anySimpleType" as the type:
    <xsd:element name="Value" type="xsd:anySimpleType" minOccurs="0" nillable="true"/>
    The client proxy is generated using JDev 10.1.3.3. We observed that the corresponding Java object is created with "String" data type:
    protected java.lang.String value;
    exp.setValue("100");
    We need to be able to pass arguments with other simple types as well (E.g. Decimal). We tried changing the auto generated code, but weren't successful.
    Any pointers in this regard are much appreciated.
    Thanks,
    Phani

    Hi all,
    can anyone please respond to my issue. Its sort of urgent.
    thanks,

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

  • 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

  • Create web service client for javafx project in netbeans 6.8

    I here have a javafx project and need to create a web service client for it (in netbeans 6.8).
    However when I right click this project -> new -> web service client -> input wsdl location\package -> finish, it seems that the client code is never generated. This is quite different from what happens when creating web service client for a java project.
    Anyone knows how is this happening?

    Thanks for your reply.
    I did write my own ws client code but I need to create a web proxy based on an appointed wsdl path. That requires me to create a web service client from netbeans 6.8, like what I described in my first post. Unfortunately, it's not behaving like what I imagined it should do for a java project, even the javafx file itself doesn't have any error. The error occurs in package definition line.
    package fx;For the definition above, it cannot access java.lang.builtins.
    The question now is about the possibility to include javafx file in an non-javafx, say, java project. Any comments?
    ---Regards.

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

  • How to change the web service address of NetBeans generated WS client

    I am currently experimenting with web services using netbeans and Sun Application Server.
    Basically I am creating simple web services using net beans and then deploy them on the app server and then create another pfoject with web service reference to that web service to invoke the service.
    My problem is when a project is deliverd to the production site the the client applications web service reference will need to be configured to refer to the production web service address. But when I looked at the generated web service client code the address is hard coded.
    How can I change the address to the web service of a web service reference created in net beans either using some configuration file (without having to recompile the client) or at runtime.
    Thanks in advance

    bump...

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

  • NetBeans 5.5 j2me web service client...how to?

    Hi,
    I am new to web services and j2me, so this question might be very simple.
    I have created a project (simple web service) and tested it and all work ok...
    I try to create a midlet to consume this web service so I do the following:
    (1) Create a mobile->Mobile Application project
    (2) Add a new file-> j2me web service client
    (3) On running web service I insert the url of the wsdl of the previous web service
    (4) Press retrieve WSDL (everything seem to work ok up to this point)
    (5) I keep the check box Create Simple midlet checked
    A packet with two files is created: blablah.wsclient, blablablah.wsdl
    No midlet is created and when I try to create my own nothing I dont know how to access the web services methods...
    Is it a bug of netbeans 5.5?
    Can someone provide a link for a simple tutorial or at least make clear how to access the method of the web service?
    Thanx in advance!

    I'm facing the same problem with NetBeans 5.5.1 while I had no trouble with NetBeans 5.5 (I wonder why I updated :-( )
    I hope someone can help us.
    Best regards
    edit:
    It should be due JDK 1.6; I will try and I'll let you have my results.
    Rread this:
    http://www.netbeans.org/issues/show_bug.cgi?id=90112
    Edited by: NikJ2ME on Oct 13, 2007 5:05 AM

  • 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

Maybe you are looking for

  • Problems with touch keyboard after ios6 update.

    After the ios6 update, my touch keyboard doesn't work well with certain apps. For example, in pages and Facebook it doesn't push up to reveal the typable area so I can't see what I'm typing. In numbers, I know longer see the old typable area right ab

  • Oracle Development Tools and TFS

    Hey there, currently I'm struggeling with how to work with Visual Studio Oracle Development Tools and TFS. I'm relatively new to Oracle-DBs, I'm known to MS SQL Server. In General my colleagues and me work in the solution Explorer (SQL Server DB-Solu

  • Problem with when validate trigger

    Hi All, I am using oracle forms 10g. I have developed a custom form In that i have two block Header block and Detail block.In the header block some fields like Po number, po amount , supplier name, supplier site etc. And in the detail block i have po

  • Generated files do not rename automatically when doing save book as

    I'm using FM8. Inside of your book, generated files are suppose to rename to your book name automatically when you do a "save book as", the filenames are not changing, does anyone know why this is and what the solution is?

  • BD10 transaction

    Hi.. I am sending material master  by BD10 using ALE. I have maintained the modal view in BD64 for both my sending and receiving systems along with other customizations. I am working an a SAP system say ABC and the name of my sending SAP system is AB