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.
Similar Messages
-
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. -
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. -
Hi,
I am new to web services. I need to write a web service client that invokes a web service method. The method takes complex types as parameter and returns a complex type.what kind of client(static stub, dynamic proxy or DII) should I use to invoke such kind of method from a standalone java application?
Thanks in advance.yes, you are right. stubs must be regenerated when the service definition changes. But is it possible to write a standalone client using dynamic proxy to invoke a web service method that uses complex types as parameters?.
-
NoClassdefFound Problem using EJB as web service client
Hello there, I am trying to use a MDB as a web service client. The architecture,
briefly is in the form of a java program communicating with a MDB via JMS, the
MDB gets the data from some external server via SOAP. I am using JBuilder to generate
the client side classes choosing the Axis framework. When my MDB is trying to
bind using locator.getPort() it throws an error as follows:
java.lang.NoClassDefFoundError: org.apache.axis.client.AxisClient. java.lang.NoClassDefFoundError:
org.apache.axis.client.AxisClient at org.apache.axis.client.Service.getAxisClient()Lorg.apache.axis.client
AxisClient;(Service.java:143) at org.apache.axis.client.Service.<init>()V(Service.java:152)
Note that it works fine if I use the web services client as a standalone java
program(no weblogic ). I tried putting the Axis.jar file as well as the relevant
files from this jar file(JBuilder's feature) in the EJB module that is deployed,
of no avail. Following is the classloader printed from the EJB's onMessage method
if needed for better understanding
weblogic.utils.classloaders.GenericClassLoader@afdd3a finder: weblogic.utils.cla
ssloaders.MultiClassFinder@20d7479 annotation: SecurityEJBModule@
Any help will be appreciatedSlava, I did exactly that and it worked! I wish I had seen your reply before.
Thanks
"Slava Imeshev" <[email protected]> wrote:
>
"Santosh" <[email protected]> wrote in message news:405074c7$[email protected]..
Hello there, I am trying to use a MDB as a web service client. Thearchitecture,
briefly is in the form of a java program communicating with a MDB viaJMS, the
MDB gets the data from some external server via SOAP. I am using JBuilderto generate
the client side classes choosing the Axis framework. When my MDB istrying to
bind using locator.getPort() it throws an error as follows:
java.lang.NoClassDefFoundError: org.apache.axis.client.AxisClient.java.lang.NoClassDefFoundError:
org.apache.axis.client.AxisClient at org.apache.axis.client.Service.getAxisClient()Lorg.apache.axis.client
AxisClient;(Service.java:143) at org.apache.axis.client.Service.<init>()V(Service.java:152)
Note that it works fine if I use the web services client as a standalonejava
program(no weblogic ). I tried putting the Axis.jar file as well asthe relevant
files from this jar file(JBuilder's feature) in the EJB module thatis deployed,
of no avail. Following is the classloader printed from the EJB's onMessagemethod
if needed for better understandingYou need to package all Axis jars and dependancoes into the EAR and
refer tham
in your ejb-jar MANIFEST.MF. If you are running weblogic 8.1, you may
just put them
into APP-INF/lib. Than you won't need to modify manifest.
Hope this helps.
Regards,
Slava Imeshev -
Problem creating J2ME web service client
Hi,
I am using netbeans (5 and 5.5 beta 2). I have created a web service which works fine. I also created a regular web service client as a standalone application which also works fine and connects to my web service with no problem.
BUT, when I want to create a J2ME web service client (under a J2ME application) I have to locate my WSDL file. but the wizard shows me the error "WSDL file does not contain port information".
By looking at the WSDL file I can see that port is created - or maybe I'm wrong.
piece from WSDL file:
<service name="myServiceName">
<port name="myServiceSPort" binding="tns:TranslatorWSPortBinding">
<soap:address location="myURLLocation"/>
</port>
</service>
Please note that I have replaced the actual values in above piece
I tried to use wsgen manually but it didn't help.
Can anyone help me in generating the correct WSDL format as J2ME web service client expects?
Thanks a lot,
S.well stubs are generated separately using WTK 2.5 stub generator but the problem is with the WSDL at this point.
S. -
What web service client library to use?
I am creating a standalone Java application (NOT a web server), which will be a client to a remote server via SOAP web services. I need this to run in Java 1.4, and I need to keep the app small (hopefully <1 megabyte). Axis is too big - it's around 5-8 megs with all the dependencies.
Isn't there some simple way to do this with just the classes built into the JDK? If not, then 1) why not? and 2) what third party lib can I use without bloating the size of my application?You were right and I was wrong on the size of Axis - it is 2.2 megabytes for version 1.4. I should have checked more carefully before posting. OTOH, it's 15.5 MB for version 2.
Neither one is suitable for my purposes, however. My code is around 200K and is downloaded in a browser: it seems really lame to increase that by an order of magnitude just so that I can access a web service.
I'm working on BCScomputer's tip of using JWSDP; 100K for client jars would be OK with me.
.Net, Cocoa, and AppleScript all have very easy-to-use built-in support for client access to SOAP Web Services. I'm somewhat surprised that it's this much work to create web service clients in Java; for all the hype surrounding Java and Web Services, this should be build into the JRE. It seems really silly to me that I'm downloading and expanding this 60 meg monster (JWSDP) to do the same thing as 3 lines of AppleScript. -
Hello,
I created new Web service client using WL 8.1, axis 1.4 , JDK 1.4.2 . The Service is hosted by my vendor and it's on asp/.net.
I used axis to create stub implemetation and when i invoke the service , i get the following error . I googled out the error and i see lot of them complain this as an axis issue.
Does anyone faced this error before ? or found an workaround for this?
Error message :-
2009-09-16 15:11:52,299] [DEBUG] [org.apache.axis.utils.XMLUtils] - Failed to set EntityResolver to null on DocumentBuilder
java.lang.NullPointerException
at weblogic.xml.jaxp.ChainingEntityResolver.popEntityResolver(ChainingEntityResolver.java:61)
at weblogic.xml.jaxp.RegistryDocumentBuilder.setEntityResolver(RegistryDocumentBuilder.java:168)
at org.apache.axis.utils.XMLUtils.releaseDocumentBuilder(XMLUtils.java:252)
at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:342)
Thanks in advance.
Thanks,
SubuYou made proxy client not a client.
I think u did not make any mistake to generate the proxy client but most probably ur web service-- message format is not rpc/encoded. Check it. hope u will succeed -
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. -
XML Parser Error while creating Web service Client using JAX RPC
hello evryone,
Im facing XML Parser Error while creating web service client using JAX RPC. Im using Net Beans IDE for development purpose. I have wrote configuration file for client. Now i want to create Client stub. However i dont know how to do this in Net Beans. So i tried to do it from Command promt using command :
wscompile -gen:client -d build -classpath build config-wsdl.xml
here im getting Error:
error parsing configuration file: XML parsing error: com.sun.xml.rpc.sp.ParseException:10: XML declaration may only begin entities
Please help me out.
Many thanks in advance,
KaceeCan i use the client generated using jdeveloper 11g to import into the oracle forms 10g, i.e., form builder 10g. Currently this is the version we have in our office.
-
How to prevent downloading wsdl in weblogic web service client
Hi,
I get a problem regarding weblogic web service client. My working environment:
weblogic server 8.1
Windows XP SP2
JDK 1.4
I use the weblogic tool to generate the client jar file from the wsdl file.
<target name="generate-client">
<clientgen wsdl="ACCESS.wsdl"
packageName="xxxxxx.client"
clientJar="${client}/${AccessClient_jar_file}"
keepGenerated="true"
saveWSDL="true"
/>
<javac srcdir="${source}"
destdir="${client}"
includes="**/AccessClient.java">
<classpath>
<pathelement path="${client}/${AccessClient_jar_file}"/>
</classpath>
</javac>
</target>
After that, I create a client java file to invoke the service deploy in the server.
public static void main(String[] argv)
throws Exception
int transactionId = 100;
int id = 1000;
// Setup the global JAXM message factory
System.setProperty("javax.xml.soap.MessageFactory", "weblogic.webservice.core.soap.MessageFactoryImpl");
// Setup the global JAX-RPC service factory
System.setProperty( "javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl");
AccessServicePorts ws = new AccessServicePorts_Impl(argv[0]);
AccessService port = ws.getAccessService();
// Resource - create
Resource resource = new Resource();
resource.setRES_CD("Create ResCo");
resource.setCODE_CODE("code_cod");
resource.setRES_TYPE("Resource typ");
resource.setCOMMON_FIELD(common);
AccessDefaultResult resultItems = port.createResource(resource);
System.out.println("createResource : " + resultItems);
I find that this web service client always issue 2 http requests to invoke an web service method deployed in server.
1st http reqeust:
GET /AccessEpol/EpolServiceSoap?WSDL HTTP/1.1
User-Agent: Java/1.4.2_08
Host: 127.0.0.1:8001
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
the return result is the wsdl downloaded from the server.
2nd http request is the real web service request.
The question is how could I eliminate the 1st http request because it's really unnecessary. I use other web service client like Axis 1.x, Axis client never has the http request to download the wsdl from the server.
I read through weblogic web service document. It do mentions that put saveWSDL="true" in the clientgen ant task. the default value for saveWSDL is true already. I did try saveWSDL="false" also. None of them can eliminate the 1st http request.
appreciate for any answer my question?Hi David,
thanks for the reply.
More or less I agree some points you mentioned above.
I did use Axis 1.x to test the inter-operability. The web service was developed in Weblogic 8.1 and is a part of an existing web application. It will be merged to existing application deployed in weblogic 8.1.
I also program the web service client to test the web service.
The implementation of the server and client will be handed over the project team and training for supporting or continuous development have to be conducted by me. So I don't like to use two types of technologies which will make thing complex.
I found this issue when I tried to protected the web service endpoint, eg http://localhost:7001/epol/service, using the web application Basic mechanism. The wsdl URL http://localhost:7001/epol/service?WSDL is also protected in this case. Unfortunately the username/password pair is not sent to the server when the weblogic client download the WSDL from the server. In this case, the client failed and throw exception. -
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 PMHi,
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 -
Oracle Database Web Service Client using UTL_DBWS :: ORA-29532 Error
Hi,
I have the Oracle Database 10.2.0.1.0 :-
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - ProductionI have written a simple Web Services Client using the classes gfrom the UTL_DBWS package. I loaded the JAR file dbwsclient.jar in the SYS Schema and I am trying to use it in the USF Schema.
However, I have hit this error & I ma unable to proceed :-
SQL> select get_stock_price from dual;
select get_stock_price from dual
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.IllegalAccessException: javax.xml.rpc.ServiceException:
java.security.AccessControlException: the Permission
(java.lang.RuntimePermission getClassLoader) has not been granted to USF. The
PL/SQL to grant this is dbms_java.grant_permission( 'USF',
'SYS:java.lang.RuntimePermission', 'getClassLoader', '' )
ORA-06512: at "USF.UTL_DBWS", line 193
ORA-06512: at "USF.UTL_DBWS", line 190
ORA-06512: at "USF.GET_STOCK_PRICE", line 17Can you please help me with this ?
Regards,
SandeepHi,
The error message said
the Permission(java.lang.RuntimePermission getClassLoader) has not been granted to USF.
I'd follow the suggestion
The PL/SQL to grant this is dbms_java.grant_permission( 'USF','SYS:java.lang.RuntimePermission', 'getClassLoader', '' )
In case you have not done so, consult the Callout Users Guide @
http://www.oracle.com/technology/sample_code/tech/java/jsp/callout_users_guide.htm
Kuassi http://db360.blogspot.com -
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, ValeriyHi Valeriy,
I have exactly the same problem. Have you been able to resolve this yet?
Thanks
Stu -
Setting timeout of web service client
I created a web service client using the java proxy for
a web service by running my web service in weblogic workshop test browser and by using
the jar file created by clicking on "Java Proxy" button.
i am calling my web service my adding code similar to this and it works
HelloWorld_Impl proxy = new HelloWorld_Impl();
HelloWorldSoap soapProxy = proxy.getHelloWorldSoap();
But, i am not sure how to set the timeout of my client programatically.
Is there a way to do this ?
Any help is greatly appreciated.Anyway,
I figured it out myself, by looking at other posts and applying some reflection API
HelloWorld_Impl proxy = new HelloWorld_Impl();
HelloWorldSoap soapProxy = proxy.getHelloWorldSoap();
// I learnt that this soapProxy is infact an object of HelloWorldSoap_Stub class
HelloWorldSoap_Stub myStub = (HelloWorldSoap_Stub)proxy.getHelloWorldSoap();
BindingInfo bInfo = (BindingInfo)myStub._getProperty("weblogic.webservice.bindinginfo");
bInfo.setTimeout(5); //secs
myStub._setProperty("weblogic.webservice.rpc.timeoutsecs", "5"); // secs
// finally you can call the methods of the web service
soapProxy.Hello();
Please be aware that, upon time out, you would get an exception : <class = java.rmi.RemoteException
cause = javax.xml.rpc.soap.SOAPFaultException: javax.xml.rpc.JAXRPCException:java.net.SocketTimeoutException: Read timed out.>
Also, my env : Weblogic 8.1 SP4
Maybe you are looking for
-
Custom Web Template fails, List does not exist
Can somebody help me with this? After I patched the SharePoint 2013 SP 1 to the April 2014 CU I've been getting this error. When I apply a custom template I keep getting the error: "Exception calling ApplyWebTemplate with 1 argument: List does not ex
-
Sending table using SO_NEW_DOCUMENT_SEND_API1
Dear All, I want to display a table in the mail sent from the SAP system using the function module SO_NEW_DOCUMENT_SEND_API1. Is there any way to do this? or Is there any other function module for doing this? Thanks Manik L Dhakate Message was edited
-
The class or interface 'mx.remoting.Service' could not be loaded.
Flash 8 was reinstalled on a new machine upgrade. Application that uses flash remoting is unable to be updated after this new install error when trying to publish application is : The class or interface 'mx.remoting.Service' could not be loaded. is t
-
For example, if I've created an application(spreadsheet) in java.. I want to execute it only by just double clicking an icon.. I don't want to go to command prompt and execute it.. So, how to create an icon for that application and it should execute
-
I need to get the values from the database and need to display it in the iframe.When I try to give the values in the iframe between <iframe> and </iframe> it is just blank.Can anybody help pl!Thanks