Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Commit

Permalink
Refactored code.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.wso2.org/repos/wso2/trunk/wsf@67630 a5903396-d722-0410-b921-86c7d4935375
  • Loading branch information
heshan committed Jun 5, 2010
1 parent 726e8e0 commit a673bc9
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Iterator;

public class WSClient {
private ServiceClient client = null;
Expand Down Expand Up @@ -88,9 +87,8 @@ public WSClient(PyDictionary pyDict, String pyFile) throws WSFault {

options = new Options();

Iterator it = map.keySet().iterator();
while (it.hasNext()) {
String key = (String) it.next();
for (Object o : map.keySet()) {
String key = (String) o;
//System.out.println("\nKey2 " + key + " === Value " +/*(String)*/ map.get(key));
if ("to".equalsIgnoreCase(key)) { // Setting End Point Reference
options.setTo(new EndpointReference((String) map.get(key)));
Expand Down Expand Up @@ -179,8 +177,8 @@ public OMElement request(Object opt) throws WSFault {
String strTemp[];
map = new HashMap<String, String>();

for (int i = 0; i < str.length; i++) {
strTemp = str[i].split(":");
for (String aStr : str) {
strTemp = aStr.split(":");
map.put(strTemp[0].trim(), strTemp[1].trim());
}

Expand Down Expand Up @@ -214,11 +212,9 @@ public OMElement request(Object opt) throws WSFault {

// if attachments are available , add them to the OMElement
if (hasAttachments) {
Iterator<String> k2 = map.keySet().iterator();
while (k2.hasNext()) {
String key2 = k2.next();
for (String key : map.keySet()) {
//System.out.println("key" + key2 + "||" + map.get(key2));
FileDataSource fileDataSource = new FileDataSource(map.get(key2));
FileDataSource fileDataSource = new FileDataSource(map.get(key));
DataHandler expectedDataHandler = new DataHandler(fileDataSource);
OMFactory factory = OMAbstractFactory.getOMFactory();
OMTextImpl expectedTextData = new OMTextImpl(expectedDataHandler, true, factory);
Expand Down

0 comments on commit a673bc9

Please sign in to comment.