[JBossWS] - (HTTPS + Basic HTTP Authorization + Proxy Server) and Webser
by VishalPai
Hi,
I have created the same simple hello web service following the same steps as mentioned in the JBOSS chapter 12 document (http://docs.jboss.org/jbossas/jboss4guide/r2/html/ch12.html).
JBOSS version: JBoss [Zion] 4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339.
JBOSSWS version: jbossws-1.0.3.SP1 (date=200609291417).
I have deployed the web service on a external server that lives on the internet. The access from my machine to the server is through a proxy server which is a Microsoft ISA 2004 SP2 on windows 2003 server in cluster mode (two array members).
I am trying to protect the web service through basic HTTP authentication + HTTPS authentication.
I have written two types of clients to the web service.
i) Stub based consumer.
ii) DII based consumer.
Following are the scenarios where these clients fail.
i) Stub based client does not work as soon as I enabled HTTPS on the server.
ii) DII based client works in the above scenario but fails when I enable basic authentication in addition to HTTPS on the server.
iii) ALL WORKS WELL IF THERE IS NO PROXY SERVER FOR STUB BASED CONSUMER. I HAVE NOT TRIED THE SAME FOR DII BASED CONSUMER.
I have set the required user name/password and also set the proxy related properties in my source code.
Following are my findings:
i. DII based mechanism of invoking the web service (All scenarios with proxy server which is a Microsoft ISA).
Works with only HTTP.
Works with only HTTPS.
Works with HTTP + Basic authentication.
Does not work with HTTPS + basic authentication.
ii. Stub based mechanism of invoking the web service (All scenarios with proxy server which is a Microsoft ISA).
Works with only HTTP.
Works with HTTP + Basic authentication.
Does not work with HTTPS.
Does not work with HTTPS + basic authentication. [Follows from above.]
The output that I see is following [I have set the debug property to ssl]:
instantiated an instance of class com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl
After this line my client hangs forever. My thread dump shows that a socket is waiting for read operation to complete. [If needed I can post the dump as well.]
I am in real urgent need of a solution as this scenario has stalled our release.
Thanks in advance Best Regards,
Vishal
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061736#4061736
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061736
17 years, 5 months
[JBossWS] - setHeader and setServerURL, using javax.xml.ws.Service?
by eric@attask.com
Trying to integrate into SalesForce using JBossws1.2 SP1 instead of Axis.
I've generated the java stubs and I can connect just fine. One I login I'm given a new SeverURL and a sessionID. I need to change the location that I connect to and I need to attach the SessionID to the soap Bindings for every subsequent request.
| QName q = new QName("urn:partner.soap.sforce.com", "SforceService");
| SforceService service = new SforceService(urlToWSDL, q);
| LoginResult lr = service.getSoap().login("username", "password");
| System.out.println("lr.getServerUrl() = " + lr.getServerUrl());
| System.out.println("lr.getSessionId() = " + lr.getSessionId());
SforceService extends javax.xml.ws.Service and it was generated by wsconsume from the sales-force partner wsdl.
I need to set the new server url to the lr.getServerUrl and I need to include the lr.getSessionId as a SOAP header.
I can get this to work using Axis but I want to use JBossWS.
--------USING AXIS ---------
SforceService service extends org.apache.axis.client.Stub. The axis org.apache.axis.client.Stub provides _setProperty and setHeader
Example:
| service._setProperty(SoapBindingStub.ENDPOINT_ADDRESS_PROPERTY, serverURL);
and
SessionHeader sessionHeader = new SessionHeader();
| sessionHeader.setSessionId(sessionID);
| // Add the header to the binding stub.
| String sforceURI = new SforceServiceLocator().getServiceName().getNamespaceURI();
| service.setHeader(sforceURI, "SessionHeader", sessionHeader);
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061520#4061520
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061520
17 years, 5 months
[JBossWS] - using a derived class from javax.xml.ws.Service I need to ca
by eric@attask.com
Trying to integrate into SalesForce using JBossws1.2 SP1 instead of Axis.
I've generated the java stubs and I can connect just fine. One I login I'm given a new SeverURL and a sessionID. I need to change the location that I connect to and I need to attach the SessionID to the soap Bindings for every subsequent request.
| QName q = new QName("urn:partner.soap.sforce.com", "SforceService");
| SforceService service = new SforceService(urlToWSDL, q);
| LoginResult lr = service.getSoap().login("username", "password");
| System.out.println("lr.getServerUrl() = " + lr.getServerUrl());
| System.out.println("lr.getSessionId() = " + lr.getSessionId());
SforceService extends javax.xml.ws.Service and was generated by wsconsume from the sales-force partner wsdl.
I need to set the new server url to the lr.getServerUrl and I need to include the lr.getSessionId as a SOAP header.
I can get this to work using Axis but I want to use JBossWS.
--------USING AXIS ---------
SforceService service extends org.apache.axis.client.Stub. The axis org.apache.axis.client.Stub provides _setProperty and setHeader
Example:
| service._setProperty(SoapBindingStub.ENDPOINT_ADDRESS_PROPERTY, serverURL);
and
SessionHeader sessionHeader = new SessionHeader();
| sessionHeader.setSessionId(sessionID);
| // Add the header to the binding stub.
| String sforceURI = new SforceServiceLocator().getServiceName().getNamespaceURI();
| service.setHeader(sforceURI, "SessionHeader", sessionHeader);
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061513#4061513
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061513
17 years, 5 months