Web service client stub had exception
Hi there,
I'm new to Oracle AS(10.1.2). I used JDeveloper 10.1.3 created web service, and client stub. When I called the web service from client stub, I got the following error:
[SOAPException: faultCode=SOAP-ENV:Server; msg=java.math.BigDecimal.<init>(I)V [java.lang.NoSuchMethodError]]
I didn't find any problem with my parameters passing from client to the WS.
Anybody can help?
Thanks,
Helen
Hi there,
I'm new to Oracle AS(10.1.2). I used JDeveloper 10.1.3 created web service, and client stub. When I called the web service from client stub, I got the following error:
[SOAPException: faultCode=SOAP-ENV:Server; msg=java.math.BigDecimal.<init>(I)V [java.lang.NoSuchMethodError]]
I didn't find any problem with my parameters passing from client to the WS.
Anybody can help?
Thanks,
Helen
Similar Messages
-
Web service client stubs generation
Hi,
I try to generated model for WebDynpro application based on Web service (deprecated). WSDL file is valid. Stub classes generation is completed with compilation error. I found that the generator builds strange method for CMapLayerField complex type. There is setter with java.util.List param for MapLayer field but no one exists for Metafields field. Why for? Metafields field has the same cardinality as MapLayer one. Please, take me advance. I don't understand generation mechanism. I tried Axis2 and no problem was. How to fix this problem? How can I use Axis2 WSDL2Java generator instead of SAP Schema to Java generator?
The problem is below described in details. Compilation failed due to type cast error. The error message is:
The method setMapLayer(CMapLayer) in the type CMapLayerField is not applicable for the arguments (CMapLayer[])
Below I give some scrap from WSDL and generated Java class.
WSDL
==============
<s:complexType name="CMapLayerField">
<s:complexContent mixed="false">
<s:extension base="tns:CTable">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Metafields" type="tns:CMetafields" />
<s:element minOccurs="0" maxOccurs="1" name="MapLayer" type="tns:CMapLayer" />
<s:element minOccurs="1" maxOccurs="1" name="MapLayerFieldIsName" type="s:int" />
</s:sequence>
</s:extension>
</s:complexContent>
</s:complexType>
Generated API class for CMapLayerField type
==============================
package com.test.model;
public class ComplexType_CMapLayerField
private com.test.model.proxies.types.CMapLayerField originalBean;
//skipped
private com.test.model.ComplexType_CMetafields metafields;
/** sets the JavaWrapper in the relationship**/
public void setMetafields(com.test.model.ComplexType_CMetafields arg)
this.metafields = arg;
sets the original bean in the relationship
public void setMetafields(com.test.model.proxies.types.CMetafields origBean)
if(this.metafields == null)
this.metafields = new com.test.model.ComplexType_CMetafields ();
this.metafields.setOriginalBean(origBean);
private java.util.List _mapLayer = null;
public void setMapLayer (java.util.List list)
com.test.model.proxies.types.CMapLayer[] array = new com.test.model.proxies.types.CMapLayer[list.size()];
for(int i=0;i<list.size();i++)
com.test.model.ComplexType_CMapLayer item = (com.test.model.ComplexType_CMapLayer)list.get(i);
array<i> = item.getOriginalBean();
getOriginalBean().setMapLayer(array);
this._mapLayer = list;
public void setMapLayer (com.test.model.proxies.types.CMapLayer[] args)
if(_mapLayer == null) _mapLayer = new java.util.ArrayList();
if (args == null ) return ;
for(int i=0;i<args.length;i++)
com.test.model.ComplexType_CMapLayer wrapper = new com.test.model.ComplexType_CMapLayer ();
wrapper.setOriginalBean(args<i>);
_mapLayer.add(wrapper);
//skipped
Generated stub class for CMapLayerField type
===================================
package com.test.model.proxies.types;
public class CMapLayerField extends com.test.model.proxies.types.CTable {
//some line were skipped
private com.test.model.proxies.types.CMetafields fMetafields;
public void setMetafields(com.test.model.proxies.types.CMetafields _Metafields) {
this._f_Metafields = _Metafields;
this._f_hasMetafields = true;
private com.test.model.proxies.types.CMapLayer fMapLayer;
private boolean fhasMapLayer;
public void setMapLayer(com.test.model.proxies.types.CMapLayer _MapLayer) {
this._f_MapLayer = _MapLayer;
this._f_hasMapLayer = true;Obsolete
-
Web service Client developing!
Hi,
I've developed a web service client with JDeveloper 9i.
I did it using the WSDL file location and the stub/skeleton generator wizard.
Once made it, I wrote a client class with a method as follows:
// code beggining
public static Integer calculator (Integer a,Integer b) throws Exception {
Integer result= null;
if (a==null || b==null){
a= new Integer(0);
b= new Integer(0);
try {
CalculadoraWSStub calc= new CalculadoraWSStub();
result= calc.calculator(a,b);
catch (Exception ex)
throw new Exception ("\nMy Exception: " + ex.toString());
return result;
// code ending
Ok, now the main point of the problem.
If we execute this code under JDeveloper, everything goes well, BUT if we execute it as a function under Oracle database appears a Exception telling us something about a internal error because HttpClient/RetryModule constructor is private!
Can you help us?
-- we can't solve this problem because it only appears when we are trying to connect to a web service.
Thanks in advance, people!Yes, this is correct. ANM 4.1 does not allow more that 5 logins per account and unfortunately this is not configurable. I suggest the you mention this to your local Cisco Account Team.
-
We have a mysterious problem here.
In out ABAP system we had a WebService created. With "New - Web Service Client" we created a web service client on the java side for that one and we were able to invoke it.
We had to recreate this Web service due to wrong naming conventions. And now the problem starts.
In the Main service class we had before something generated by NWDS:
private static java.net.URL SERVICES_SERVICE_WSDL_LOCATION = null;
static {
java.net.URL url = null;
try {
java.net.URL tmpUrl = Thread.currentThread().getContextClassLoader().getResource("wsdl/com/sap/document/sap/soap/functions/mc_style/sap/bc/srt/wsdl/bndg_001279D063121DECA58AC5F7200DC55D/wsdl11/allinone/ws_policy/document/rootwsdl_SERVICES.wsdl");
url = new java.net.URL(tmpUrl.getProtocol(), tmpUrl.getHost(), tmpUrl.getPort(), tmpUrl.getFile());
} catch (java.net.MalformedURLException e) {
e.printStackTrace();
SERVICES_SERVICE_WSDL_LOCATION = url;
After the new creation with the new Web Service this static initializer is gone an we see:
private final static java.net.URL SERVICE_WSDL_LOCATION = null;
This code is ridiculous, to make something static final and set it to Null. And as expected at runtime it results in WebServioceException telling us:
No WSDL URL is specified for service [class com.sap.document.sap.soap.functions.mc_style.Service] on service creation.
Anyone knows what is going wrong here??
Best regards,
FrankSame problem here.
From Netweaver dev studio, I'm generating a deployable proxy for a Session Bean that is supposed to access a webservice but I keep getting the exception:
"Caused by: javax.xml.ws.WebServiceException: No WSDL URL is specified for service [class eu.socrades.sap.ServiceMonitorBeanTESTService] on service creation.
at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.<init>(SAPServiceDelegate.java:108)
at com.sap.engine.services.webservices.espbase.client.jaxws.cts.CTSProvider.createDelegate(CTSProvider.java:170)
at com.sap.engine.services.webservices.espbase.client.jaxws.cts.CTSProvider.createServiceDelegate(CTSProvider.java:151)
at javax.xml.ws.Service.<init>(Service.java:57)
at eu.socrades.sap.ServiceMonitorBeanTESTService.<init>(ServiceMonitorBeanTESTService.java:14)"
I'm injecting the reference to the service with:
@WebServiceRef(wsdlLocation = "rootwsdl_ServiceMonitorBeanTESTService.wsdl")
private ServiceMonitorBeanTESTService service;
I tried changing the location to a URL (where the wsdl can be downloaded from) or to "META-INF/wsdl/eu/socrades/sap/rootwsdl_ServiceMonitorBeanTESTService/rootwsdl_ServiceMonitorBeanTESTService.wsdl" but that did not help.
Any clue?
Thanks a lot,
Dom -
How to implement web service client timeout
I'm trying to implement a web service client using JAX-RPC specification and the client is generated by clientgen utility. We are using weblogic8.1(sp5).
How do I control the connection timeout and data transmission timeout? I have tried:
BindingInfo.setTimeout() method and stub._setProperty("weblogic.webservice.rpc.timeoutsecs", "1" /* secs */);
and they don't seem to be working...
I have searched the web service documentation and didn't found any mentioning on this. Can someone shred some light on this?
Thanks.
Ren
nullHi,
I had a problem too for setting the timeout of a webservice client. but i didn't find any thing on this.
But there is a work around for this see if it suits you but for this you have to use Apache AXIS webservice api to generate the client in that Api you have the Stub.timeOut() function to over come this problem
Cheers !!
Vivek:-) -
Timeout error at J2EE Web Service client
i have a .NET web service. a J2EE web service client deployed on Websphere application server 5.1 is invoking it. some services on .NET end take a long time to return a value. in such cases, the following error occurs on J2EE end. please suggest a solution.
faultCode: Server.generalException
faultString: java.net.SocketTimeoutException: Read timed out
faultActor: null
faultDetail:
java.net.SocketTimeoutException: Read timed out
at com.ibm.ws.webservices.engine.WebServicesFault.makeFault(WebServicesFault.java:150)
at com.ibm.ws.webservices.engine.transport.http.HTTPSender.invoke(HTTPSender.java:200)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:212)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:255)
at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:685)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:611)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:441)
at com.ibm.ws.webservices.engine.client.Stub$Invoke.invoke(Stub.java:662)Hi, am also getting time out .. excepiton in client
i added the following code inside stub class constructer...
System.out.println("GET TIME OUT ::::"+super.getTimeout());
super.setTimeout(77777);
System.out.println("GET TIME OUT AFTER SET::"+super.getTimeout());
compilation success. However am getting runtime exception after the sop.
GET TIME OUT ::::0
javax.xml.rpc.ServiceException: WSWS5014E: Error instantiating generated Stub class.
can you please tell me how u solved the issue.
Thanks
Bogi -
HTTP Analyzer help for web service client in 11g
I am using jDev 11.1.1.3.0 to build a web service client (proxy) to a potential vendor's web service. I've used the Http Analyzer before but I'm having trouble configuring it for a WS proxy. I just want to see the SOAP stream between my client and the web service. I used the Web Service Proxy wizard to create the Java code, but the web service provider has kept some of the contract in the WSDL private so that I had to manually generate the meat and potatoes of the Java code. I need to be able to see the SOAP my Java code is sending.
I have tried to configure the Http Analyzer to listen on it's own localhost and port with a forward rule to forward the request to the real WS, but I cannot figure out how to get the client to send it's requests to localhost instead of the actual WS.
Actually, I did figure it out, but then the request fails as it apparently tries to connect to the real WSDL before actually sending the request and cannot find a WSDL at the localhost URL. Here's the error:
Exception in thread "main" javax.xml.ws.WebServiceException: {http://localhost:8099}CatalogRequest is not a valid service. Valid services are: {http://[actual URL here]}CatalogRequest
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:249)
I have also tried to configure the Http Analyzer to somehow 'sniff' the actual URL by listening on the actual URL and port, but either I cannot get the Analyzer to see the request or it fails because the Analyzer is using the same port the request is trying to use.
Can someone explain how to configure the Http Analyzer to see the SOAP stream for a Web Client Proxy?Hi, I'm just using the default setup for HTTP Analyzer and having no problem using it.
Just make sure to run the HTTP Analyzer first before running or starting your app server (Integrated weblogic Server). -
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. -
Dear Java EE Experts,
I have developed a JAX-WS based web service client in net beans. The WSDL is successfully imported. I can create objects based on classes gernerated from WSDL. But when I call the actual web service method (giving an input object and expecting a return/output object), I get an exception:
===============================
Exception in thread "main" com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 400: Bad Request
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkStatusCode(HttpTransportPipe.java:196)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:168)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:83)
at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:105)
at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:587)
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:546)
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:531)
at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:428)
at com.sun.xml.internal.ws.client.Stub.process(Stub.java:211)
at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:124)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:9Cool
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:7Cool
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
at $Proxy28.smsSpcIPCC(Unknown Source)
at javaapplication1.Main.smsSpcIPCC(Main.java:34)
at javaapplication1.Main.recordComplaint(Main.java:54)
at javaapplication1.Main.main(Main.java:25)
Java Result: 1
BUILD SUCCESSFUL (total time: 2 minutes 22 seconds)
===============================
The code snippet that causes the runtime exception is (exception comes on last line of this code:
===============================
ServiceRequest sr = new ServiceRequest();
sr.setSerialNumber("211778");
sr.setProductCode("PSTN");
sr.setMSISDN("03005499257");
sr.setComplaintType("P1");
sr.setStatus("Open");
sr.setSubStatus("Unassigned");
com.siebel.customui.SMSSpcIPCCInput input = new SMSSpcIPCCInput();
input.setOperation("Registration");
ListOfWcServiceRequestIo srList = new ListOfWcServiceRequestIo();
srList.getServiceRequest().add(sr);
input.setListOfWcServiceRequestIo(srList);
SMSSpcIPCCOutput output = smsSpcIPCC(input);
===============================
Not sure how to resolve it. Please help.
Thanks & Regards,
AhsanWIS is not suppported on WLS JAX-WS. You'll need to use other authentication mechanisms such as http basic (which you tried already), or message-level security such as UNT, or SAML.
Regards,
Pyounguk -
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. -
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 -
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?.
Maybe you are looking for
-
Iphone calendar off by 1 hour after daylight savings
i have my iphone synced to my outook 2007 through an exchange server. after daylight savings this weekend, all of my appointments are now off by 1 hour. they are all correct in my outlook and on the exchange server (verified by web browser). i've tri
-
Seeburger AS2 comm channel problem (B2B) - "perhaps AS2ID missing"
Hi guys! We try to configure B2B scenario using Seeburger AS2, but communication channel monitor returns error: Error type: COMPONENT_ERROR,NOT_TRANSMITTED >> Error date: 9/25/07 10:05 AM >> Description: AS2 Adapter failure Outbound configuration err
-
Excel 2013 hyperlinks will not transfer when converting to pdf
Hyperlinks in Excel file do not transfer when I convert to pdf. I am using Excel 2013 with Acrobat XI Pro.
-
Ipad mini retina or ipad air?
The ipad mini has more pixel density than the ipad air, does this mean the mini has better graphics when watching movie or when looking at a picture/app?
-
Roboform will not load on explor 9 or the latest version of fire fox
I have been able to load it on firfox but when I close the app and reopen it it is gone as far as explorer 9 I can not get it to load at all