You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by pr...@apache.org on 2008/01/24 14:56:18 UTC
svn commit: r614876 [1/2] - in /webservices/axis2/branches/java/jaxws21: ./
modules/addressing/src/org/apache/axis2/handlers/addressing/
modules/addressing/test/org/apache/axis2/handlers/addressing/
modules/clustering/ modules/clustering/src/org/apache...
Author: pradine
Date: Thu Jan 24 05:56:07 2008
New Revision: 614876
URL: http://svn.apache.org/viewvc?rev=614876&view=rev
Log:
Sync with trunk to revision 614841.
Added:
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/InvocationControllerFactory.java
- copied unchanged from r614697, webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/InvocationControllerFactory.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/impl/
- copied from r614697, webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/impl/
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/impl/AxisInvocationController.java
- copied unchanged from r614697, webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/impl/AxisInvocationController.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/impl/InvocationControllerFactoryImpl.java
- copied unchanged from r614697, webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/impl/InvocationControllerFactoryImpl.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/impl/InvocationControllerImpl.java
- copied unchanged from r614697, webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/impl/InvocationControllerImpl.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/client/dispatch/
- copied from r614697, webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/dispatch/
webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/client/dispatch/InvocationControllerTest.java
- copied unchanged from r614697, webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/client/dispatch/InvocationControllerTest.java
Removed:
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/AxisInvocationController.java
Modified:
webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingInHandlerTestBase.java
webservices/axis2/branches/java/jaxws21/modules/clustering/pom.xml
webservices/axis2/branches/java/jaxws21/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesClusterManager.java
webservices/axis2/branches/java/jaxws21/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesUtil.java
webservices/axis2/branches/java/jaxws21/modules/documentation/xdocs/@axis2_version_dir@/pojoguide.xml
webservices/axis2/branches/java/jaxws21/modules/integration/itest-build.xml
webservices/axis2/branches/java/jaxws21/modules/jaxbri/src/org/apache/axis2/jaxbri/CodeGenerationUtility.java
webservices/axis2/branches/java/jaxws21/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/JAXWSProxyHandler.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/InvocationController.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/registry/FactoryRegistry.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/spi/Constants.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java
webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/AbstractContext.java
webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/DeploymentErrorMsgs.java
webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java
webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService.java
webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/DeployableChain.java
webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/util/CallbackReceiver.java
webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/feature/ServerFramework.java
webservices/axis2/branches/java/jaxws21/modules/parent/pom.xml
webservices/axis2/branches/java/jaxws21/pom.xml
Modified: webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java Thu Jan 24 05:56:07 2008
@@ -33,7 +33,9 @@
import org.apache.axis2.addressing.RelatesTo;
import org.apache.axis2.client.Options;
import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.description.HandlerDescription;
import org.apache.axis2.description.Parameter;
+import org.apache.axis2.engine.AxisConfiguration;
import org.apache.axis2.handlers.AbstractHandler;
import org.apache.axis2.util.JavaUtils;
import org.apache.axis2.util.LoggingControl;
@@ -52,8 +54,25 @@
private static final Log log = LogFactory.getLog(AddressingInHandler.class);
+ private boolean disableRefparamExtract = false;
+ private AxisConfiguration configuration = null;
+ private RolePlayer rolePlayer = null;
+
+ public void init(HandlerDescription handlerdesc){
+ super.init(handlerdesc);
+ // check whether to process reference parameters.
+ Parameter param = handlerdesc.getParameter(DISABLE_REF_PARAMETER_EXTRACT);
+ String value = Utils.getParameterValue(param);
+ disableRefparamExtract = JavaUtils.isTrueExplicitly(value);
+ if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
+ log.debug("disableRefparamExtract=" + disableRefparamExtract);
+ }
+ }
+
public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
- //Determine if we want to ignore addressing headers.
+ //Determine if we want to ignore addressing headers. This parameter cannot be
+ //retrieved from the HandlerDescription because it's value can vary on a per
+ //service basis.
Parameter disableParam = msgContext.getParameter(DISABLE_ADDRESSING_HANDLERS);
String value = Utils.getParameterValue(disableParam);
if (JavaUtils.isTrueExplicitly(value)) {
@@ -65,25 +84,19 @@
return InvocationResponse.CONTINUE;
}
- // check whether to process reference parameters.
- Parameter param = msgContext.getParameter(DISABLE_REF_PARAMETER_EXTRACT);
- value = Utils.getParameterValue(param);
- boolean disableRefparamExtract = JavaUtils.isTrueExplicitly(value);
-
- if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
- log.debug("disableRefparamExtract=" + disableRefparamExtract);
- }
-
- SOAPHeader header = msgContext.getEnvelope().getHeader();
- RolePlayer rolePlayer = (RolePlayer) msgContext.getConfigurationContext()
- .getAxisConfiguration().getParameterValue(Constants.SOAP_ROLE_PLAYER_PARAMETER);
-
// if there are not headers put a flag to disable addressing temporary
+ SOAPHeader header = msgContext.getEnvelope().getHeader();
if (header == null) {
msgContext.setProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
return InvocationResponse.CONTINUE;
}
+ if(configuration == null){
+ AxisConfiguration conf = msgContext.getConfigurationContext().getAxisConfiguration();
+ rolePlayer = (RolePlayer)conf.getParameterValue(Constants.SOAP_ROLE_PLAYER_PARAMETER);
+ configuration = conf;
+ }
+
// check whether someone has explicitly set which addressing namespace to expect.
Iterator iterator = null;
String namespace = (String) msgContext.getProperty(WS_ADDRESSING_VERSION);
@@ -121,7 +134,7 @@
log.debug(namespace +
" Headers present in the SOAP message. Starting to process ...");
}
- if (extractAddressingInformation(header, msgContext, iterator, namespace, disableRefparamExtract)) {
+ if (extractAddressingInformation(header, msgContext, iterator, namespace)) {
msgContext.setProperty(IS_ADDR_INFO_ALREADY_PROCESSED, Boolean.TRUE);
}
}
@@ -142,12 +155,11 @@
* @param messageContext the active MessageContext
* @param headers an Iterator over the addressing headers targeted to me
* @param namespace the addressing namespace
- * @param disableRefparamExtract whether to disable processing of reference parameters or not.
* @return true if addressing information was found
* @throws AxisFault if an error occurs
*/
boolean extractAddressingInformation(SOAPHeader header, MessageContext messageContext,
- Iterator headers, String namespace, boolean disableRefparamExtract)
+ Iterator headers, String namespace)
throws AxisFault {
Options messageContextOptions = messageContext.getOptions();
@@ -218,8 +230,7 @@
extractToEPRInformation(toBlock,
messageContextOptions,
header,
- namespace,
- disableRefparamExtract);
+ namespace);
}
if (messageIDBlock != null && !ignoreHeaders[MESSAGEID_FLAG]) {
extractMessageIDInformation(messageIDBlock, messageContext);
@@ -427,7 +438,7 @@
private void extractToEPRInformation(SOAPHeaderBlock soapHeaderBlock,
Options messageContextOptions, SOAPHeader header,
- String namespace, boolean disableRefparamExtract) {
+ String namespace) {
EndpointReference epr;
//here the addressing epr overidde what ever already there in the message context
Modified: webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingInHandlerTestBase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingInHandlerTestBase.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingInHandlerTestBase.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingInHandlerTestBase.java Thu Jan 24 05:56:07 2008
@@ -75,7 +75,7 @@
.getAxisConfiguration().getParameterValue(Constants.SOAP_ROLE_PLAYER_PARAMETER);
Iterator addressingHeaderBlocks = header.getHeadersToProcess(rolePlayer, addressingNamespace);
inHandler.extractAddressingInformation(header, mc, addressingHeaderBlocks,
- addressingNamespace, false);
+ addressingNamespace);
}
protected Options extractAddressingInformationFromHeaders(RolePlayer rolePlayer) throws Exception{
Modified: webservices/axis2/branches/java/jaxws21/modules/clustering/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/clustering/pom.xml?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/clustering/pom.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/clustering/pom.xml Thu Jan 24 05:56:07 2008
@@ -76,7 +76,7 @@
</property>
<property>
<name>run.clustering.tests</name>
- <value>true</value>
+ <value>${run.clustering.tests}</value>
</property>
</systemProperties>
<excludes>
Modified: webservices/axis2/branches/java/jaxws21/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesClusterManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesClusterManager.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesClusterManager.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesClusterManager.java Thu Jan 24 05:56:07 2008
@@ -48,11 +48,11 @@
import org.apache.catalina.tribes.group.Response;
import org.apache.catalina.tribes.group.RpcChannel;
import org.apache.catalina.tribes.group.interceptors.DomainFilterInterceptor;
-import org.apache.catalina.tribes.group.interceptors.TcpFailureDetector;
import org.apache.catalina.tribes.group.interceptors.OrderInterceptor;
+import org.apache.catalina.tribes.group.interceptors.TcpFailureDetector;
+import org.apache.catalina.tribes.transport.MultiPointSender;
import org.apache.catalina.tribes.transport.ReceiverBase;
import org.apache.catalina.tribes.transport.ReplicationTransmitter;
-import org.apache.catalina.tribes.transport.MultiPointSender;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -224,7 +224,7 @@
// RpcChannel is a ChannelListener. When the reply to a particular request comes back, it
// picks it up. Each RPC is given a UUID, hence can correlate the request-response pair
- RpcChannel rpcChannel =
+ rpcChannel =
new RpcChannel(domain, channel,
new InitializationRequestHandler(controlCmdProcessor));
@@ -276,6 +276,7 @@
membershipManager.getLongestLivingMember() : // First try to get from the longest member alive
membershipManager.getRandomMember(); // Else get from a random member
String memberHost = TribesUtil.getHost(member);
+ log.info("Trying to send intialization request to " + memberHost);
try {
if (!sentMembersList.contains(memberHost)) {
Response[] responses = rpcChannel.send(new Member[]{member},
Modified: webservices/axis2/branches/java/jaxws21/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesUtil.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesUtil.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesUtil.java Thu Jan 24 05:56:07 2008
@@ -49,7 +49,10 @@
if (hostBytes != null) {
for (int i = 0; i < hostBytes.length; i++) {
int hostByte = hostBytes[i] >= 0 ? (int) hostBytes[i] : (int) hostBytes[i] + 256;
- host.append(hostByte).append(".");
+ host.append(hostByte);
+ if (i < hostBytes.length - 1) {
+ host.append(".");
+ }
}
}
return host.append(":").append(member.getPort()).toString();
Modified: webservices/axis2/branches/java/jaxws21/modules/documentation/xdocs/@axis2_version_dir@/pojoguide.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/documentation/xdocs/%40axis2_version_dir%40/pojoguide.xml?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/documentation/xdocs/@axis2_version_dir@/pojoguide.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/documentation/xdocs/@axis2_version_dir@/pojoguide.xml Thu Jan 24 05:56:07 2008
@@ -69,6 +69,11 @@
RPCServiceClient</a></li>
</ul>
</li>
+<li><a href="#jsr181pojows">JSR 181 Annotation support with POJO Web services</a>
+<ul>
+<li><a href="#jsr181definingservice">Sample JSR 181 POJO Web Service</a></li>
+</ul>
+</li>
<li><a href="#summary">Summary</a></li>
<li><a href="#furtherstudy">For Further Study</a></li>
</ul>
@@ -590,6 +595,35 @@
</pre>
<p>Which are exactly the values you set in the
applicationContext.xml file!</p>
+
+<a name="jsr181pojows" id="jsr181pojows"></a>
+<h2>SR 181 Annotation support with POJO Web services</h2>
+<p>Got the JSR 181 annotated POJOs? Great. This section will show you how to package
+them in to a jar format for easy pojo deployment with the help of Axis2 POJO deployer.
+First create the JSR 181 Annotated class.</p>
+<a name="jsr181definingservice" id="jsr181definingservice"></a>
+<h3>Sample JSR 181 POJO Web Service</h3>
+<p>For example lets assume that our JSR 181 Annotated class is.
+</p>
+<pre>
+@WebService(name="JSR181TestService" targetNamespace="http://www.test.org/jsr181/Example")
+@SOAPBinding(style=SOAPBinding.Style.RPC)
+public class TestService {
+ @WebMethod(operationName = "echoMethod")
+ public String echoString(@WebParam(name="stringIn")String s){
+ return s;
+ }
+}
+</pre>
+ <p>Compile this with the help of the Axis2 libs in to a jar file.
+ Add one additional like to the axis2.xml to deploy jar files on the pojo directory
+ </p>
+ <pre>
+ Ex: <deployer extension=".jar" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>
+ </pre>
+<p>Create and pojo directory if its not alreay there under the Axis2 repository and put the JSR 181 Annotated
+jar insie that and start Axis2. You will see the service up and running !!</p>
+
<a name="summary" id="summary"></a>
<h2>Summary</h2>
<p>Apache Axis2 is an excellent way to expose your POJOs as Web
Modified: webservices/axis2/branches/java/jaxws21/modules/integration/itest-build.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/integration/itest-build.xml?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/integration/itest-build.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/integration/itest-build.xml Thu Jan 24 05:56:07 2008
@@ -342,10 +342,6 @@
<copy file="../samples/deprecated/groovy/src/sample/groovy/META-INF/services.xml"
tofile="target/sample/groovy/META-INF/services.xml"/>
- <copy todir="target/sample/groovy/lib/" flatten="true">
- <fileset dir="${maven.repo.local}/groovy/" includes="**/groovy-all-${groovy.all.version}.jar"/>
- </copy>
-
<!-- Groovy repository -->
<mkdir dir="target/groovyRepo"/>
<mkdir dir="target/groovyRepo/conf"/>
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxbri/src/org/apache/axis2/jaxbri/CodeGenerationUtility.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxbri/src/org/apache/axis2/jaxbri/CodeGenerationUtility.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxbri/src/org/apache/axis2/jaxbri/CodeGenerationUtility.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxbri/src/org/apache/axis2/jaxbri/CodeGenerationUtility.java Thu Jan 24 05:56:07 2008
@@ -102,6 +102,7 @@
//here we have to set a proper system ID. otherwise when processing the
// included schaemas for this schema we have a problem
// it creates the system ID using this target namespace value
+
inputSource.setSystemId(baseURI + "xsd" + i + ".xsd");
inputSource.setPublicId(schema.getTargetNamespace());
schemaToInputSourceMap.put(schema,inputSource);
@@ -118,8 +119,15 @@
for (Iterator iter = schemaToInputSourceMap.keySet().iterator();iter.hasNext();) {
key = (XmlSchema) iter.next();
if (key.getTargetNamespace().equals(publicId)) {
- returnInputSource = (InputSource) schemaToInputSourceMap.get(key);
- // we have the requried schema
+
+ // when returning the input stream we have to always return a new
+ // input stream.
+ // sinc jaxbri internally consumes the input stream it gives an
+ // exception.
+ returnInputSource = new InputSource(new StringReader(getSchemaAsString(key)));
+ InputSource existingInputSource = (InputSource) schemaToInputSourceMap.get(key);
+ returnInputSource.setSystemId(existingInputSource.getSystemId());
+ returnInputSource.setSystemId(existingInputSource.getPublicId());
break;
}
}
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl Thu Jan 24 05:56:07 2008
@@ -35,7 +35,7 @@
<xsl:for-each select="param[not(@type = preceding-sibling::param/@type)]">
<xsl:if test="@type!=''">
- private static final javax.xml.bind.JAXBContext _<xsl:value-of select="translate(@type,'.><','___')"/>;
+ private static javax.xml.bind.JAXBContext _<xsl:value-of select="translate(@type,'.><[]','_____')"/>;
</xsl:if>
</xsl:for-each>
@@ -54,7 +54,7 @@
Runtime.getRuntime().exit(-1);
}
finally {
- _<xsl:value-of select="translate(@type,'.><','___')"/> = jc;
+ _<xsl:value-of select="translate(@type,'.><[]','_____')"/> = jc;
classContextMap.put(<xsl:value-of select="@type"/>.class, jc);
}
</xsl:if>
@@ -67,7 +67,7 @@
private org.apache.axiom.om.OMElement toOM(<xsl:value-of select="@type"/> param, boolean optimizeContent)
throws org.apache.axis2.AxisFault {
try {
- javax.xml.bind.JAXBContext context = _<xsl:value-of select="translate(@type,'.><','___')"/>;
+ javax.xml.bind.JAXBContext context = _<xsl:value-of select="translate(@type,'.><[]','_____')"/>;
javax.xml.bind.Marshaller marshaller = context.createMarshaller();
marshaller.setProperty(javax.xml.bind.Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
@@ -100,7 +100,7 @@
org.apache.axiom.om.OMElement param,
java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault{
try {
- javax.xml.bind.JAXBContext context = _<xsl:value-of select="translate(@type,'.><','___')"/>;
+ javax.xml.bind.JAXBContext context = _<xsl:value-of select="translate(@type,'.><[]','_____')"/>;
javax.xml.bind.Unmarshaller unmarshaller = context.createUnmarshaller();
java.lang.Byte ret = (java.lang.Integer)unmarshaller.unmarshal(param.getXMLStreamReaderWithoutCaching(), byte.class).getValue();
@@ -115,7 +115,7 @@
org.apache.axiom.om.OMElement param,
java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault{
try {
- javax.xml.bind.JAXBContext context = _<xsl:value-of select="translate(@type,'.><','___')"/>;
+ javax.xml.bind.JAXBContext context = _<xsl:value-of select="translate(@type,'.><[]','_____')"/>;
javax.xml.bind.Unmarshaller unmarshaller = context.createUnmarshaller();
java.lang.Character ret = (java.lang.Character)unmarshaller.unmarshal(param.getXMLStreamReaderWithoutCaching(), char.class).getValue();
@@ -130,7 +130,7 @@
org.apache.axiom.om.OMElement param,
java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault{
try {
- javax.xml.bind.JAXBContext context = _<xsl:value-of select="translate(@type,'.><','___')"/>;
+ javax.xml.bind.JAXBContext context = _<xsl:value-of select="translate(@type,'.><[]','_____')"/>;
javax.xml.bind.Unmarshaller unmarshaller = context.createUnmarshaller();
java.lang.Double ret = (java.lang.Double)unmarshaller.unmarshal(param.getXMLStreamReaderWithoutCaching(), double.class).getValue();
@@ -145,7 +145,7 @@
org.apache.axiom.om.OMElement param,
java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault{
try {
- javax.xml.bind.JAXBContext context = _<xsl:value-of select="translate(@type,'.><','___')"/>;
+ javax.xml.bind.JAXBContext context = _<xsl:value-of select="translate(@type,'.><[]','_____')"/>;
javax.xml.bind.Unmarshaller unmarshaller = context.createUnmarshaller();
java.lang.Float ret = (java.lang.Float)unmarshaller.unmarshal(param.getXMLStreamReaderWithoutCaching(), float.class).getValue();
@@ -160,7 +160,7 @@
org.apache.axiom.om.OMElement param,
java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault{
try {
- javax.xml.bind.JAXBContext context = _<xsl:value-of select="translate(@type,'.><','___')"/>;
+ javax.xml.bind.JAXBContext context = _<xsl:value-of select="translate(@type,'.><[]','_____')"/>;
javax.xml.bind.Unmarshaller unmarshaller = context.createUnmarshaller();
java.lang.Integer ret = (java.lang.Integer)unmarshaller.unmarshal(param.getXMLStreamReaderWithoutCaching(), int.class).getValue();
@@ -175,7 +175,7 @@
org.apache.axiom.om.OMElement param,
java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault{
try {
- javax.xml.bind.JAXBContext context = _<xsl:value-of select="translate(@type,'.><','___')"/>;
+ javax.xml.bind.JAXBContext context = _<xsl:value-of select="translate(@type,'.><[]','_____')"/>;
javax.xml.bind.Unmarshaller unmarshaller = context.createUnmarshaller();
java.lang.Long ret = (java.lang.Long)unmarshaller.unmarshal(param.getXMLStreamReaderWithoutCaching(), long.class).getValue();
@@ -190,7 +190,7 @@
org.apache.axiom.om.OMElement param,
java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault{
try {
- javax.xml.bind.JAXBContext context = _<xsl:value-of select="translate(@type,'.><','___')"/>;
+ javax.xml.bind.JAXBContext context = _<xsl:value-of select="translate(@type,'.><[]','_____')"/>;
javax.xml.bind.Unmarshaller unmarshaller = context.createUnmarshaller();
java.lang.Short ret = (java.lang.Short)unmarshaller.unmarshal(param.getXMLStreamReaderWithoutCaching(), short.class).getValue();
@@ -205,7 +205,7 @@
org.apache.axiom.om.OMElement param,
java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault{
try {
- javax.xml.bind.JAXBContext context = _<xsl:value-of select="translate(@type,'.><','___')"/>;
+ javax.xml.bind.JAXBContext context = _<xsl:value-of select="translate(@type,'.><[]','_____')"/>;
javax.xml.bind.Unmarshaller unmarshaller = context.createUnmarshaller();
java.lang.Boolean ret = (java.lang.Boolean)unmarshaller.unmarshal(param.getXMLStreamReaderWithoutCaching(), boolean.class).getValue();
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java Thu Jan 24 05:56:07 2008
@@ -44,13 +44,14 @@
import org.apache.axis2.jaxws.core.InvocationContext;
import org.apache.axis2.jaxws.core.InvocationContextFactory;
import org.apache.axis2.jaxws.core.MessageContext;
-import org.apache.axis2.jaxws.core.controller.AxisInvocationController;
import org.apache.axis2.jaxws.core.controller.InvocationController;
+import org.apache.axis2.jaxws.core.controller.InvocationControllerFactory;
import org.apache.axis2.jaxws.description.EndpointDescription;
import org.apache.axis2.jaxws.i18n.Messages;
import org.apache.axis2.jaxws.marshaller.impl.alt.MethodMarshallerUtils;
import org.apache.axis2.jaxws.message.Message;
import org.apache.axis2.jaxws.spi.Binding;
+import org.apache.axis2.jaxws.registry.FactoryRegistry;
import org.apache.axis2.jaxws.spi.Constants;
import org.apache.axis2.jaxws.spi.ServiceDelegate;
import org.apache.axis2.jaxws.spi.migrator.ApplicationContextMigratorUtil;
@@ -75,7 +76,8 @@
WebServiceFeature... features) {
super(svcDelgate, epDesc, epr, addressingNamespace, features);
- ic = new AxisInvocationController();
+ InvocationControllerFactory icf = (InvocationControllerFactory) FactoryRegistry.getFactory(InvocationControllerFactory.class);
+ ic = icf.getInvocationController();
}
/**
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/JAXWSProxyHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/JAXWSProxyHandler.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/JAXWSProxyHandler.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/JAXWSProxyHandler.java Thu Jan 24 05:56:07 2008
@@ -25,8 +25,8 @@
import org.apache.axis2.jaxws.core.InvocationContext;
import org.apache.axis2.jaxws.core.InvocationContextFactory;
import org.apache.axis2.jaxws.core.MessageContext;
-import org.apache.axis2.jaxws.core.controller.AxisInvocationController;
import org.apache.axis2.jaxws.core.controller.InvocationController;
+import org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController;
import org.apache.axis2.jaxws.description.EndpointDescription;
import org.apache.axis2.jaxws.description.OperationDescription;
import org.apache.axis2.jaxws.description.ServiceDescription;
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/InvocationController.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/InvocationController.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/InvocationController.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/InvocationController.java Thu Jan 24 05:56:07 2008
@@ -18,29 +18,18 @@
*/
package org.apache.axis2.jaxws.core.controller;
-import org.apache.axis2.jaxws.ExceptionFactory;
import org.apache.axis2.jaxws.core.InvocationContext;
-import org.apache.axis2.jaxws.core.MessageContext;
-import org.apache.axis2.jaxws.core.util.MessageContextUtils;
-import org.apache.axis2.jaxws.handler.AttachmentsAdapter;
-import org.apache.axis2.jaxws.handler.HandlerChainProcessor;
-import org.apache.axis2.jaxws.handler.HandlerInvokerUtils;
-import org.apache.axis2.jaxws.handler.TransportHeadersAdapter;
-import org.apache.axis2.jaxws.i18n.Messages;
-import org.apache.axis2.jaxws.util.Constants;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import javax.xml.ws.AsyncHandler;
import javax.xml.ws.Response;
-import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
/**
- * The <tt>InvocationController</tt> is an abstract implementation modeling the invocation of a
- * target web service. All of the information that the InvocationController needs should exist
- * within the InvocatonContext that is passed in to the various invoke methods.
+ * The <tt>InvocationController</tt> is an interface modeling the invocation of a
+ * target web service. All of the information that the InvocationController needs
+ * should exist within the InvocatonContext that is passed in to the various invoke
+ * methods.
* <p/>
* The request information is passed in within the InvocationContext. The InvocationController
* assumes that there is a MessageContext within that InvocationContext that is populated with all
@@ -61,9 +50,7 @@
* <p/>
* 4) asynchronous (polling) - {@link #invokeAsync(InvocationContext)}
*/
-public abstract class InvocationController {
-
- private static final Log log = LogFactory.getLog(InvocationController.class);
+public interface InvocationController {
/**
* Performs a synchronous (blocking) invocation of a target service. The InvocationContext
@@ -74,77 +61,7 @@
* @param ic
* @return
*/
- public InvocationContext invoke(InvocationContext ic) {
- if (log.isDebugEnabled()) {
- log.debug("Invocation pattern: synchronous");
- }
-
- // Check to make sure we at least have a valid InvocationContext
- // and request MessageContext
- if (ic == null) {
- throw ExceptionFactory.makeWebServiceException(Messages.getMessage("ICErr1"));
- }
- if (ic.getRequestMessageContext() == null) {
- throw ExceptionFactory.makeWebServiceException(Messages.getMessage("ICErr2"));
- }
-
- MessageContext request = ic.getRequestMessageContext();
- MessageContext response = null;
-
- request.setProperty(Constants.INVOCATION_PATTERN, InvocationPattern.SYNC);
-
- // Invoke outbound handlers.
- boolean success =
- HandlerInvokerUtils.invokeOutboundHandlers(request.getMEPContext(),
- ic.getHandlers(),
- HandlerChainProcessor.MEP.REQUEST,
- false);
-
- if (success) {
- prepareRequest(request);
- response = doInvoke(request);
- prepareResponse(response);
-
- // make sure request and response contexts share a single parent
- response.setMEPContext(request.getMEPContext());
-
- /*
- * TODO TODO TODO review
- *
- * In most cases we are adding the endpointDesc to the
- * MessageContext. Notice here that the "response" object is set by
- * the call to doInvoke. It's a new context we are now working with.
- * The invokeInboundHandlers uses that context way down in
- * createMessageContext --> ContextUtils.addProperties()
- *
- * This may also occur in the AsyncResponse class when calling
- * invokeInboundHandlers
- *
- * For now, make sure the endpointDesc is set on the response
- * context.
- */
- response.setEndpointDescription(request.getEndpointDescription());
-
- // Invoke inbound handlers.
- TransportHeadersAdapter.install(response);
- AttachmentsAdapter.install(response);
- HandlerInvokerUtils.invokeInboundHandlers(response.getMEPContext(),
- ic.getHandlers(),
- HandlerChainProcessor.MEP.RESPONSE,
- false);
- } else { // the outbound handler chain must have had a problem, and
- // we've reversed directions
- response = MessageContextUtils.createMinimalResponseMessageContext(request);
- // since we've reversed directions, the message has "become a
- // make sure request and response contexts share a single parent
- response.setMEPContext(request.getMEPContext());
- response.setMessage(request.getMessage());
- }
- ic.setResponseMessageContext(response);
- return ic;
- }
-
- protected abstract MessageContext doInvoke(MessageContext request);
+ public InvocationContext invoke(InvocationContext ic);
/**
* Performs a one-way invocation of the client. This is SHOULD NOT be a robust invocation, so
@@ -154,45 +71,7 @@
*
* @param ic
*/
- public void invokeOneWay(InvocationContext ic) throws Exception {
- if (log.isDebugEnabled()) {
- log.debug("Invocation pattern: one-way");
- }
-
- // Check to make sure we at least have a valid InvocationContext
- // and request MessageContext
- if (ic == null) {
- throw ExceptionFactory.makeWebServiceException("ICErr1");
- }
- if (ic.getRequestMessageContext() == null) {
- throw ExceptionFactory.makeWebServiceException("ICErr2");
- }
-
- MessageContext request = ic.getRequestMessageContext();
- request.setProperty(Constants.INVOCATION_PATTERN, InvocationPattern.ONEWAY);
-
- // Invoke outbound handlers.
- boolean success =
- HandlerInvokerUtils.invokeOutboundHandlers(request.getMEPContext(),
- ic.getHandlers(),
- HandlerChainProcessor.MEP.REQUEST,
- true);
-
- if (success) {
- prepareRequest(request);
- doInvokeOneWay(request);
- } else { // the outbound handler chain must have had a problem, and we've reversed directions
- // check to see if problem is due to a handler throwing an exception. If so, throw it,
- // even in this oneWay invoke.
- Exception e = request.getCausedByException();
- if (e != null) {
- throw (Exception)e.getCause();
- }
- }
- return;
- }
-
- protected abstract void doInvokeOneWay(MessageContext mc);
+ public void invokeOneWay(InvocationContext ic) throws Exception;
/**
* Performs an asynchronous (non-blocking) invocation of the client based on a callback model.
@@ -203,50 +82,7 @@
* @param callback
* @return
*/
- public Response invokeAsync(InvocationContext ic) {
- if (log.isDebugEnabled()) {
- log.debug("Invocation pattern: asynchronous(polling)");
- }
-
- // Check to make sure we at least have a valid InvocationContext
- // and request MessageContext
- if (ic == null) {
- throw ExceptionFactory.makeWebServiceException(Messages.getMessage("ICErr1"));
- }
- if (ic.getRequestMessageContext() == null) {
- throw ExceptionFactory.makeWebServiceException(Messages.getMessage("ICErr2"));
- }
-
- MessageContext request = ic.getRequestMessageContext();
- request.setProperty(Constants.INVOCATION_PATTERN, InvocationPattern.ASYNC_POLLING);
-
- Response resp = null;
-
- // Invoke outbound handlers.
- // TODO uncomment, and get the EndpointDescription from the request context, which should soon be available
- boolean success =
- HandlerInvokerUtils.invokeOutboundHandlers(request.getMEPContext(),
- ic.getHandlers(),
- HandlerChainProcessor.MEP.REQUEST,
- false);
- if (success) {
- prepareRequest(request);
- resp = doInvokeAsync(request);
- } else
- { // the outbound handler chain must have had a problem, and we've reversed directions
- // since we've reversed directions, the message has "become a response message" (section 9.3.2.1, footnote superscript 2)
-
- // TODO we know the message is a fault message, we should
- // convert it to an exception and throw it.
- // something like:
-
- //throw new AxisFault(request.getMessage());
- }
-
- return resp;
- }
-
- public abstract Response doInvokeAsync(MessageContext mc);
+ public Response invokeAsync(InvocationContext ic);
/**
* Performs an asynchronous (non-blocking) invocation of the client based on a polling model.
@@ -256,82 +92,6 @@
* @param ic
* @return
*/
- public Future<?> invokeAsync(InvocationContext ic, AsyncHandler asyncHandler) {
- if (log.isDebugEnabled()) {
- log.debug("Invocation pattern: asynchronous(callback)");
- }
-
- // Check to make sure we at least have a valid InvocationContext
- // and request MessageContext
- if (ic == null) {
- throw ExceptionFactory.makeWebServiceException(Messages.getMessage("ICErr1"));
- }
- if (ic.getRequestMessageContext() == null) {
- throw ExceptionFactory.makeWebServiceException(Messages.getMessage("ICErr2"));
- }
- if ((ic.getExecutor() != null) && (ic.getExecutor() instanceof ExecutorService)) {
- ExecutorService es = (ExecutorService) ic.getExecutor();
- if (es.isShutdown()) {
- // the executor service is shutdown and won't accept new tasks
- // so return an error back to the client
- throw ExceptionFactory.makeWebServiceException(Messages
- .getMessage("ExecutorShutdown"));
- }
- }
-
- MessageContext request = ic.getRequestMessageContext();
- request.setProperty(Constants.INVOCATION_PATTERN, InvocationPattern.ASYNC_CALLBACK);
-
- Future<?> future = null;
-
- // Invoke outbound handlers.
- boolean success =
- HandlerInvokerUtils.invokeOutboundHandlers(request.getMEPContext(),
- ic.getHandlers(),
- HandlerChainProcessor.MEP.REQUEST,
- false);
- if (success) {
- prepareRequest(request);
- future = doInvokeAsync(request, asyncHandler);
- } else { // the outbound handler chain must have had a problem, and
- // we've reversed directions
- // since we've reversed directions, the message has "become a
- // response message" (section 9.3.2.1, footnote superscript 2)
-
- // TODO: how do we deal with this? The response message may or may
- // not be a fault
- // message. We do know that the direction has reversed, so somehow
- // we need to
- // flow immediately out of the async and give the exception and/or
- // response object
- // back to the client app without calling
- // AsyncResponse.processResponse or processFault
-
- throw ExceptionFactory.makeWebServiceException(Messages.getMessage("invokeAsyncErr"));
-
- // throw new AxisFault(request.getMessage());
- }
- return future;
- }
-
- public abstract Future<?> doInvokeAsync(MessageContext mc, AsyncHandler asyncHandler);
-
- /**
- * Abstract method that must be implemented by whoever is providing the specific client binding.
- * Once this is called, everything that is needed to invoke the operation must be available in
- * the MessageContext.
- *
- * @param mc
- */
- protected abstract void prepareRequest(MessageContext mc);
-
- /**
- * Abstract method that must be implemented by whoever is providing the specific client binding.
- * This is called after the response has come back and allows the client binding to put
- * whatever info it has in the response MessageContext.
- *
- * @param mc
- */
- protected abstract void prepareResponse(MessageContext mc);
+ public Future<?> invokeAsync(InvocationContext ic, AsyncHandler asyncHandler);
}
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/registry/FactoryRegistry.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/registry/FactoryRegistry.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/registry/FactoryRegistry.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/registry/FactoryRegistry.java Thu Jan 24 05:56:07 2008
@@ -23,6 +23,8 @@
import org.apache.axis2.jaxws.addressing.factory.Axis2EndpointReferenceFactoryImpl;
import org.apache.axis2.jaxws.addressing.factory.JAXWSEndpointReferenceFactory;
import org.apache.axis2.jaxws.addressing.factory.JAXWSEndpointReferenceFactoryImpl;
+import org.apache.axis2.jaxws.core.controller.InvocationControllerFactory;
+import org.apache.axis2.jaxws.core.controller.impl.InvocationControllerFactoryImpl;
import org.apache.axis2.jaxws.handler.lifecycle.factory.HandlerLifecycleManagerFactory;
import org.apache.axis2.jaxws.message.databinding.impl.JAXBBlockFactoryImpl;
import org.apache.axis2.jaxws.message.databinding.impl.OMBlockFactoryImpl;
@@ -100,6 +102,7 @@
table.put(Axis2EndpointReferenceFactory.class, new Axis2EndpointReferenceFactoryImpl());
table.put(ExecutorFactory.class, new JAXWSExecutorFactory());
table.put(ServiceInstanceFactory.class, new ServiceInstanceFactoryImpl());
+ table.put(InvocationControllerFactory.class, new InvocationControllerFactoryImpl());
// register the implementation responsible for both WebServiceContext
// injection and the updating of the WebServiceContext instances that
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/spi/Constants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/spi/Constants.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/spi/Constants.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/spi/Constants.java Thu Jan 24 05:56:07 2008
@@ -55,12 +55,6 @@
// JAXBUtils class will use the same ClassLoader to retrieve a JAXBContext as the
// one that was used to create the request
public static final String CACHE_CLASSLOADER = "CACHE_CLASSLOADER";
-
- // Value = Colletion
- // Usage: A list of WebServiceFeatureConfigurators that are called to configure the client or
- // server as appropriate.
- public static final String WEB_SERVICE_FEATURE_CONFIGURATOR_LIST_ID =
- "org.apache.axis2.jaxws.spi.WebServiceFeatureConfigurators";
/** Intentionally Private */
private Constants() {
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java Thu Jan 24 05:56:07 2008
@@ -178,7 +178,7 @@
suite.addTestSuite(BasicAuthSecurityTests.class);
suite.addTestSuite(AddressBookTests.class);
- suite.addTestSuite(MtomSampleTests.class);
+ //suite.addTestSuite(MtomSampleTests.class);
// This test fails only on Solaris
//suite.addTestSuite(MtomSampleByteArrayTests.class);
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/AbstractContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/AbstractContext.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/AbstractContext.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/context/AbstractContext.java Thu Jan 24 05:56:07 2008
@@ -231,6 +231,9 @@
* @param key
*/
public synchronized void removeProperty(String key) {
+ if(properties == null){
+ return;
+ }
Object value = properties.get(key);
if (value != null) {
if (properties != null) {
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/DeploymentErrorMsgs.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/DeploymentErrorMsgs.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/DeploymentErrorMsgs.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/DeploymentErrorMsgs.java Thu Jan 24 05:56:07 2008
@@ -68,7 +68,7 @@
public static final String ERROR_LOADING_MESSAGE_BUILDER = "errorloadingbuilder";
public static final String ERROR_LOADING_MESSAGE_FORMATTER = "errorloadingformatter";
public static final String DEPLOYING_EXCEPTION = "deployingexception";
- public static final String STORING_FAUTY_SERVICE = "stroringfaultyservice";
+ public static final String STORING_FAULTY_SERVICE = "stroringfaultyservice";
public static final String JAXWS_JARS_MISSING = "jaxwsjarsmissing";
public static final String FAULTY_SERVICE_REMOVAL = "faultyserviceremoval";
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java Thu Jan 24 05:56:07 2008
@@ -212,10 +212,10 @@
}
}
} catch (Exception e) {
- log.debug(Messages.getMessage(DeploymentErrorMsgs.STORING_FAUTY_SERVICE,e.getMessage()),e);
+ log.debug(Messages.getMessage(DeploymentErrorMsgs.STORING_FAULTY_SERVICE,e.getMessage()),e);
storeFaultyService(deploymentFileData, e);
} catch (Throwable t) {
- log.debug(Messages.getMessage(DeploymentErrorMsgs.STORING_FAUTY_SERVICE,t.getMessage()),t);
+ log.debug(Messages.getMessage(DeploymentErrorMsgs.STORING_FAULTY_SERVICE,t.getMessage()),t);
storeFaultyService(deploymentFileData, t);
} finally {
if (threadClassLoader != null) {
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java Thu Jan 24 05:56:07 2008
@@ -411,7 +411,11 @@
JAnnotation methodAnnon = method.getAnnotation(AnnotationConstants.WEB_METHOD);
if (methodAnnon != null) {
if (methodAnnon.getValue(AnnotationConstants.OPERATION_NAME) !=null) {
- return methodAnnon.getValue(AnnotationConstants.OPERATION_NAME).asString();
+ String methodName = methodAnnon.getValue(AnnotationConstants.OPERATION_NAME).asString();
+ if(methodName.equals("")){
+ methodName = method.getSimpleName();
+ }
+ return methodName;
}
}
return method.getSimpleName();
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService.java Thu Jan 24 05:56:07 2008
@@ -2043,7 +2043,7 @@
if (!namespaceMap.values().contains(targetNameSpace)){
// i.e this target namespace not exists in the namesapce map
// find a non exists prefix to add this target namesapce
- while (namespaceMap.keySet().contains(prefix)){
+ while ((prefix == null) || namespaceMap.keySet().contains(prefix)){
prefix = "ns" + nsCount++;
}
namespaceMap.put(prefix,targetNameSpace);
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java Thu Jan 24 05:56:07 2008
@@ -47,6 +47,9 @@
import java.util.HashMap;
public class OutInAxisOperation extends TwoChannelAxisOperation {
+
+ private static final Log log = LogFactory.getLog(OutInAxisOperation.class);
+
public OutInAxisOperation() {
super();
//setup a temporary name
@@ -189,10 +192,12 @@
if (!mc.getOptions().isUseSeparateListener()) {
Boolean useAsyncOption =
(Boolean) mc.getProperty(Constants.Configuration.USE_ASYNC_OPERATIONS);
+ if (log.isDebugEnabled()) log.debug("OutInAxisOperationClient: useAsyncOption " + useAsyncOption);
if (useAsyncOption != null) {
useAsync = useAsyncOption.booleanValue();
}
}
+
EndpointReference replyTo = mc.getReplyTo();
if (replyTo !=null && replyTo.hasNoneAddress()) {
throw new AxisFault( replyTo.getAddress() + "" +
@@ -244,20 +249,24 @@
}
callbackReceiver = new CallbackReceiver();
axisOp.setMessageReceiver(callbackReceiver);
+ if (log.isDebugEnabled()) log.debug("OutInAxisOperation: callbackReceiver " + callbackReceiver + " : " + axisOp);
}
}
SyncCallBack internalCallback = null;
if (callback != null) {
callbackReceiver.addCallback(mc.getMessageID(), callback);
+ if (log.isDebugEnabled()) log.debug("OutInAxisOperationClient: Creating callback");
} else if (axisCallback != null) {
- callbackReceiver.addCallback(mc.getMessageID(), axisCallback);
+ callbackReceiver.addCallback(mc.getMessageID(), axisCallback);
+ if (log.isDebugEnabled()) log.debug("OutInAxisOperationClient: Creating axis callback");
} else {
if (log.isDebugEnabled()) {
log.debug("Creating internal callback");
}
internalCallback = new SyncCallBack();
callbackReceiver.addCallback(mc.getMessageID(), internalCallback);
+ if (log.isDebugEnabled()) log.debug("OutInAxisOperationClient: Creating internal callback");
}
/**
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java Thu Jan 24 05:56:07 2008
@@ -158,9 +158,11 @@
public static final String ENCODED_USE = "encoded";
/**
- * Keeps a list of processable operations initiate to an empty list
+ * List of BindingOperationEntry objects.
+ * Each object in the list may require a wrapped schema element for
+ * the input/output or both.
*/
- private List wrappableOperations = new ArrayList();
+ private List wrappableBOEs = new ArrayList();
// used to keep the binding type of the selected binding
private String bindingType;
@@ -672,9 +674,11 @@
}
if (isSetMessageQNames) {
+ BindingOperationEntry boe = find(wrappableBOEs, wsdl4jBindingOperation);
+ boolean isWrapped = (boe == null) ? false : boe.isWrappedInput();
addQNameReference(axisInMessage, wsdl4jOperation,
wsdl4jBindingInput,
- wrappableOperations.contains(wsdl4jBindingOperation));
+ isWrapped);
}
axisBindingInMessage.setAxisMessage(axisInMessage);
@@ -710,9 +714,11 @@
}
if (isSetMessageQNames) {
+ BindingOperationEntry boe = find(wrappableBOEs, wsdl4jBindingOperation);
+ boolean isWrapped = (boe == null) ? false : boe.isWrappedOutput();
addQNameReference(axisOutMessage, wsdl4jOperation,
wsdl4jBindingOutput,
- wrappableOperations.contains(wsdl4jBindingOperation));
+ isWrapped);
}
@@ -1462,11 +1468,11 @@
// findwrappable operations return either the rpc soap operations or
// Http binding operations
- List wrappableBindingOperationsList = findWrappableBindingOperations(wsdl4jBinding);
+ List wrappableBOEList = findWrappableBindingOperations(wsdl4jBinding);
// this method returns all the new schemas created when processing the rpc messages
Map newSchemaMap = createSchemaForPorttype(porttypeNamespaceURI,
- wrappableBindingOperationsList,
+ wrappableBOEList,
schemaMap);
schemaElementList.addAll(newSchemaMap.values());
@@ -1477,12 +1483,14 @@
/**
* Create a schema by looking at the port type
*
- * @param namespaceURI - namespace of the porttype uri we use this only if a user has not specified
- * a namespace in soap:body
+ * @param namespaceURI - namespace of the porttype uri.
+ * we use this only if a user has not specified a namespace in soap:body
+ * @param boeListToProcess - List of BindingOperationEntry objects which require wrappering
+ *
* @return null if there is no element
*/
private Map createSchemaForPorttype(String namespaceURI,
- List operationListToProcess,
+ List boeListToProcess,
Map existingSchemaMap) {
// this map is used to keep the newly added schemas
@@ -1490,7 +1498,7 @@
// first of all look at the operations list
// we can return immediately if we get the operations list
// as empty
- if (operationListToProcess.isEmpty()) {
+ if (boeListToProcess.isEmpty()) {
return newSchemaMap;
}
@@ -1498,8 +1506,8 @@
// messages
// from the operations
Map messageQnameToMessageMap = new HashMap();
- Map operationToInputMessageMap = new HashMap();
- Map operationToOutputMessageMap = new HashMap();
+ Map boeToInputMessageMap = new HashMap();
+ Map boeToOutputMessageMap = new HashMap();
// this contains the required namespace imports. the key in this
// map would be the namaspace URI
@@ -1513,22 +1521,22 @@
// //////////////////////////////////////////////////////////////////////////////////////////////////
// we really need to do this for a single porttype!
- BindingOperation op;
- for (int k = 0; k < operationListToProcess.size(); k++) {
- op = (BindingOperation) operationListToProcess.get(k);
- Input input = op.getOperation().getInput();
+ BindingOperationEntry boe;
+ for (int k = 0; k < boeListToProcess.size(); k++) {
+ boe = (BindingOperationEntry) boeListToProcess.get(k);
+ Input input = boe.getBindingOperation().getOperation().getInput();
Message message;
if (input != null) {
message = input.getMessage();
messageQnameToMessageMap.put(message.getQName(), message);
- operationToInputMessageMap.put(op, message);
+ boeToInputMessageMap.put(boe, message);
}
- Output output = op.getOperation().getOutput();
+ Output output = boe.getBindingOperation().getOperation().getOutput();
if (output != null) {
message = output.getMessage();
messageQnameToMessageMap.put(message.getQName(), message);
- operationToOutputMessageMap.put(op, message);
+ boeToOutputMessageMap.put(boe, message);
}
// we do not want to process fault messages since they can only be used as document type
@@ -1543,19 +1551,19 @@
Element elementDeclaration;
//loop through the input op map and generate the elements
- BindingOperation operation;
- for (Iterator operationsIter = operationToInputMessageMap.keySet().iterator();
- operationsIter.hasNext();) {
+ BindingOperationEntry boEntry;
+ for (Iterator boeIter = boeToInputMessageMap.keySet().iterator();
+ boeIter.hasNext();) {
- operation = (BindingOperation) operationsIter.next();
+ boEntry = (BindingOperationEntry) boeIter.next();
elementDeclaration = document.createElementNS(
XMLSCHEMA_NAMESPACE_URI, xsdPrefix + ":"
+ XML_SCHEMA_ELEMENT_LOCAL_NAME);
- elementDeclaration.setAttribute(XSD_NAME, operation.getName());
+ elementDeclaration.setAttribute(XSD_NAME, boEntry.getBindingOperation().getName());
//when creating the inner complex type we have to find the parts list from the binding input
- BindingInput bindingInput = operation.getBindingInput();
- Message message = (Message) operationToInputMessageMap.get(operation);
+ BindingInput bindingInput = boEntry.getBindingOperation().getBindingInput();
+ Message message = (Message) boeToInputMessageMap.get(boEntry);
if (bindingInput != null) {
@@ -1574,7 +1582,8 @@
partsCollection = message.getParts().values();
}
- List parameterOrder = operation.getOperation().getParameterOrdering();
+ List parameterOrder =
+ boEntry.getBindingOperation().getOperation().getParameterOrdering();
namespaceImportsMap = new HashMap();
namespacePrefixMap = new HashMap();
@@ -1584,7 +1593,8 @@
parameterOrder,
false,
namespaceImportsMap,
- namespacePrefixMap);
+ namespacePrefixMap,
+ boEntry);
elementDeclaration.appendChild(newComplexType);
String namespaceToUse = namespaceURI;
@@ -1620,22 +1630,22 @@
xsdPrefix);
newSchemaMap.put(namespaceToUse, newSchema);
}
- resolvedRpcWrappedElementMap.put(operation.getName(), new QName(
- namespaceToUse, operation.getName(), AXIS2WRAPPED));
+ resolvedRpcWrappedElementMap.put(boEntry.getBindingOperation().getName(), new QName(
+ namespaceToUse, boEntry.getBindingOperation().getName(), AXIS2WRAPPED));
} else {
throw new WSDLProcessingException(
"No binding input is defiend for binding operation ==> "
- + operation.getName());
+ + boEntry.getBindingOperation().getName());
}
}
// loop through the output to map and generate the elements
- for (Iterator operationsIterator = operationToOutputMessageMap.keySet().iterator();
- operationsIterator.hasNext();) {
- operation = (BindingOperation) operationsIterator.next();
- String baseoutputOpName = operation.getName();
+ for (Iterator boeIterator = boeToOutputMessageMap.keySet().iterator();
+ boeIterator.hasNext();) {
+ boEntry = (BindingOperationEntry) boeIterator.next();
+ String baseoutputOpName = boEntry.getBindingOperation().getName();
// see basic profile 4.7.19
String outputOpName = baseoutputOpName + WRAPPED_OUTPUTNAME_SUFFIX;
elementDeclaration = document.createElementNS(
@@ -1643,8 +1653,8 @@
+ XML_SCHEMA_ELEMENT_LOCAL_NAME);
elementDeclaration.setAttribute(XSD_NAME, outputOpName);
- BindingOutput bindingOutput = operation.getBindingOutput();
- Message message = (Message) operationToOutputMessageMap.get(operation);
+ BindingOutput bindingOutput = boEntry.getBindingOperation().getBindingOutput();
+ Message message = (Message) boeToOutputMessageMap.get(boEntry);
if (bindingOutput != null) {
Collection partsCollection = null;
@@ -1663,7 +1673,8 @@
partsCollection = message.getParts().values();
}
- List parameterOrder = operation.getOperation().getParameterOrdering();
+ List parameterOrder =
+ boEntry.getBindingOperation().getOperation().getParameterOrdering();
// we have to initialize the hash maps always since we add the elements onece we
// generate it
@@ -1676,7 +1687,8 @@
parameterOrder,
true,
namespaceImportsMap,
- namespacePrefixMap);
+ namespacePrefixMap,
+ boEntry);
elementDeclaration.appendChild(newComplexType);
String namespaceToUse = namespaceURI;
@@ -1718,7 +1730,7 @@
} else {
throw new WSDLProcessingException(
"No binding out put is defined for binding operation ==>" +
- operation.getName());
+ boEntry.getBindingOperation().getName());
}
}
@@ -1877,6 +1889,7 @@
* @param isOutMessage
* @param namespaceImportsMap
* @param namespacePrefixMap
+ * @param boe BindingOperationEntry for this partCollection
* @return new element
*/
private Element getNewComplextType(Document document,
@@ -1885,7 +1898,8 @@
List parameterOrder,
boolean isOutMessage,
Map namespaceImportsMap,
- Map namespacePrefixMap) {
+ Map namespacePrefixMap,
+ BindingOperationEntry boe) {
// add the complex type
Element newComplexType = document.createElementNS(
XMLSCHEMA_NAMESPACE_URI, xsdPrefix + ":"
@@ -1906,7 +1920,9 @@
xsdPrefix,
namespaceImportsMap,
namespacePrefixMap,
- cmplxTypeSequence);
+ cmplxTypeSequence,
+ isOutMessage,
+ boe);
}
} else {
@@ -1928,11 +1944,13 @@
xsdPrefix,
namespaceImportsMap,
namespacePrefixMap,
- cmplxTypeSequence);
+ cmplxTypeSequence,
+ isOutMessage,
+ boe);
partsMap.remove(partName);
}
}
- // if this is an out put message then we have to set the
+ // if this is an output message then we have to set the
// return type if exists
if (isOutMessage) {
if (partsMap.size() > 0) {
@@ -1940,13 +1958,15 @@
part = (Part) partsMap.values().iterator().next();
// change the name of this part
// this is the return type and its name should be result
-// part.setName("result");
+ // part.setName("result");
addPartToElement(part,
document,
xsdPrefix,
namespaceImportsMap,
namespacePrefixMap,
- cmplxTypeSequence);
+ cmplxTypeSequence,
+ isOutMessage,
+ boe);
} else {
throw new WSDLProcessingException("the parameter order can left atmost" +
" one part");
@@ -1959,12 +1979,24 @@
return newComplexType;
}
+ /**
+ * @param part
+ * @param document
+ * @param xsdPrefix
+ * @param namespaceImportsMap
+ * @param namespacePrefixMap
+ * @param cmplxTypeSequence
+ * @param isOutMessage (true is part is referenced by the output clause)
+ * @param boe BindingOperationEntry that caused the creation of this part.
+ */
private void addPartToElement(Part part,
Document document,
String xsdPrefix,
Map namespaceImportsMap,
Map namespacePrefixMap,
- Element cmplxTypeSequence) {
+ Element cmplxTypeSequence,
+ boolean isOutMessage,
+ BindingOperationEntry boe) {
Element child;
String elementName = part.getName();
@@ -2013,9 +2045,34 @@
cmplxTypeSequence.appendChild(child);
} else {
- // see the basic profile 4.4.1 for rpc-literal messages parts can have only types
- throw new WSDLProcessingException("RPC-literal type message part " +
- part.getName() + " should have a type attribute ");
+ String bindingOperationName = boe.getBindingOperation().getName();
+ String partName = part.getName();
+ if (boe.isRPC()) {
+ // see the basic profile 4.4.1 for rpc-literal.
+ // messages parts can have only types
+ throw new WSDLProcessingException(
+ "The binding operation " + bindingOperationName + " is RPC/literal. " +
+ "The message parts for this operation must use the type " +
+ "attribute as specificed by " +
+ "WS-I Basic Profile specification (4.4.1). Message part, " +
+ partName + ", violates" +
+ "this rule. Please remove the element attribute " +
+ "and use the type attribute.");
+ } else {
+ // The presense of an element means that a wrapper xsd element is not needed.
+ if (isOutMessage) {
+ boe.setWrappedOutput(false);
+ } else {
+ boe.setWrappedOutput(false);
+ }
+ if (log.isDebugEnabled()) {
+ log.debug("The binding operation " + bindingOperationName +
+ " references message part " +
+ partName + ". This part does not use the " +
+ "type attribute, so a wrappering element is not added.");
+ }
+ }
+
}
}
@@ -2483,6 +2540,7 @@
* Look for the wrappable operations depending on the style
*
* @param binding
+ * @return List of BindingOperationEntry objects
*/
private List findWrappableBindingOperations(Binding binding) {
// first find the global style declaration.
@@ -2523,6 +2581,13 @@
this.bindingType = BINDING_TYPE_HTTP;
}
}
+
+ if (log.isDebugEnabled()) {
+ log.debug("Binding Name =" + binding.getQName());
+ log.debug(" isSOAPBinding =" + isSOAPBinding );
+ log.debug(" isHttpBinding =" + isHttpBinding );
+ log.debug(" isRPC =" + isRPC );
+ }
// go through every operation and get their styles.
// each one can have a style override from the global
@@ -2536,23 +2601,57 @@
binding.getBindingOperations().iterator(); bindingOperationsIterator.hasNext();)
{
bindingOp = (BindingOperation) bindingOperationsIterator.next();
+
+ if (log.isDebugEnabled()) {
+ log.debug(" Binding Operation =" + bindingOp.getName());
+ }
if (isSOAPBinding) {
String style = getSOAPStyle(bindingOp);
+ if (log.isDebugEnabled()) {
+ log.debug(" SOAPStyle =" + style);
+ }
if (style == null) {
// no style specified
// use the global style to determine whether to put this one or
// not
if (isRPC) {
- returnList.add(bindingOp);
+ if (log.isDebugEnabled()) {
+ log.debug(" schema wrappering required");
+ }
+ BindingOperationEntry boe =
+ new BindingOperationEntry(bindingOp,
+ true,
+ false,
+ style,
+ true);
+ returnList.add(boe);
}
} else if (RPC_STYLE.equals(style)) {
// add to the list
- returnList.add(bindingOp);
+ if (log.isDebugEnabled()) {
+ log.debug(" schema wrappering required");
+ }
+ BindingOperationEntry boe =
+ new BindingOperationEntry(bindingOp,
+ true,
+ false,
+ style,
+ true);
+ returnList.add(boe);
}
// if not RPC we just leave it - default is doc
} else {
// i.e an http binding then we have to add the operation any way
- returnList.add(bindingOp);
+ if (log.isDebugEnabled()) {
+ log.debug(" schema wrappering required");
+ }
+ BindingOperationEntry boe =
+ new BindingOperationEntry(bindingOp,
+ false,
+ true,
+ null,
+ false);
+ returnList.add(boe);
}
}
}
@@ -2560,7 +2659,7 @@
// if the binding is not either soap or http binding then we return and empty list
// set this to the global list
- wrappableOperations = returnList;
+ wrappableBOEs = returnList;
return returnList;
}
@@ -2857,5 +2956,88 @@
}
}
return isAvailable;
+ }
+
+ /**
+ * Find BindingOperationEntry
+ * @param boes List of BindingOperationEntry
+ * @param bo BindingOperation
+ * @return BindingOperation or null
+ */
+ private BindingOperationEntry find(List boes, BindingOperation bo) {
+ for (int i=0; i < boes.size(); i++) {
+ BindingOperationEntry boe = (BindingOperationEntry) boes.get(i);
+ if (boe.getBindingOperation() == bo) {
+ return boe;
+ }
+ }
+ return null;
+ }
+ /**
+ * BindingOperation plus state information
+ */
+ class BindingOperationEntry {
+
+ private BindingOperation bindingOperation;
+ private boolean isSOAPBinding;
+ private boolean isHTTPBinding;
+ private String soapStyle;
+ private boolean isRPC;
+ private boolean wrappedInput = true;
+ private boolean wrappedOutput = true;
+
+ public BindingOperationEntry(BindingOperation bindingOperation, boolean isSOAPBinding, boolean isHTTPBinding, String soapStyle, boolean isRPC) {
+ super();
+ this.bindingOperation = bindingOperation;
+ this.isSOAPBinding = isSOAPBinding;
+ this.isHTTPBinding = isHTTPBinding;
+ this.soapStyle = soapStyle;
+ this.isRPC = isRPC;
+ }
+
+ public boolean isHTTPBinding() {
+ return isHTTPBinding;
+ }
+ public boolean isSOAPBinding() {
+ return isSOAPBinding;
+ }
+ public String getSoapStyle() {
+ return soapStyle;
+ }
+
+ public boolean isRPC() {
+ return isRPC;
+ }
+ public BindingOperation getBindingOperation() {
+ return bindingOperation;
+ }
+
+ /**
+ * @return true if wrapper xsd is used
+ */
+ public boolean isWrappedInput() {
+ return wrappedInput;
+ }
+
+ /**
+ * @param wrappedInput indicate if wrapper xsd is needed
+ */
+ public void setWrappedInput(boolean wrappedInput) {
+ this.wrappedInput = wrappedInput;
+ }
+
+ /**
+ * @return true if wrapper xsd is needed for the output message
+ */
+ public boolean isWrappedOutput() {
+ return wrappedOutput;
+ }
+
+ /**
+ * @param wrappedOutput indicate if wrapper xsd is needed on the output message
+ */
+ public void setWrappedOutput(boolean wrappedOutput) {
+ this.wrappedOutput = wrappedOutput;
+ }
}
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=614876&r1=614875&r2=614876&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Thu Jan 24 05:56:07 2008
@@ -179,6 +179,13 @@
}
if(annotation.getValue(AnnotationConstants.NAME) != null) {
String serviceName = (annotation.getValue(AnnotationConstants.NAME)).asString();
+ if(serviceName.equals("")){
+ serviceName=serviceClass.getName();
+ int firstChar = serviceName.lastIndexOf ('.') + 1;
+ if ( firstChar > 0 ) {
+ serviceName = serviceName.substring ( firstChar );
+ }
+ }
service.setName(serviceName);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org