I have an app deployed in weblogic server. In that app, I am calling an async webservice through a bpel in a composite. It is getting timed out after 5 minutes.
I tried adding the following code during the invoke activity:
bpelx:for="'PTM20'"
But still timeout is 5 minutes.
Is there anything I need to do other than adding this? Is there any global SOA properties to modify?
I am invoking an aync webservice through a bpel like this:
< invoke name="myprocess" inputVariable="varx" operation="method" bpelx:for="'PTM20'" ....>
The exception I am getting is following:
<bpelFault><faultType>0</faultType>
<remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
<part name="summary">
<summary>oracle.fabric.common.FabricInvocationException: Unable to invoke endpoint URI "my_webservice_url" successfully due to: javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Message send failed: Read timed out</summary></part>
<part name="detail"><detail>Unable to invoke endpoint URI "my_webservice_url" successfully due to: javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Message send failed: Read timed out</detail></part>
<part name="code"><code>null</code></part>
</remoteFault></bpelFault>
While going through Audit Trail, I can see the time difference between invocation and time out happened is 5 minutes. It did not wait for 20 minutes as expected.
Please help.
Thanks.
There are couple places to consider when configuring SOA/BPEL engine timeouts:
Domain wide global JTA timeout settings
individual BPEL engine EJB timeouts
Ideally you never want to hit those timeouts because you won't be able to do proper error handling. To avoid that you should set individual timeouts on outgoing references links and make sure they have smaller values than two mentioned above.
There are many blog posts available on this subject, for starters take a look at this post
Related
I have a C# application that send a SOAP request to a Java web service, and it works fine. However, when I activate SSL, in some communication I get below exception:
com.sun.xml.ws.protocol.soap.MessageCreationException: Couldn't create
SOAP message due to exception: Unable to create StAX reader or writer.
I am sure that SSL is implemented correctly, but some messages fail with this error.
After some hours, I found a solution myself.
It is a timeout problem, if timeout a is set with a small value for SOAP connection in my C# service side , this error can occur.
We have implemented webservice call using JAX-WS RI 2.1.6 in JDK 6 now problem comes when we enable https webservice call stops reaching server and java reports following error,
javax.xml.ws.WebServiceException: java.io.IOException: Async IO
operation failed (3), reason: RC: 55 The specified network resource
or device is no longer available.
Now I have tested this within SoapUI and response from the service is received there.
Looked into various solution where it tells us to provide timeout settings but nothing seems work.
#WebEndpoint(name = "RulesSoap")
public RulesSoap getRulesSoap() {
((BindingProvider)super.getPort(new QName("urn:decision:Rules", "RulesSoap"), RulesSoap.class)).getRequestContext().put("com.sun.xml.internal.ws.connect.timeout", 1000);
((BindingProvider)super.getPort(new QName("urn:decision:Rules", "RulesSoap"), RulesSoap.class)).getRequestContext().put("com.sun.xml.internal.ws.request.timeout", 1000);
return super.getPort(new QName("urn:decision:Rules", "RulesSoap"), RulesSoap.class);
}
And just for information JAX-WS implementation is following few simple lines,
of course we submit all necessary data into respective stubs and all but I am not submitting here because our http calls are getting through,
Rules rules = new Rules(new URL(url), new QName("urn:decision:Rules", "Rules"));
RulesSoap rulesSoap = rules.getRulesSoap();
CorticonResponse response = rulesSoap.processRequest(request);
Note : Our application server WebSphere Application Server and Version 7.0.0.19
Thanks in Advance.
After lots of efforts we resolved this. I will provide steps if anything related to this happens how to find root cause,
Step 1 :
First of all we enabled soap tracing in WebSphere Application Server by following setting,
Admin Console > Servers > Server Types > WebSphere Application Servers >
{your server} > Troubleshooting > Change Log Detail Levels > Runtime
In run time please put this , *=info: com.ibm.ws.websvcs.*=all: org.apache.axis2.jaxws.*=all
This step will create trace.log file in your logs folder.
Now any web service request which goes out of your server will add logs to this file and necessary props like endpoint, request, response etc.
Step 2 :
Reading this trace.log file we found following endpoint,
PropertyValid 1 org.apache.axis2.jaxws.client.PropertyValidator validate validate property=(javax.xml.ws.service.endpoint.address) with value=(http://uxm.solutions.lnet.com:9445/axis/dswsdl/Rules/1/0)
HTTPConnectio 3 resetConnection : http://uxm.solutions.lnet.com:9445/axis/dswsdl/Rules/1/0 Persistent : true
Now if you notice here that our soap has endpoint address javax.xml.ws.service.endpoint.address where protocol is still using http which causes to fail ssl handshake.
Step 3 :
Solution for this is to override endpoint inside your soap stubs which can be implemented by adding following line,
RulesSoap rulesSoap = rules.getRulesSoap();
((BindingProvider)rulesSoap).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "https://uxm.solutions.lnet.com:9445/axis/dswsdl/Rules/1/0");
Conclusion :
So here is what i think even we pass https url while we are creating objects but still does not take this https url on runtime, to me this looks like stubs creation issue with JAX-WS.
Thanks.
What protocol /ciphers are you using? You have mentioned there is connection to webservice on WAS7 with JDK6 and Java 6 does not support TLS1.2 (and TLS1.1 only from certain fixpack).
See this:
How to use TLS 1.2 in Java 6
i am using a java program to send an http request to a website with SSL (https) to do more exactly "https://www.iplocation.net/", so i am sending request with proxy but i have continually errors with connection, i am sending the request with Jaunt API http://jaunt-api.com/ i get connection 1 or 2 time but then i get error connection, searching in google i read that a guy say that i have to Enable SSL debugging and he say that i have to use
-Djava.net.debug=all but he don't explain anything and i don't know if that is a code or a configuration in java, if someone know how can i enable ssl debugging please can explain me step by step? i just wanna do (HTTPS) resquest and don't get always error connections.
I’m trying to make Kerberos authentication connection to a SOAP service wsdl url.
I’m able to establish connection successfully and make service calls.
After I start my server, I’m able to make successful service call at least once.
However after few requests (1 or more ), I suddenly get invalid token error.
Once I get the error, future calls do not work and error persists.
IF I restart my server, then again service call works at least once. And above cycle continues.
I’m unable to figure out why suddenly token gets invalid, though it worked earlier. And restarting server makes token valid again.
Here is error stacktrace:
Caused by: GSSException: Defective token detected (Mechanism level: GSSHeader did not find the right tag)
at sun.security.jgss.GSSHeader.<init>(GSSHeader.java:97)
at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:237)
at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179)
Without seeing the Base 64 value or a hex dump, I assume that the client is sending a NTLM type 1 token and Java does not support NTLM.
I could not find root cause for why token is invalid. But here is how i get around this issue.
My authentication was working for first time after I restart my server and bean is loaded again in context. So I changed scope of my spring bean to prototype so that every time new proxy bean is created.
I'm trying to connect to salesforce from a java application. I was earlier getting a login error as follows which was resolved by setting the appropriate proxy settings.
com.sforce.ws.ConnectionException: Failed to send request to https://login.salesforce.com/services/Soap/c/29.0
Now, I'm getting the following error:
com.sforce.ws.ConnectionException: Failed to send request to https://ap1.salesforce.com/services/Soap/m/29.0/00D90000000q0ZR
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:121)
at com.sforce.soap.metadata.MetadataConnection.describeMetadata(MetadataConnection.java:281)
at integration.IntegrationClass.describeMetadata(IntegrationClass.java:80)
at integration.IntegrationClass.main(IntegrationClass.java:26)
Caused by: java.net.ConnectException: Connection refused: connect
Any ideas on how to resolve this error? Thanks!
UPDATE: I tried the code at my home (free from the restrictions of the office firewalls et al :) ) and found that the code ran successfully. Any ideas about changes that I should make to do the same at the company. As I already said, I added the config.setProxy(host, port) which allowed me to successfully log in, but not access the application. I have also enabled proxy from eclipse using Preferences -> General -> Network Connections. What am I missing?
Thanks a lot for your help. Cheers!
Ok, I got the solution and it's kinda silly, but since I didn't spot it anywhere else inspite of seeing similar questions, I'm going to post the solution.
The ConnectorConfig config = new ConnectorConfig(); is used multiple times; in my case, it is first used to login using new EnterpriseConnection(config)).login(username, password); and next to obtain a metadata connection using new MetadataConnection(config);. Since I'm creating 2 ConnectorConfig objects, I would need to use the setProxy method on both, which I...forgot. Hope this solution helps other people having the same problem.
Cheers!