Author: alessio.soldano(a)jboss.com
Date: 2013-02-02 05:00:03 -0500 (Sat, 02 Feb 2013)
New Revision: 486
Modified:
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java
webgui/branches/cdi-jsf/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
webgui/branches/cdi-jsf/src/main/webapp/index.xhtml
Log:
Initial support for BASIC auth
Modified:
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java
===================================================================
---
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java 2013-02-02
09:06:03 UTC (rev 485)
+++
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java 2013-02-02
10:00:03 UTC (rev 486)
@@ -42,6 +42,7 @@
import org.jboss.wise.core.client.WSMethod;
import org.jboss.wise.core.client.WSService;
import org.jboss.wise.core.client.WebParameter;
+import org.jboss.wise.core.client.builder.WSDynamicClientBuilder;
import
org.jboss.wise.core.client.impl.reflection.builder.ReflectionBasedWSDynamicClientBuilder;
import org.jboss.wise.core.exception.InvocationException;
import org.jboss.wise.core.exception.WiseRuntimeException;
@@ -68,6 +69,8 @@
@Inject Conversation conversation;
private WSDynamicClient client;
private String wsdlUrl;
+ private String wsdlUser;
+ private String wsdlPwd;
private List<Service> services;
private String currentOperation;
private TreeNodeImpl inputTree;
@@ -88,7 +91,14 @@
conversation.end();
conversation.begin();
try {
- client = new
ReflectionBasedWSDynamicClientBuilder().verbose(true).messageStream(ps).keepSource(true).maxThreadPoolSize(1).wsdlURL(getWsdlUrl()).build();
+ WSDynamicClientBuilder builder = new
ReflectionBasedWSDynamicClientBuilder().verbose(true).messageStream(ps).keepSource(true).maxThreadPoolSize(1);
+ if (wsdlUser != null && wsdlUser.length() > 0) {
+ builder.userName(wsdlUser);
+ }
+ if (wsdlPwd != null && wsdlPwd.length() > 0) {
+ builder.password(wsdlPwd);
+ }
+ client = builder.wsdlURL(getWsdlUrl()).build();
cleanupTask.addRef(client, System.currentTimeMillis() + CONVERSATION_TIMEOUT, new
CleanupTask.CleanupCallback<WSDynamicClient>() {
@Override
public void cleanup(WSDynamicClient data) {
@@ -286,6 +296,22 @@
this.wsdlUrl = wsdlUrl;
}
+ public String getWsdlUser() {
+ return wsdlUser;
+ }
+
+ public void setWsdlUser(String wsdlUser) {
+ this.wsdlUser = wsdlUser;
+ }
+
+ public String getWsdlPwd() {
+ return wsdlPwd;
+ }
+
+ public void setWsdlPwd(String wsdlPwd) {
+ this.wsdlPwd = wsdlPwd;
+ }
+
public List<Service> getServices() {
return services;
}
Modified: webgui/branches/cdi-jsf/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
===================================================================
---
webgui/branches/cdi-jsf/src/main/webapp/WEB-INF/jboss-deployment-structure.xml 2013-02-02
09:06:03 UTC (rev 485)
+++
webgui/branches/cdi-jsf/src/main/webapp/WEB-INF/jboss-deployment-structure.xml 2013-02-02
10:00:03 UTC (rev 486)
@@ -2,6 +2,8 @@
<deployment>
<dependencies>
<module name="org.jboss.ws.cxf.jbossws-cxf-client"
services="true" export="true"/>
+ <module name="org.jboss.ws.common"/>
+ <module name="org.jboss.common-core"/>
<module name="org.apache.cxf.impl"/> <!-- TODO replace this and
previous dependency with commented one below when removing explicit dep on wise-core-cxf
-->
<!-- <module name="org.jboss.ws.jaxws-client"
services="true" export="true"/> -->
</dependencies>
Modified: webgui/branches/cdi-jsf/src/main/webapp/index.xhtml
===================================================================
--- webgui/branches/cdi-jsf/src/main/webapp/index.xhtml 2013-02-02 09:06:03 UTC (rev 485)
+++ webgui/branches/cdi-jsf/src/main/webapp/index.xhtml 2013-02-02 10:00:03 UTC (rev 486)
@@ -23,6 +23,10 @@
<h:form id="wsdlSelection">
<h:outputLabel value="URL:"
for="wsdlUrlInput"/>
<h:inputText id="wsdlUrlInput"
value="#{clientConversationBean.wsdlUrl}"
onclick="document.getElementById('wsdlSelection:okButton').disabled=false"
/>
+ <h:outputLabel value="User:"
for="wsdlUser"/>
+ <h:inputText id="wsdlUser"
value="#{clientConversationBean.wsdlUser}"
onclick="document.getElementById('wsdlSelection:okButton').disabled=false"
/>
+ <h:outputLabel value="Password:"
for="wsdlPwd"/>
+ <h:inputSecret id="wsdlPwd"
value="#{clientConversationBean.wsdlPwd}"
onclick="document.getElementById('wsdlSelection:okButton').disabled=false"
/>
<a4j:commandButton id="okButton" value="OK"
render="epSelection" action="#{clientConversationBean.readWsdl}"
onclick="this.disabled=true" status="wsdlParseStatus" />
</h:form>
</rich:panel>
Show replies by thread