java - HttpConduit in Jaxws -
i have little code
servicename = new javax.xml.namespace.qname(uri,routine); portname = new javax.xml.namespace.qname(uri,port); try{ url = new java.net.url(wsdlurl); } catch(java.net.malformedurlexception muwe){ muwe.printstacktrace(); } java.net.authenticator.setdefault(new java.net.authenticator() { @override protected java.net.passwordauthentication getpasswordauthentication() { return new java.net.passwordauthentication( user, pwd.tochararray()); } }); service = javax.xml.ws.service.create(url,servicename); request=""; request+="<?xml version='1.0' encoding='utf-8' standalone='no'?>"; request+=......//xml request dispatch = service.createdispatch(portname,javax.xml.soap.soapmessage.class,javax.xml.ws.service.mode.message); content = new java.io.stringreader(request); input = new javax.xml.transform.stream.streamsource(content); message = javax.xml.soap.messagefactory.newinstance(javax.xml.soap.soapconstants.soap_1_1_protocol).createmessage(); message.getsoappart().setcontent(input); headers = message.getmimeheaders(); headers.addheader("soapaction",soap_azione); message.savechanges(); response = dispatch.invoke(message);
but don't succeed find way pull httpconduit
set correct timeout. tried with:
dispatch.getrequestcontext().put("javax.xml.ws.client.receivetimeout", rectime); dispatch.getrequestcontext().put("javax.xml.ws.client.connectiontimeout", conntime);
this:
dispatch.getrequestcontext().put("com.sun.xml.internal.ws.request.timeout", rectime); dispatch.getrequestcontext().put("com.sun.xml.internal.ws.connect.timeout", conntime);
and last one:
dispatch.getrequestcontext().put("com.sun.xml.ws.request.timeout", rectime); dispatch.getrequestcontext().put("com.sun.xml.ws.connect.timeout", conntime);
but didn't desired behaviour.
how can httpconduit
previous code? in examples there interface request didn't have shape.
thank you.
best regards.
Comments
Post a Comment