[Mashup-dev] svn commit r20322 - branches/mashup/java/1.5/java/modules/hostobjects/src/org/wso2/mashup/hostobjects/wsrequest
keith at wso2.com
keith at wso2.com
Sun Aug 3 08:33:49 PDT 2008
Author: keith
Date: Sun Aug 3 08:33:49 2008
New Revision: 20322
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=20322
Log:
Using the axis2-client.xml to create the configurationContext when the dynamic version of WSRequest is used. This makes it posible to call secured services over transports such as JMS and SMTP as
well.
Modified:
branches/mashup/java/1.5/java/modules/hostobjects/src/org/wso2/mashup/hostobjects/wsrequest/WSRequestHostImpl.java
Modified: branches/mashup/java/1.5/java/modules/hostobjects/src/org/wso2/mashup/hostobjects/wsrequest/WSRequestHostImpl.java
URL: http://wso2.org/svn/browse/wso2/branches/mashup/java/1.5/java/modules/hostobjects/src/org/wso2/mashup/hostobjects/wsrequest/WSRequestHostImpl.java?rev=20322&r1=20321&r2=20322&view=diff
==============================================================================
--- branches/mashup/java/1.5/java/modules/hostobjects/src/org/wso2/mashup/hostobjects/wsrequest/WSRequestHostImpl.java (original)
+++ branches/mashup/java/1.5/java/modules/hostobjects/src/org/wso2/mashup/hostobjects/wsrequest/WSRequestHostImpl.java Sun Aug 3 08:33:49 2008
@@ -34,7 +34,6 @@
import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.AxisEndpoint;
import org.apache.axis2.description.AxisBindingMessage;
-import org.apache.axis2.description.Parameter;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.axis2.transport.http.HttpTransportProperties;
import org.apache.axis2.transport.http.HttpTransportProperties.Authenticator;
@@ -471,7 +470,7 @@
Map ports = service.getPorts();
Port port;
returnPort = null;
- for (Iterator portsIterator = ports.values().iterator(); portsIterator.hasNext();) {
+ for (Iterator portsIterator = ports.values().iterator(); (portsIterator.hasNext() && returnPort == null);) {
port = (Port) portsIterator.next();
List extensibilityElements = port.getExtensibilityElements();
for (int i = 0; i < extensibilityElements.size(); i++) {
@@ -541,13 +540,9 @@
ConfigurationContext configurationContext = ConfigurationContextFactory
.createConfigurationContextFromFileSystem(wso2wsasHome + File.separator +
MashupConstants.WORK_DIRECTORY + File.separator + MashupConstants
- .REPO_DIRECTORY, null);
- ConfigurationContext serverConfigContext = MashupUtils.getClientConfigurationContext();
- Parameter param = serverConfigContext.getAxisConfiguration()
- .getParameter(MashupConstants.PROXY);
- if (param != null) {
- configurationContext.getAxisConfiguration().addParameter(param);
- }
+ .REPO_DIRECTORY, wso2wsasHome + File.separator +
+ MashupConstants.CONFIGURATION_DIR + File.separator +
+ MashupConstants.AXIS2_CLIENT_XML);
wsRequest.sender =
new ServiceClient(configurationContext, definition, serviceQName, endpointName);
if (optionsArray != null) {
@@ -746,7 +741,7 @@
wsRequest.error.jsSet_code(faultCode.toString());
wsRequest.error.jsSet_reason(e.getReason());
throw new MashupFault(e);
- } catch (WSSPolicyException e) {
+ } catch (Exception e) {
wsRequest.error = new WebServiceErrorHostObject();
wsRequest.error.jsSet_detail(e.getMessage());
throw new MashupFault(e);
More information about the Mashup-dev
mailing list