Author: keith
Date: Wed Apr 2 05:49:12 2008
New Revision: 15491
Log:
Code formating
Modified:
trunk/mashup/java/modules/hostobjects/src/org/wso2/mashup/hostobjects/wsrequest/WSRequestHostImpl.java
Modified:
trunk/mashup/java/modules/hostobjects/src/org/wso2/mashup/hostobjects/wsrequest/WSRequestHostImpl.java
==============================================================================
---
trunk/mashup/java/modules/hostobjects/src/org/wso2/mashup/hostobjects/wsrequest/WSRequestHostImpl.java
(original)
+++
trunk/mashup/java/modules/hostobjects/src/org/wso2/mashup/hostobjects/wsrequest/WSRequestHostImpl.java
Wed Apr 2 05:49:12 2008
@@ -233,85 +233,94 @@
ConfigurationContext defaultConfigurationContext =
ConfigurationContextFactory.createDefaultConfigurationContext();
wsRequest.sender =
- new ServiceClient(defaultConfigurationContext, new
URL(url), service, endpointName);
+ new ServiceClient(defaultConfigurationContext, new
URL(url), service,
+ endpointName);
} catch (MalformedURLException e) {
throw new MashupFault(e);
} catch (Exception e) {
throw new MashupFault(e);
}
} else {
- if (arguments[0] instanceof String) {
- httpMethod = (String) arguments[0];
- } else if (arguments[0] instanceof NativeArray) {
- optionsArray = (NativeArray) arguments[0];
- Object useSOAPObject = optionsArray.get("useSOAP", optionsArray);
- if (useSOAPObject != null && !(useSOAPObject instanceof Undefined)
- && !(useSOAPObject instanceof UniqueTag)) {
- useSOAP = useSOAPObject.toString();
- }
+ if (arguments[0] instanceof String) {
+ httpMethod = (String) arguments[0];
+ } else if (arguments[0] instanceof NativeArray) {
+ optionsArray = (NativeArray) arguments[0];
+ Object useSOAPObject = optionsArray.get("useSOAP",
optionsArray);
+ if (useSOAPObject != null && !(useSOAPObject instanceof
Undefined)
+ && !(useSOAPObject instanceof UniqueTag)) {
+ useSOAP = useSOAPObject.toString();
+ }
- Object hTTPMethodObject = optionsArray.get("HTTPMethod",
optionsArray);
- if (hTTPMethodObject != null && !(hTTPMethodObject instanceof
Undefined)
- && !(hTTPMethodObject instanceof UniqueTag)) {
- httpMethod = hTTPMethodObject.toString();
- }
+ Object hTTPMethodObject = optionsArray.get("HTTPMethod",
optionsArray);
+ if (hTTPMethodObject != null && !(hTTPMethodObject instanceof
Undefined)
+ && !(hTTPMethodObject instanceof UniqueTag)) {
+ httpMethod = hTTPMethodObject.toString();
+ }
- Object useWSAObject = optionsArray.get("useWSA", optionsArray);
- if (useWSAObject != null && !(useWSAObject instanceof Undefined)
- && !(useWSAObject instanceof UniqueTag)) {
- useWSA = useWSAObject.toString();
- }
+ Object useWSAObject = optionsArray.get("useWSA", optionsArray);
+ if (useWSAObject != null && !(useWSAObject instanceof
Undefined)
+ && !(useWSAObject instanceof UniqueTag)) {
+ useWSA = useWSAObject.toString();
+ }
- Object useWSSObject = optionsArray.get("useWSS", optionsArray);
- if (useWSSObject != null && !(useWSSObject instanceof Undefined)
- && !(useWSSObject instanceof UniqueTag)) {
- useWSS = useWSSObject.toString();
- }
+ Object useWSSObject = optionsArray.get("useWSS", optionsArray);
+ if (useWSSObject != null && !(useWSSObject instanceof
Undefined)
+ && !(useWSSObject instanceof UniqueTag)) {
+ useWSS = useWSSObject.toString();
+ }
- Object actionObject = optionsArray.get("action", optionsArray);
- if (actionObject != null && !(actionObject instanceof Undefined)
- && !(actionObject instanceof UniqueTag)) {
- action = actionObject.toString();
- }
+ Object actionObject = optionsArray.get("action", optionsArray);
+ if (actionObject != null && !(actionObject instanceof
Undefined)
+ && !(actionObject instanceof UniqueTag)) {
+ action = actionObject.toString();
+ }
- Object httpLocationObject = optionsArray.get("HTTPLocation",
optionsArray);
- if (httpLocationObject != null && !(httpLocationObject instanceof
Undefined)
- && !(httpLocationObject instanceof UniqueTag)) {
- httpLocation = httpLocationObject.toString();
- }
+ Object httpLocationObject = optionsArray.get("HTTPLocation",
optionsArray);
+ if (httpLocationObject != null && !(httpLocationObject
instanceof Undefined)
+ && !(httpLocationObject instanceof UniqueTag)) {
+ httpLocation = httpLocationObject.toString();
+ }
- Object httpLocationIgnoreUncitedObject =
optionsArray.get("HTTPLocationIgnoreUncited", optionsArray);
- if (httpLocationIgnoreUncitedObject != null &&
!(httpLocationIgnoreUncitedObject instanceof Undefined)
- && !(httpLocationIgnoreUncitedObject instanceof
UniqueTag)) {
- httpLocationIgnoreUncited =
httpLocationIgnoreUncitedObject.toString();
- }
+ Object httpLocationIgnoreUncitedObject =
+ optionsArray.get("HTTPLocationIgnoreUncited",
optionsArray);
+ if (httpLocationIgnoreUncitedObject != null &&
+ !(httpLocationIgnoreUncitedObject instanceof Undefined)
+ && !(httpLocationIgnoreUncitedObject instanceof
UniqueTag)) {
+ httpLocationIgnoreUncited =
httpLocationIgnoreUncitedObject.toString();
+ }
- Object httpQueryParameterSeparatorObject =
optionsArray.get("HTTPQueryParameterSeparator", optionsArray);
- if (httpQueryParameterSeparatorObject != null &&
!(httpQueryParameterSeparatorObject instanceof Undefined)
- && !(httpQueryParameterSeparatorObject instanceof
UniqueTag)) {
- httpQueryParameterSeparator =
httpQueryParameterSeparatorObject.toString();
- }
+ Object httpQueryParameterSeparatorObject =
+ optionsArray.get("HTTPQueryParameterSeparator",
optionsArray);
+ if (httpQueryParameterSeparatorObject != null &&
+ !(httpQueryParameterSeparatorObject instanceof
Undefined)
+ && !(httpQueryParameterSeparatorObject instanceof
UniqueTag)) {
+ httpQueryParameterSeparator =
httpQueryParameterSeparatorObject.toString();
+ }
- Object httpInputSerializationObject =
optionsArray.get("HTTPInputSerialization", optionsArray);
- if (httpInputSerializationObject != null &&
!(httpInputSerializationObject instanceof Undefined)
- && !(httpInputSerializationObject instanceof UniqueTag)) {
- httpInputSerialization =
httpInputSerializationObject.toString();
- }
+ Object httpInputSerializationObject =
+ optionsArray.get("HTTPInputSerialization",
optionsArray);
+ if (httpInputSerializationObject != null &&
+ !(httpInputSerializationObject instanceof Undefined)
+ && !(httpInputSerializationObject instanceof
UniqueTag)) {
+ httpInputSerialization =
httpInputSerializationObject.toString();
+ }
- Object HTTPContentEncodingObject =
optionsArray.get("HTTPContentEncoding", optionsArray);
- if (HTTPContentEncodingObject != null &&
!(HTTPContentEncodingObject instanceof Undefined)
- && !(HTTPContentEncodingObject instanceof UniqueTag)) {
- httpLocation = HTTPContentEncodingObject.toString();
+ Object HTTPContentEncodingObject =
+ optionsArray.get("HTTPContentEncoding", optionsArray);
+ if (HTTPContentEncodingObject != null &&
+ !(HTTPContentEncodingObject instanceof Undefined)
+ && !(HTTPContentEncodingObject instanceof UniqueTag)) {
+ httpLocation = HTTPContentEncodingObject.toString();
+ }
+
+ } else {
+ throw Context.reportRuntimeError("INVALID_SYNTAX_EXCEPTION");
+ }
+ if (arguments[1] instanceof String) {
+ url = (String) arguments[1];
+ } else {
+ throw Context.reportRuntimeError("INVALID_SYNTAX_EXCEPTION");
}
-
- } else {
- throw Context.reportRuntimeError("INVALID_SYNTAX_EXCEPTION");
- }
- if (arguments[1] instanceof String) {
- url = (String) arguments[1];
- } else {
- throw Context.reportRuntimeError("INVALID_SYNTAX_EXCEPTION");
- }
Object object =
cx.getThreadLocal(JavaScriptEngineConstants.AXIS2_MESSAGECONTEXT);
if (!(object instanceof MessageContext)) {
MessageContext messageContext = (MessageContext) object;
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev