[Spring Integration] - Application with ws client return an exception with spring
by Marcos Simón
Marcos Simón [http://community.jboss.org/people/marsim86] created the discussion
"Application with ws client return an exception with spring"
To view the discussion, visit: http://community.jboss.org/message/560700#560700
--------------------------------------------------------------
Hi,
I got an application that runs over JBoss 6 M4, with Spring and JSF that works fine.
But now I got other applicaction (that will run in the same server) that I have to install spring. This application call to webservice and it do well, but when I put spring jar file (just only the file, without change the configurations), the application returns an exception:
javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError: org/springframework/beans/BeansException
at javax.faces.component.MethodBindingMethodExpressionAdapter.i nvoke(MethodBindingMethodExpressionAdapter.java:102)
at com.sun.faces.application.ActionListenerImpl.processAction(A ctionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:315 )
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot. java:775)
at javax.faces.component.UIViewRoot.processApplication(UIViewRo ot.java:1267)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(Invok eApplicationPhase.java:82)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl. java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:31 2)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:324)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:242)
at org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.d oFilter(FilterDispatcher.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:274)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:242)
at org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:275)
at org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invok e(SecurityAssociationValve.java:181)
at org.jboss.modcluster.catalina.CatalinaContext$RequestListene rValve.event(CatalinaContext.java:285)
at org.jboss.modcluster.catalina.CatalinaContext$RequestListene rValve.invoke(CatalinaContext.java:261)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccCo ntextValve.java:88)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentVa lve.invoke(SecurityContextEstablishmentValve.java:93)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invok e(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:109)
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCa cheValve.invoke(ActiveRequestResponseCacheValve.java:53)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:362)
at org.apache.coyote.http11.Http11Processor.process(Http11Proce ssor.java:877)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHand ler.process(Http11Protocol.java:653)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoin t.java:951)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/BeansException
at org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFacto ry.getSpringBusFactory(JBossWSBusFactory.java:121)
at org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFacto ry.createBus(JBossWSBusFactory.java:54)
at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:69)& lt; br /> at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.jav a:106)
at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.jav a:97)
at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate( ProviderImpl.java:62)
at javax.xml.ws.Service.(Service.java:57)
at diz.relev3.integ.sicof2.IntegSicof2.*(IntegSicof2.jav a:43)*
at com.datinza.web.beans.PacienteBean.conexionGAIA(PacienteBean .java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.el.parser.AstValue.invoke(AstValue.java:196)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionIm pl.java:276)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMeth odExpression.java:98)
at javax.faces.component.MethodBindingMethodExpressionAdapter.i nvoke(MethodBindingMethodExpressionAdapter.java:88)
... 30 more
Caused by: java.lang.ClassNotFoundException: org.springframework.beans.BeansException from BaseClassLoader@1069693{vfs:///C:/Desarrollo/jboss-6.0.0.201 00721-M4/server/default/conf/jboss-service.xml}
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(Bas eClassLoader.java:480)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 47 more
My code just call IngegSicof2 constructor, and as I said before it works fine if the spring isn't loaded. I´ve configure correctly spring (unless as I think is the correct form) but the exception goes on.
/**
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.2-12/14/2009 02:16 PM(ramkris)-
* Generated source version: 2.2
*
*/
//@WebServiceClient(name = "integ-sicof2", targetNamespace = "diz.relev3.integ.sicof2", wsdlLocation = "http://localhost:8080/integ_sicof2/servicios?wsdl")
@WebServiceClient(name = "integ-sicof2", targetNamespace = "diz.relev3.integ.sicof2", wsdlLocation = "http://10.1.1.2:8080/integ_sicof2/servicios?wsdl")
public class IntegSicof2
extends Service
{
private final static URL INTEGSICOF2_WSDL_LOCATION;
private final static WebServiceException INTEGSICOF2_EXCEPTION;
private final static QName INTEGSICOF2_QNAME = new QName("diz.relev3.integ.sicof2", "integ-sicof2");
static {
URL url = null;
WebServiceException e = null;
try {
url = new URL("http://10.1.1.2:8080/integ_sicof2/servicios?wsdl");
} catch (MalformedURLException ex) {
e.printStackTrace();
e = new WebServiceException(ex);
}
INTEGSICOF2_WSDL_LOCATION = url;
INTEGSICOF2_EXCEPTION = e;
}
public IntegSicof2() {
super(__getWsdlLocation(), INTEGSICOF2_QNAME);
}
...
}
package diz.relev3.integ.sicof2;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceFeature;
/**
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.2-12/14/2009 02:16 PM(ramkris)-
* Generated source version: 2.2
*
*/
//@WebServiceClient(name = "integ-sicof2", targetNamespace = "diz.relev3.integ.sicof2", wsdlLocation = " http://localhost:8080/integ_sicof2/servicios?wsdl http://localhost:8080/integ_sicof2/servicios?wsdl")
//@WebServiceClient(name = "integ-sicof2", targetNamespace = "diz.relev3.integ.sicof2", wsdlLocation = " http://10.1.1.2:8080/integ_sicof2/servicios?wsdl http://10.1.1.2:8080/integ_sicof2/servicios?wsdl")
public class IntegSicof2
extends Service
{
private final static URL INTEGSICOF2_WSDL_LOCATION;
private final static WebServiceException INTEGSICOF2_EXCEPTION;
private final static QName INTEGSICOF2_QNAME = new QName("diz.relev3.integ.sicof2", "integ-sicof2");
static {
System.out.println("URL url = null;");
URL url = null;
System.out.println(" WebServiceException e = null;");
WebServiceException e = null;
System.out.println("try");
try {
System.out.println("url = new URL(\" http://10.1.1.2:8080/integ_sicof2/servicios?wsdl http://10.1.1.2:8080/integ_sicof2/servicios?wsdl\");");
url = new URL(" http://10.1.1.2:8080/integ_sicof2/servicios?wsdl http://10.1.1.2:8080/integ_sicof2/servicios?wsdl");
System.out.println("Ha hecho la url ok.");
} catch (MalformedURLException ex) {
System.out.println("catch (MalformedURLException ex) {");
e.printStackTrace();
e = new WebServiceException(ex);
}
System.out.println("INTEGSICOF2_WSDL_LOCATION = url;");
INTEGSICOF2_WSDL_LOCATION = url;
System.out.println("INTEGSICOF2_EXCEPTION = e;");
INTEGSICOF2_EXCEPTION = e;
System.out.println("He llegado al final del static");
}
public IntegSicof2() {
super(__getWsdlLocation(), INTEGSICOF2_QNAME);
System.out.println("super(__getWsdlLocation(), INTEGSICOF2_QNAME);");
}
/*
public IntegSicof2(WebServiceFeature... features) {
super(__getWsdlLocation(), INTEGSICOF2_QNAME, features);
}
*/
public IntegSicof2(URL wsdlLocation) {
super(wsdlLocation, INTEGSICOF2_QNAME);
}
/*
public IntegSicof2(URL wsdlLocation, WebServiceFeature... features) {
super(wsdlLocation, INTEGSICOF2_QNAME, features);
}
*/
public IntegSicof2(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
/*
public IntegSicof2(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
super(wsdlLocation, serviceName, features);
}
*/
/**
*
* @return
* returns IntegSicof2SOAP
*/
//@WebEndpoint(name = "integ-sicof2SOAP")
public IntegSicof2SOAP getIntegSicof2SOAP() {
return super.getPort(new QName("diz.relev3.integ.sicof2", "integ-sicof2SOAP"), IntegSicof2SOAP.class);
}
/**
*
* @param features
* A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
* @return
* returns IntegSicof2SOAP
*/
//@WebEndpoint(name = "integ-sicof2SOAP")
public IntegSicof2SOAP getIntegSicof2SOAP(WebServiceFeature... features) {
return super.getPort(new QName("diz.relev3.integ.sicof2", "integ-sicof2SOAP"), IntegSicof2SOAP.class, features);
}
private static URL __getWsdlLocation() {
if (INTEGSICOF2_EXCEPTION!= null) {
throw INTEGSICOF2_EXCEPTION;
}
return INTEGSICOF2_WSDL_LOCATION;
}
}
This class was generated automaticaly by the JAX-WS, and I try to quit annotations and other changes, but nothing.
An other thing that I don`t understand is although I put the call into try/catch block, the exception is not catched, and it goes up until the navigator.
I think the exception isn't launched by webservice call, but if it don't launch the exception, what do it?, when I debug (and the stacktrace says the same) the exception appears when this code line is executed.
I will be very grateful with any help, I think I will go mad.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/560700#560700]
Start a new discussion in Spring Integration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[JBoss Messaging] - Broken pipe during high message load.
by Jeremy Whiting
Jeremy Whiting [http://community.jboss.org/people/whitingjr] created the discussion
"Broken pipe during high message load."
To view the discussion, visit: http://community.jboss.org/message/563802#563802
--------------------------------------------------------------
Hi,
I am running SPECjms2007 benchmark against JBoss Messaging. The benchmark is detecting an error during the benchmark run. This issue has been reported previously on the forum though the issue should be fixed in the current latest (as of Sept 2010) release.
The client side reports the following problem.
SM_Interaction4DR_17_EHID_2: Uncaught exception.
org.jboss.jms.exception.MessagingTransactionRolledBackException: Failed to invoke
at org.jboss.jms.tx.ResourceManager.commitLocal(ResourceManager.java:225)
at org.jboss.jms.client.container.SessionAspect.handleCommit(SessionAspect.java:582)
at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect_z_handleCommit_72769750.invoke(SessionAspect_z_handleCommit_72769750.java)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:172)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.delegate.ClientSessionDelegate.commit(ClientSessionDelegate.java)
at org.jboss.jms.client.JBossSession.commit(JBossSession.java:164)
at org.spec.jms.eventhandler.sm.SM_Interaction4DR.oneIteration(SM_Interaction4DR.java:169)
at org.spec.perfharness.WorkerThread.pace(WorkerThread.java:339)
at org.spec.jms.agents.SPECWorkerThread.pace(SPECWorkerThread.java:979)
at org.spec.jms.agents.SPECWorkerThread.run(SPECWorkerThread.java:750)
at org.spec.jms.eventhandler.sm.SM_Interaction4DR.run(SM_Interaction4DR.java:135)
Caused by: org.jboss.jms.exception.MessagingJMSException: Failed to invoke
at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:271)
at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:205)
at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)
at org.jboss.jms.client.delegate.ClientConnectionDelegate.org$jboss$jms$client$delegate$ClientConnectionDelegate$sendTransaction$aop(ClientConnectionDelegate.java:225)
at org.jboss.jms.client.delegate.ClientConnectionDelegate$sendTransaction_N3268650789275322226.invokeTarget(ClientConnectionDelegate$sendTransaction_N3268650789275322226.java)
at org.jboss.aop.joinpoint.MethodInvocati
on.invokeNext(MethodInvocation.java:111)
at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:92)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:172)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.delegate.ClientConnectionDelegate.sendTransaction(ClientConnectionDelegate.java)
at org.jboss.jms.tx.ResourceManager.commitLocal(ResourceManager.java:206)
... 13 more
Caused by: java.lang.IllegalStateException: Cannot find object in dispatcher with id za1-h9rkileg-1-eafiileg-hcwsz7-100j3
at org.jboss.jms.wireformat.ConnectionSendTransactionRequest.serverInvoke(ConnectionSendTransactionRequest.java:79)
at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:157)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:930)
at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:586)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:216)
at org.jboss.remoting.Client.invoke(Client.java:2034)
at org.jboss.remoting.Client.invoke(Client.java:877)
at org.jboss.remoting.Client.invoke(Client.java:865)
at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)
... 25 more
SM_Interaction4DR_17_EHID_2: Closing producer JBossMessageProducer->ProducerDelegate[921505790, ID=NO_ID_SET]
SM_Interaction4DR_17_EHID_2: Closing session JBossSession->SessionDelegate[1457428868, ID=0b1-i9rkileg-1-eafiileg-hcwsz7-100j3]
SM_Interaction4DR_17_EHID_2: connection-pool: Removing JMS connection from pool JBossConnection->ConnectionDelegate[474307371, ID=za1-h9rkileg-1-eafiileg-hcwsz7-100j3, SID=0]
SM_Interaction4DR_17_EHID_2: STOP
The server log has many Broken Pipe error messages, here is one example
2010-09-27 12:01:25,746 WARN [org.jboss.remoting.transport.bisocket.BisocketClientInvoker] (Timer-4) Unable to send ping: shutting down PingTimerTask
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:132)
at org.jboss.remoting.transport.bisocket.BisocketClientInvoker$PingTimerTask.run(BisocketClientInvoker.java:723)
at java.util.TimerThread.mainLoop(Timer.java:534)
at java.util.TimerThread.run(Timer.java:484)
JBM version:1.4.7.GA
OS:RHEL 5.5
Java:java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.6) (rhel-1.13.b16.el5-x86_64)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)
Database: MySQL 5.1.50 community
Jeremy
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/563802#563802]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 1 month
[JBoss Web Services] - Problem with securing web service with ws security ( username token )
by Łukasz Marczuk
Łukasz Marczuk [http://community.jboss.org/people/lmarczuk] created the discussion
"Problem with securing web service with ws security ( username token )"
To view the discussion, visit: http://community.jboss.org/message/560597#560597
--------------------------------------------------------------
Hello,
I'am trying to secure web service ( from ejb 3.0 stateless bean) and it is not working.
here is my code :
Bean :
@Stateless
@SOAPBinding(style=SOAPBinding.Style.RPC)
@SecurityDomain("JBossWS")
@EndpointConfig(configName = "Standard WSSecurity Endpoint")
@WebService(name="Hello",targetNamespace = " http://test http://test",serviceName = "HelloWSSService")
public class HelloBean implements IHello {
@WebMethod
public String sayHello(String aName) {
return "siemanko " + aName;
}
}
// ... some imports
@Stateless
@SOAPBinding(style=SOAPBinding.Style.RPC)
@SecurityDomain("JBossWS")
@EndpointConfig(configName = "Standard WSSecurity Endpoint")
@WebService(name="Hello",targetNamespace = "http://test",serviceName = "HelloWSSService")
public class HelloBean implements IHello {
@WebMethod
public String sayHello(String aName) {
return "siemanko " + aName;
}
}
interface :
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
@EndpointConfig(configName = "Standard WSSecurity Endpoint")
@WebService(name="Hello",targetNamespace = "http://test",serviceName = "HelloWSSService")
public interface IHello {
String sayHello( String name);
}
In my META-INF folder i put jboss-wsse-server.xml file :
<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/ws-security/config
http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
<config>
<timestamp ttl="300"/>
<requires/>
</config>
</jboss-ws-security>
Now i deploy my app on server and i test it from SoapUI.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:test="http://test">
<soapenv:Header/>
<soapenv:Body>
<test:sayHello>
<arg0>?</arg0>
</test:sayHello>
</soapenv:Body>
</soapenv:Envelope>
And anser :
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<wsse:Security env:mustUnderstand="1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext..." xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...">
<wsu:Timestamp wsu:Id="timestamp">
<wsu:Created>2010-09-06T11:41:38.621Z</wsu:Created>
<wsu:Expires>2010-09-06T11:46:38.621Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</env:Header>
<env:Body>
<test:sayHelloResponse xmlns:test="http://test">
<return>siemanko ?</return>
</test:sayHelloResponse>
</env:Body>
</env:Envelope>
Got any idea why i can't secure my web service like that? i tryid it on jboss 4.2.3 , 5.01, 5.1, and 6 actually i work on 5.0.1 with JBoss Web Services - Native Server 3.3.1.GA.
Mayby i'm skipping some step or jboss-wsse-server.xml is incorect ?
when i put to jboss-wsse-server.xml this :
<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/ws-security/config
http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
<config>
<username/>
<authenticate>
<usernameAuth/>
</authenticate>
</config>
</jboss-ws-security>
Also nothing happend and i'am albe to get response without puting principals in header.
JBossWS is good configured in login-config.xml
Please help.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/560597#560597]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 1 month
[JBoss Remoting] - Re: SSL calls thru a proxy with authentication?
by Matt Carless
Matt Carless [http://community.jboss.org/people/mnccouk] created the discussion
"Re: SSL calls thru a proxy with authentication?"
To view the discussion, visit: http://community.jboss.org/message/563545#563545
--------------------------------------------------------------
I would also like to know how to connect jboss through a proxy that requires authentication.
I have tried
java.net.Authenticator.setDefault(new ProxyAuthenticator("user", "pass"));
System.setProperty("http.proxySet", "true");
System.setProperty("http.proxyHost", "proxy");
System.setProperty("http.proxyPort", "8080");
with this authenticator
import java.net.PasswordAuthentication;
public class ProxyAuthenticator extends java.net.Authenticator{
private String user, password;
public ProxyAuthenticator(String user, String password) {
this.user = user;
this.password = password;
}
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(user, password.toCharArray());
}
}
and I receoive a HTTP 407 proxyauthentication error.
The reason I need to do this is to access an external webservice from within a jboss app.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/563545#563545]
Start a new discussion in JBoss Remoting at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months