Subversion Repositories XServices

Rev

Rev 127 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 127 Rev 158
Line 27... Line 27...
27
import java.util.Iterator;
27
import java.util.Iterator;
28
import java.util.List;
28
import java.util.List;
29
import java.util.StringTokenizer;
29
import java.util.StringTokenizer;
Line 30... Line 30...
30
 
30
 
-
 
31
import javax.jws.WebService;
31
import javax.jws.WebService;
32
import javax.ws.rs.NotAuthorizedException;
32
import javax.xml.namespace.QName;
33
import javax.xml.namespace.QName;
33
import javax.xml.stream.XMLOutputFactory;
34
import javax.xml.stream.XMLOutputFactory;
34
import javax.xml.stream.XMLStreamException;
35
import javax.xml.stream.XMLStreamException;
35
import javax.xml.stream.XMLStreamReader;
36
import javax.xml.stream.XMLStreamReader;
Line -... Line 37...
-
 
37
import javax.xml.stream.XMLStreamWriter;
36
import javax.xml.stream.XMLStreamWriter;
38
 
37
 
39
import net.brutex.xservices.security.DirectoryPermission;
38
import net.brutex.xservices.types.AttributeType;
40
import net.brutex.xservices.types.AttributeType;
39
import net.brutex.xservices.types.NamespaceListType;
41
import net.brutex.xservices.types.NamespaceListType;
40
import net.brutex.xservices.types.NamespaceType;
42
import net.brutex.xservices.types.NamespaceType;
41
import net.brutex.xservices.types.StringSplitType;
43
import net.brutex.xservices.types.StringSplitType;
42
import net.brutex.xservices.types.ant.FileResource;
44
import net.brutex.xservices.types.ant.FileResource;
-
 
45
import net.brutex.xservices.ws.XServicesFault;
43
import net.brutex.xservices.ws.XServicesFault;
46
import net.brutex.xservices.ws.XmlService;
44
import net.brutex.xservices.ws.XmlService;
47
 
45
import org.apache.axiom.om.OMAbstractFactory;
48
import org.apache.axiom.om.OMAbstractFactory;
46
import org.apache.axiom.om.OMAttribute;
49
import org.apache.axiom.om.OMAttribute;
47
import org.apache.axiom.om.OMCloneOptions;
50
import org.apache.axiom.om.OMCloneOptions;
Line 54... Line 57...
54
import org.apache.axiom.om.OMProcessingInstruction;
57
import org.apache.axiom.om.OMProcessingInstruction;
55
import org.apache.axiom.om.OMText;
58
import org.apache.axiom.om.OMText;
56
import org.apache.axiom.om.OMXMLBuilderFactory;
59
import org.apache.axiom.om.OMXMLBuilderFactory;
57
import org.apache.axiom.om.xpath.AXIOMXPath;
60
import org.apache.axiom.om.xpath.AXIOMXPath;
58
import org.apache.log4j.Logger;
61
import org.apache.log4j.Logger;
-
 
62
import org.apache.shiro.SecurityUtils;
-
 
63
import org.apache.shiro.authz.UnauthorizedException;
59
import org.jaxen.JaxenException;
64
import org.jaxen.JaxenException;
60
import org.jaxen.SimpleNamespaceContext;
65
import org.jaxen.SimpleNamespaceContext;
Line 61... Line 66...
61
 
66
 
62
/**
67
/**
Line 418... Line 423...
418
		return xmldocument;
423
		return xmldocument;
419
	}
424
	}
Line 420... Line 425...
420
 
425
 
-
 
426
 
421
 
427
	private OMDocument replaceNodes(OMDocument xmldocument, AXIOMXPath axp, OMDocument xmlfragment) throws XServicesFault {
422
	private OMDocument replaceNodes(OMDocument xmldocument, AXIOMXPath axp, OMDocument xmlfragment) throws XServicesFault {
428
		
423
		List<?> olist = null;
429
		List<?> olist = null;
424
		try {
430
		try {
425
			olist = axp.selectNodes(xmldocument.getOMDocumentElement());
431
			olist = axp.selectNodes(xmldocument.getOMDocumentElement());
Line 467... Line 473...
467
				throw new XServicesFault(Messages.getString("XmlService.12"));
473
				throw new XServicesFault(Messages.getString("XmlService.12"));
468
			}
474
			}
Line 469... Line 475...
469
 
475
 
470
			while (children.hasNext()) {
476
			while (children.hasNext()) {
471
				OMNode container = (OMNode) children.next();
477
				OMNode container = (OMNode) children.next();
472
				match.insertSiblingAfter((OMNode) container.clone(new OMCloneOptions()));
478
				match.insertSiblingBefore((OMNode) container.clone(new OMCloneOptions()));
473
			}
479
			}
474
			match.detach();
480
			match.detach();
475
		}
481
		}
476
		xmldocument.build();
482
		xmldocument.build();
Line 501... Line 507...
501
			throw new XServicesFault("Endcoding '"+encoding+"' is not supported by this JRE.");
507
			throw new XServicesFault("Endcoding '"+encoding+"' is not supported by this JRE.");
502
		}
508
		}
503
		logger.debug("Setting source xml string encoding to '"+encoding+"'");
509
		logger.debug("Setting source xml string encoding to '"+encoding+"'");
504
		return encoding;
510
		return encoding;
505
	}
511
	}
-
 
512
	
-
 
513
 
506
}
514
}