You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by de...@apache.org on 2006/05/17 15:03:34 UTC
svn commit: r407244 - in
/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2:
description/AxisOperation.java description/AxisService.java
description/AxisService2OM.java engine/Phase.java
Author: deepal
Date: Wed May 17 06:03:33 2006
New Revision: 407244
URL: http://svn.apache.org/viewcvs?rev=407244&view=rev
Log:
-changed few info into debug
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java?rev=407244&r1=407243&r2=407244&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java Wed May 17 06:03:33 2006
@@ -162,7 +162,7 @@
}
}
engagedModules.remove(module);
- log.info("removed module from engaged modules list "
+ log.debug("removed module from engaged modules list "
+ module.getName().getLocalPart());
}
}
@@ -174,7 +174,7 @@
*/
public void removeFromEngageModueList(AxisModule module) {
engagedModules.remove(module);
- log.info("removed module from engaged modules list " + module.getName().getLocalPart());
+ log.debug("removed module from engaged modules list " + module.getName().getLocalPart());
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java?rev=407244&r1=407243&r2=407244&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java Wed May 17 06:03:33 2006
@@ -166,18 +166,18 @@
// Flag representing whether WS-Addressing is required to use this service.
// Reflects the wsaw:UsingAddressing wsdl extension element
private String wsaddressingFlag = AddressingConstants.ADDRESSING_UNSPECIFIED;
-
+
public String getWSAddressingFlag(){
return wsaddressingFlag;
}
-
+
public void setWSAddressingFlag(String ar){
wsaddressingFlag = ar;
if(wsaddressingFlag == null){
wsaddressingFlag = AddressingConstants.ADDRESSING_UNSPECIFIED;
}
}
-
+
public boolean isSchemaLocationsAdjusted() {
return schemaLocationsAdjusted;
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java?rev=407244&r1=407243&r2=407244&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService2OM.java Wed May 17 06:03:33 2006
@@ -1,5 +1,6 @@
package org.apache.axis2.description;
+import org.apache.axiom.om.*;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.StringWriter;
@@ -31,6 +32,16 @@
import org.apache.ws.policy.util.PolicyRegistry;
import org.apache.ws.policy.util.StAXPolicyWriter;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamReader;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+
/*
* Copyright 2004,2005 The Apache Software Foundation.
*
@@ -78,7 +89,7 @@
private boolean generateHttp = false;
public AxisService2OM(AxisService service, String[] serviceURL,
- String style, String use) {
+ String style, String use) {
this.axisService = service;
url = serviceURL;
if (style == null) {
@@ -120,7 +131,7 @@
prefix = DEFAULT_TARGET_NAMESPACE_PREFIX;
}
axisService.getNameSpacesMap().put(prefix,
- axisService.getTargetNamespace());
+ axisService.getTargetNamespace());
tns = ele.declareNamespace(axisService.getTargetNamespace(), prefix);
ele.addAttribute("targetNamespace", axisService.getTargetNamespace(),
@@ -134,9 +145,9 @@
ArrayList schemas = axisService.getSchema();
for (int i = 0; i < schemas.size(); i++) {
StringWriter writer = new StringWriter();
+
// XmlSchema schema = (XmlSchema) schemas.get(i);
XmlSchema schema = axisService.getSchema(i);
-
schema.write(writer);
if (!"".equals(writer.toString())) {
XMLStreamReader xmlReader = StAXUtils
@@ -225,7 +236,7 @@
}
private void generateHeaderMessages(AxisMessage axismessage, OMFactory fac,
- OMElement defintions) {
+ OMElement defintions) {
ArrayList extList = axismessage.getSoapHeaders();
for (int i = 0; i < extList.size(); i++) {
SOAPHeaderMessage header = (SOAPHeaderMessage) extList.get(i);
@@ -245,7 +256,7 @@
}
private void writeMessage(AxisMessage axismessage, OMFactory fac,
- OMElement defintions) {
+ OMElement defintions) {
QName schemaElementName = axismessage.getElementQName();
OMElement messageElement = fac
.createOMElement(MESSAGE_LOCAL_NAME, wsdl);
@@ -301,7 +312,7 @@
OMElement input = fac.createOMElement(IN_PUT_LOCAL_NAME,
wsdl);
input.addAttribute(MESSAGE_LOCAL_NAME, tns.getPrefix()
- + ":" + inaxisMessage.getName() ,
+ + ":" + inaxisMessage.getName(),
null);
addPolicy(PolicyInclude.INPUT_POLICY, inaxisMessage
.getPolicyInclude(), input, fac);
@@ -321,7 +332,7 @@
OMElement output = fac.createOMElement(OUT_PUT_LOCAL_NAME,
wsdl);
output.addAttribute(MESSAGE_LOCAL_NAME, tns.getPrefix()
- + ":" + outAxisMessage.getName() ,
+ + ":" + outAxisMessage.getName(),
null);
addPolicy(PolicyInclude.OUTPUT_POLICY, outAxisMessage
.getPolicyInclude(), output, fac);
@@ -338,7 +349,7 @@
OMElement fault = fac.createOMElement(FAULT_LOCAL_NAME,
wsdl);
fault.addAttribute(MESSAGE_LOCAL_NAME, tns.getPrefix()
- + ":" + faultyMessge.getName() ,
+ + ":" + faultyMessge.getName(),
null);
fault.addAttribute(ATTRIBUTE_NAME, faultyMessge.getName(),
null);
@@ -437,10 +448,10 @@
+ BINDING_NAME_SUFFIX, null);
binding.addAttribute("type", tns.getPrefix() + ":"
+ axisService.getName() + PORT_TYPE_SUFFIX, null);
-
+
addPolicy(PolicyInclude.AXIS_SERVICE_POLICY, axisService.getPolicyInclude(),
- binding, fac);
- addPolicy(PolicyInclude.BINDING_POLICY, axisService.getPolicyInclude(),
+ binding, fac);
+ addPolicy(PolicyInclude.BINDING_POLICY, axisService.getPolicyInclude(),
binding, fac);
//Adding ext elements
@@ -449,12 +460,12 @@
// Add WS-Addressing UsingAddressing element if appropriate
// SHOULD be on the binding element per the specification
- if(axisService.getWSAddressingFlag().equals(AddressingConstants.ADDRESSING_OPTIONAL)){
- OMNamespace wsawNamespace = fac.createOMNamespace(AddressingConstants.Final.WSAW_NAMESPACE,"wsaw");
- addExtensionElement(fac, binding, AddressingConstants.USING_ADDRESSING, DEFAULT_WSDL_NAMESPACE_PREFIX+":required", "true", wsawNamespace);
- } else if(axisService.getWSAddressingFlag().equals(AddressingConstants.ADDRESSING_REQUIRED)){
- OMNamespace wsawNamespace = fac.createOMNamespace(AddressingConstants.Final.WSAW_NAMESPACE,"wsaw");
- addExtensionElement(fac, binding, AddressingConstants.USING_ADDRESSING, DEFAULT_WSDL_NAMESPACE_PREFIX+":required", "true", wsawNamespace);
+ if (axisService.getWSAddressingFlag().equals(AddressingConstants.ADDRESSING_OPTIONAL)) {
+ OMNamespace wsawNamespace = fac.createOMNamespace(AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
+ addExtensionElement(fac, binding, AddressingConstants.USING_ADDRESSING, DEFAULT_WSDL_NAMESPACE_PREFIX + ":required", "true", wsawNamespace);
+ } else if (axisService.getWSAddressingFlag().equals(AddressingConstants.ADDRESSING_REQUIRED)) {
+ OMNamespace wsawNamespace = fac.createOMNamespace(AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
+ addExtensionElement(fac, binding, AddressingConstants.USING_ADDRESSING, DEFAULT_WSDL_NAMESPACE_PREFIX + ":required", "true", wsawNamespace);
}
Iterator operations = axisService.getOperations();
@@ -473,7 +484,7 @@
}
addExtensionElemnet(fac, operation, OPERATION_LOCAL_NAME,
SOAP_ACTION, soapAction, STYLE, style, soap);
-
+
addPolicy(PolicyInclude.BINDING_OPERATION_POLICY, axisOperation
.getPolicyInclude(), operation, fac);
addPolicy(PolicyInclude.AXIS_OPERATION_POLICY, axisOperation
@@ -554,7 +565,7 @@
+ SOAP12BINDING_NAME_SUFFIX, null);
binding.addAttribute("type", tns.getPrefix() + ":"
+ axisService.getName() + PORT_TYPE_SUFFIX, null);
-
+
addPolicy(PolicyInclude.AXIS_SERVICE_POLICY, axisService.getPolicyInclude(),
binding, fac);
addPolicy(PolicyInclude.BINDING_POLICY, axisService.getPolicyInclude(),
@@ -566,12 +577,12 @@
// Add WS-Addressing UsingAddressing element if appropriate
// SHOULD be on the binding element per the specification
- if(axisService.getWSAddressingFlag().equals(AddressingConstants.ADDRESSING_OPTIONAL)){
- OMNamespace wsawNamespace = fac.createOMNamespace(AddressingConstants.Final.WSAW_NAMESPACE,"wsaw");
- addExtensionElement(fac, binding, AddressingConstants.USING_ADDRESSING, DEFAULT_WSDL_NAMESPACE_PREFIX+":required", "true", wsawNamespace);
- } else if(axisService.getWSAddressingFlag().equals(AddressingConstants.ADDRESSING_REQUIRED)){
- OMNamespace wsawNamespace = fac.createOMNamespace(AddressingConstants.Final.WSAW_NAMESPACE,"wsaw");
- addExtensionElement(fac, binding, AddressingConstants.USING_ADDRESSING, DEFAULT_WSDL_NAMESPACE_PREFIX+":required", "true", wsawNamespace);
+ if (axisService.getWSAddressingFlag().equals(AddressingConstants.ADDRESSING_OPTIONAL)) {
+ OMNamespace wsawNamespace = fac.createOMNamespace(AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
+ addExtensionElement(fac, binding, AddressingConstants.USING_ADDRESSING, DEFAULT_WSDL_NAMESPACE_PREFIX + ":required", "true", wsawNamespace);
+ } else if (axisService.getWSAddressingFlag().equals(AddressingConstants.ADDRESSING_REQUIRED)) {
+ OMNamespace wsawNamespace = fac.createOMNamespace(AddressingConstants.Final.WSAW_NAMESPACE, "wsaw");
+ addExtensionElement(fac, binding, AddressingConstants.USING_ADDRESSING, DEFAULT_WSDL_NAMESPACE_PREFIX + ":required", "true", wsawNamespace);
}
Iterator operations = axisService.getOperations();
@@ -734,7 +745,7 @@
}
private void writeSoapHeaders(AxisMessage inaxisMessage, OMFactory fac,
- OMElement input, OMNamespace soapNameSpace) throws Exception {
+ OMElement input, OMNamespace soapNameSpace) throws Exception {
ArrayList extElementList;
extElementList = inaxisMessage.getSoapHeaders();
if (extElementList != null) {
@@ -748,8 +759,8 @@
}
private void addExtensionElemnet(OMFactory fac, OMElement element,
- String name, String att1Name, String att1Value, String att2Name,
- String att2Value, OMNamespace soapNameSpace) {
+ String name, String att1Name, String att1Value, String att2Name,
+ String att2Value, OMNamespace soapNameSpace) {
OMElement soapbinding = fac.createOMElement(name, soapNameSpace);
element.addChild(soapbinding);
soapbinding.addAttribute(att1Name, att1Value, null);
@@ -763,17 +774,17 @@
element.addChild(extElement);
extElement.addAttribute(att1Name, att1Value, null);
}
-
+
private void setDefinitionElement(OMElement defintion) {
this.definition = defintion;
}
-
+
private OMElement getDefinitionElement() {
return definition;
}
private void addSOAPHeader(OMFactory fac, OMElement element,
- SOAPHeaderMessage header, OMNamespace soapNameSpace) {
+ SOAPHeaderMessage header, OMNamespace soapNameSpace) {
OMElement extElement = fac.createOMElement("header", soapNameSpace);
element.addChild(extElement);
String use = header.getUse();
@@ -802,7 +813,7 @@
}
private void addPolicy(int type, PolicyInclude policyInclude,
- OMElement element, OMFactory factory) throws Exception {
+ OMElement element, OMFactory factory) throws Exception {
ArrayList elementList = policyInclude.getPolicyElements(type);
StAXPolicyWriter pwrt = (StAXPolicyWriter) PolicyFactory
.getPolicyWriter(PolicyFactory.StAX_POLICY_WRITER);
@@ -828,14 +839,14 @@
OMAttribute attribute = factory.createOMAttribute("URI", null, policyURIString);
refElement.addAttribute(attribute);
element.addChild(refElement);
-
+
PolicyRegistry reg = policyInclude.getPolicyRegistry();
Policy p = reg.lookup(policyURIString);
-
- if(p == null) {
+
+ if (p == null) {
throw new Exception("Policy not found for uri : " + policyURIString);
}
-
+
ByteArrayOutputStream baos = new ByteArrayOutputStream();
pwrt.writePolicy(p, baos);
@@ -845,9 +856,9 @@
factory,
StAXUtils.createXMLStreamReader(
bais)).getDocumentElement());
-
+
// TODO refactor this ..
-
+
}
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java?rev=407244&r1=407243&r2=407244&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java Wed May 17 06:03:33 2006
@@ -535,10 +535,10 @@
if(rule.isPhaseFirst()&& rule.isPhaseLast()){
isOneHandler = false;
}
- log.info("removed handler " + handler.getName().getLocalPart()
+ log.debug("removed handler " + handler.getName().getLocalPart()
+ " from the phase " + phaseName);
} else {
- log.info("unable to remove handler " + handler.getName().getLocalPart()
+ log.debug("unable to remove handler " + handler.getName().getLocalPart()
+ " from the phase " + phaseName);
}
}