[jboss-user] [JBossWS] - Setting org.jboss.ws.timeout on client
zebathon
do-not-reply at jboss.com
Sun Sep 30 19:34:58 EDT 2007
Hello,
I'm trying to set the timeout value on my jax-ws client in Jboss-4.2.1.GA and Jbossws-1.2.1 without success. Any help at all would be much appreciated.
I've tried via jboss-client.xml like so
<jboss-client>
| <jndi-name>jbossws-client</jndi-name>
| <service-ref>
| <service-ref-name>Activity Authorized</service-ref-name>
| <port-component-ref>
| <service-endpoint-interface>com.mycompany.webservices.client.ActivityAuthorizedService</service-endpoint-interface>
| <port-qname>{http://webservices.mycompany.com/}ActivityAuthorized</port-qname>
| <stub-property>
| <name>org.jboss.ws.timeout</name>
| <value>10</value>
| </stub-property>
| </port-component-ref>
| </service-ref>
| </jboss-client>
|
Without luck.
I've also tried programmatically via info from the wiki
| ActivityAuthorized endpoint = service.getActivityAuthorizedPort();
|
| Stub stub = (Stub)endpoint;
| stub._setProperty(StubExt.PROPERTY_CLIENT_TIMEOUT0, "10");
|
But this results in a classcast on the 2nd line.
Here is my generated client service
@WebServiceClient(name = "ActivityAuthorizedService", targetNamespace = "http://webservices.mycompany.com", wsdlLocation = "http://localhost/services-1.0-SNAPSHOT/ActivityAuthorized?wsdl")
| public class ActivityAuthorizedService
| extends Service
| {
|
| private final static URL ACTIVITYAUTHORIZEDSERVICE_WSDL_LOCATION;
|
| static {
| URL url = null;
| try {
| url = new URL("http://localhost/services-1.0-SNAPSHOT/ActivityAuthorized?wsdl");
| } catch (MalformedURLException e) {
| e.printStackTrace();
| }
| ACTIVITYAUTHORIZEDSERVICE_WSDL_LOCATION = url;
| }
|
| public ActivityAuthorizedService(URL wsdlLocation, QName serviceName) {
| super(wsdlLocation, serviceName);
| }
|
| public ActivityAuthorizedService() {
| super(ACTIVITYAUTHORIZEDSERVICE_WSDL_LOCATION, new QName("http://webservices.mycompany.com", "ActivityAuthorizedService"));
| }
|
| /**
| *
| * @return
| * returns ActivityAuthorized
| */
| @WebEndpoint(name = "ActivityAuthorizedPort")
| public ActivityAuthorized getActivityAuthorizedPort() {
| return (ActivityAuthorized)super.getPort(new QName("http://webservices.mycompany.com", "ActivityAuthorizedPort"), ActivityAuthorized.class);
| }@WebServiceClient(name = "ActivityAuthorizedService", targetNamespace = "http://webservices.mycompany.com", wsdlLocation = "http://localhost/services-1.0-SNAPSHOT/ActivityAuthorized?wsdl")
| public class ActivityAuthorizedService
| extends Service
| {
|
| private final static URL ACTIVITYAUTHORIZEDSERVICE_WSDL_LOCATION;
|
| static {
| URL url = null;
| try {
| url = new URL("http://localhost/services-1.0-SNAPSHOT/ActivityAuthorized?wsdl");
| } catch (MalformedURLException e) {
| e.printStackTrace();
| }
| ACTIVITYAUTHORIZEDSERVICE_WSDL_LOCATION = url;
| }
|
| public ActivityAuthorizedService(URL wsdlLocation, QName serviceName) {
| super(wsdlLocation, serviceName);
| }
|
| public ActivityAuthorizedService() {
| super(ACTIVITYAUTHORIZEDSERVICE_WSDL_LOCATION, new QName("http://webservices.mycompany.com", "ActivityAuthorizedService"));
| }
|
| /**
| *
| * @return
| * returns ActivityAuthorized
| */
| @WebEndpoint(name = "ActivityAuthorizedPort")
| public ActivityAuthorized getActivityAuthorizedPort() {
| return (ActivityAuthorized)super.getPort(new QNamwebservicese("http://webservices.mycompany.com", "ActivityAuthorizedPort"), ActivityAuthorized.class);
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090060#4090060
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090060
More information about the jboss-user
mailing list