[JBossWS] - Handling timeouts in WebService client
by rohit.macherla
Hi all,
I have JBoss 4.2.2.GA version installed on a HP Unix machine. We have a WebService, say A, that calls another WebService, say B. When A calls B it usually takes a lot of time, say 3-4 minutes to respond. I would like to know where to configure the timeout value for the WebService client A.
I have increased the Transaction timeout of the transaction-manager MBean to 400 ( I guess it is in seconds). Still we don't find any improvement and we get a transfer-timeout error.
|
| <!--
| | The fast in-memory transaction manager.
| | Deprecated in JBossAS v4.2. Use JBossTS JTA instead.
| - ->
| <mbean code="org.jboss.tm.TransactionManagerService"
| name="jboss:service=TransactionManager"
| xmbean-dd="resource:xmdesc/TransactionManagerService-xmbean.xml">
| <attribute name="TransactionTimeout">400</attribute>
| <!- - set to false to disable transaction demarcation over IIOP - ->
| <attribute name="GlobalIdsEnabled">true</attribute>
| <depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
|
| <!- - Transaction Integrity Checking - ->
| <!- - Force a rollback if another thread is associated with the transaction at commit - ->
| <!- - <depends optional-attribute-name="TransactionIntegrityFactory"
| proxy-type="org.jboss.tm.integrity.TransactionIntegrityFactory">
| <mbean code="org.jboss.tm.integrity.FailIncompleteTransaction"
| name="jboss:service=TransactionManager,plugin=TransactionIntegrity"/>
| </depends> - ->
| </mbean>
| -->
|
| <!-- JBoss Transactions JTA -->
| <mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
| name="jboss:service=TransactionManager">
| <attribute name="TransactionTimeout">400</attribute>
| <attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute>
| </mbean>
|
|
|
Also, since we are developing the code in Java, we have found some of the following properties that are configured in our code :
|
| timeout.TestTimeOut_Service service = new timeout.TestTimeOut_Service();
| timeout.TestTimeOut port = service.getTestTimeOutPort();
|
| ((BindingProvider)port).getRequestContext().
| put("com.sun.xml.ws.request.timeout", 4*60*1000);
|
| ((BindingProvider)port).getRequestContext().put(
| BindingProviderProperties.REQUEST_TIMEOUT,
| 4*60*1000);
|
| ((BindingProvider)port).getRequestContext().put(
| BindingProviderProperties.CONNECT_TIMEOUT,
| 4*60*1000);
|
| ((BindingProvider)port).getRequestContext().put(
| "com.ibm.SOAP.requestTimeout",
| 4*60*1000);
| ((BindingProvider)port).getRequestContext().put(
| "org.jboss.webservice.timeout",
| 4*60*1000);
|
| ((BindingProvider)port).getRequestContext().put(
| "org.jboss.webservice.client.timeout",
| 4*60*1000);
| ((BindingProvider)port).getRequestContext().put(
| "org.jboss.ws.timeout",
| 4*60*1000);
|
|
where, the "TestTimeOut_Service" is the WebService name and the 'port' object is the WebService Port for the "TestTimeOut_Service". We are using NetBeans for developing. And this code change does not help us in increasing the timeout because the WebService A throws a transfer timeout at about 120 seconds almost always.
Please suggest a proper place where we can set the client timeout when calling other
webservices.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171508#4171508
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171508
16 years, 6 months
[JBossWS] - Re: IllegalStateException Cannot find property
by gryffin
Here's the relevant part of the port class,
/**
| * This class was generated by the JAX-WS RI.
| * JAX-WS RI 2.1.3-b02-
| * Generated source version: 2.0
| *
| */
| @WebService(name = "AssetAPIServicePortType", targetNamespace = "http://service.api.mobileview.aeroscout.com")
| public interface AssetAPIServicePortType {
|
|
| /**
| *
| * @param in0
| * @return
| * returns com.boeing.nmt.foo.AssetDTO
| */
| @WebMethod
| @WebResult(name = "out", targetNamespace = "http://service.api.mobileview.aeroscout.com")
| @RequestWrapper(localName = "update", targetNamespace = "http://service.api.mobileview.aeroscout.com", className = "com.boeing.nmt.foo.Update")
| @ResponseWrapper(localName = "updateResponse", targetNamespace = "http://service.api.mobileview.aeroscout.com", className = "com.boeing.nmt.foo.UpdateResponse")
| public AssetDTO update(
| @WebParam(name = "in0", targetNamespace = "http://service.api.mobileview.aeroscout.com")
| AssetDTO in0);
And here's the Update class itself. Perhaps I'm missing some namespace value in here?
| package com.boeing.nmt.foo;
|
| import java.io.Serializable;
| import javax.xml.bind.annotation.XmlAccessType;
| import javax.xml.bind.annotation.XmlAccessorType;
| import javax.xml.bind.annotation.XmlElement;
| import javax.xml.bind.annotation.XmlRootElement;
| import javax.xml.bind.annotation.XmlType;
|
|
| /**
| * <p>Java class for anonymous complex type.
| *
| * <p>The following schema fragment specifies the expected content contained within this class.
| *
| * <pre>
| * <complexType>
| * <complexContent>
| * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
| * <sequence>
| * <element name="in0" type="{http://dto.api.mobileview.aeroscout.com}UserDTO"/>
| * </sequence>
| * </restriction>
| * </complexContent>
| * </complexType>
| * </pre>
| *
| *
| */
| @XmlAccessorType(XmlAccessType.FIELD)
| @XmlType(name = "", propOrder = {
| "in0"
| })
| @XmlRootElement(name = "update", namespace = "http://service.api.mobileview.aeroscout.com")
| public class Update
| implements Serializable
| {
|
| private final static long serialVersionUID = 1L;
| @XmlElement(namespace = "http://service.api.mobileview.aeroscout.com", required = true, nillable = true)
| protected UserDTO in0;
|
| /**
| * Gets the value of the in0 property.
| *
| * @return
| * possible object is
| * {@link UserDTO }
| *
| */
| public UserDTO getIn0() {
| return in0;
| }
|
| /**
| * Sets the value of the in0 property.
| *
| * @param value
| * allowed object is
| * {@link UserDTO }
| *
| */
| public void setIn0(UserDTO value) {
| this.in0 = value;
| }
|
| }
|
This code was generated by wsconsume from the JBossWS package. I used a jaxb binding file with generateElementProperty="false" .
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171384#4171384
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171384
16 years, 6 months
[JBossWS] - IllegalStateException Cannot find property
by gryffin
I am using JBoss 4.2.2 w/ JbossWS Native 3.0.2. After some toil I got a client based on this config working, but then I run into this error which no one else seems to have run into.
I called a ws to retrieve an AssDTO, I updat the AssetDTO, then call the ws' 'update' method passing it back the updated AssetDTO and it barfs with this un-descriptive error.
Has anyone else seen this? Thanks!
Exception in thread "main" javax.xml.ws.WebServiceException: java.lang.IllegalStateException: Cannot find property: javax.xml.ws.handler.message.outbound
| at org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:410)
| at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:316)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:172)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:152)
| at $Proxy18.update(Unknown Source)
| at com.boeing.nmt.nls.mv4client.MV4Client.deleteAssociationsForAsset(MV4Client.java:234)
| at com.boeing.nmt.nls.test.AssetTest.main(AssetTest.java:22)
| Caused by: java.lang.IllegalStateException: Cannot find property: javax.xml.ws.handler.message.outbound
| at org.jboss.ws.core.jaxws.handler.MessageContextJAXWS.processPivot(MessageContextJAXWS.java:109)
| at org.jboss.ws.core.jaxws.client.ClientImpl.processPivot(ClientImpl.java:369)
| at org.jboss.ws.core.CommonClient.processPivotInternal(CommonClient.java:479)
| at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:407)
| at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:304)
| ... 5 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171382#4171382
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171382
16 years, 6 months
[JBossWS] - Re: Providing your own wsdl instead of the generated one.
by JBossWS_NewBee
Looks like I am out of luck again :(
Oh! this is so frustrating..
So, I made the following update to my wsdl:
| <service name='EchoService'>
| <documentation>Congrats! You have published your own WSDL!</documentation>
| <port binding='tns:EchoBinding' name='EchoPort'>
| <soap:address location='http://localhost:8080/echo'/>
| </port>
| </service>
packaged the war and deployed it and now I see this error in the JBossConsole:
| 12:38:28,359 INFO [WSDLFilePublisher] WSDL published to: file:/C:/sfsl/runtime/
| localhost/workstation/jboss/data/wsdl/echo.war/EchoService.wsdl
| 12:38:28,359 ERROR [ServiceEndpointDeployer] Cannot start service endpoint
| org.jboss.ws.WSException: Cannot load service endpoint interface: echo.Echo
| at org.jboss.ws.metadata.umdm.EndpointMetaData.getServiceEndpointInterfa
| ce(EndpointMetaData.java:238)
| at org.jboss.ws.metadata.umdm.EndpointMetaData.eagerInitializeOperations
| (EndpointMetaData.java:510)
| at org.jboss.ws.metadata.umdm.EndpointMetaData.initializeInternal(Endpoi
| ntMetaData.java:504)
| at org.jboss.ws.metadata.umdm.EndpointMetaData.eagerInitialize(EndpointM
| etaData.java:492)
| at org.jboss.ws.metadata.umdm.ServiceMetaData.eagerInitialize(ServiceMet
| aData.java:429)
| at org.jboss.ws.metadata.umdm.UnifiedMetaData.eagerInitialize(UnifiedMet
| aData.java:192)
| at org.jboss.ws.core.server.ServiceEndpoint.start(ServiceEndpoint.java:1
| 12)
| at org.jboss.ws.core.server.ServiceEndpointManager.startServiceEndpoint(
| ServiceEndpointManager.java:702)
| at org.jboss.ws.core.server.ServiceEndpointDeployer.start(ServiceEndpoin
| tDeployer.java:140)
| at org.jboss.ws.integration.jboss42.DeployerInterceptor.startServiceEndp
| oint(DeployerInterceptor.java:144)
| at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerIn
| terceptor.java:96)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
| start(SubDeployerInterceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
| ptor.java:95)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
| java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy47.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
| er.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
| or.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
| BeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
| java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy10.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
| tScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
| canner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
| doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
| bstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
| upport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
| eanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
| er.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
| java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
| ler.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
| er.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
| java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
| er.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
| or.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
| BeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
| java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:508)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.ClassNotFoundException: echo.Echo
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
| der.java:1358)
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
| der.java:1204)
| at org.jboss.ws.metadata.umdm.EndpointMetaData.getServiceEndpointInterfa
| ce(EndpointMetaData.java:229)
| ... 84 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171379#4171379
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171379
16 years, 6 months