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 ke...@apache.org on 2007/02/05 09:21:19 UTC
svn commit: r503585 [3/9] - in /webservices/axis2/trunk/java: etc/
modules/adb-codegen/ modules/adb-codegen/src/org/apache/axis2/schema/
modules/adb-codegen/src/org/apache/axis2/schema/template/ modules/adb/
modules/addressing/ modules/addressing/src/o...
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/CEmitter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/CEmitter.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/CEmitter.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/CEmitter.java Mon Feb 5 00:21:12 2007
@@ -377,7 +377,7 @@
addAttribute(doc, "mepURI", axisOperation.getMessageExchangePattern(), methodElement);
- addSOAPAction(doc, methodElement, axisOperation);
+ addSOAPAction(doc, methodElement, axisOperation.getName());
//add header ops for input
addHeaderOperations(soapHeaderInputParameterList, axisOperation, true);
//add header ops for output
@@ -406,6 +406,7 @@
opsFound = true;
List soapHeaderInputParameterList = new ArrayList();
List soapHeaderOutputParameterList = new ArrayList();
+ List soapHeaderFaultParameterList = new ArrayList();
methodElement = doc.createElement("method");
String localPart = axisOperation.getName().getLocalPart();
String opCName = makeCClassName(localPart);
@@ -424,7 +425,7 @@
addAttribute(doc, "mepURI", axisOperation.getMessageExchangePattern(), methodElement);
- addSOAPAction(doc, methodElement, axisOperation);
+ addSOAPAction(doc, methodElement, axisOperation.getName());
addHeaderOperations(soapHeaderInputParameterList, axisOperation, true);
addHeaderOperations(soapHeaderOutputParameterList, axisOperation, false);
@@ -450,7 +451,6 @@
axisOperation, soapHeaderOutputParameterList));
methodElement.appendChild(getFaultElement(doc,
axisOperation));
-
rootElement.appendChild(methodElement);
//////////////////////
}
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/databinding/TypeMappingAdapter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/databinding/TypeMappingAdapter.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/databinding/TypeMappingAdapter.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/databinding/TypeMappingAdapter.java Mon Feb 5 00:21:12 2007
@@ -75,11 +75,13 @@
} else if (Constants.XSD_ANYTYPE.equals(qname) ||
Constants.XSD_ANY.equals(qname)) {
return defaultClassName;
- }else{
+ } else if (Constants.XSD_STRING.equals(qname)) {
+ return String.class.getName();
+ } else {
throw new UnmatchedTypeException(
CodegenMessages.getMessage("databinding.typemapper.typeunmatched",
- qname.getLocalPart(),
- qname.getNamespaceURI())
+ qname.getLocalPart(),
+ qname.getNamespaceURI())
);
}
}else{
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl Mon Feb 5 00:21:12 2007
@@ -262,11 +262,29 @@
<xsl:for-each select="fault/param[@type!='']">
,<xsl:value-of select="@name"/>
</xsl:for-each>{
+
+ <xsl:if test="string-length(normalize-space(@http_location)) > 0">
+ // keep the old address to add later
+ String oldAdress = null;
+ </xsl:if>
try{
org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[<xsl:value-of select="position()-1"/>].getName());
_operationClient.getOptions().setAction("<xsl:value-of select="$soapAction"/>");
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
+ <!-- change the EPR if http location available -->
+ <xsl:if test="string-length(normalize-space(@http_location)) > 0">
+ oldAdress = setAppendAddressToEPR(_operationClient,"<xsl:value-of select="@http_location"/>");
+ </xsl:if>
+
+ <!-- add the other parameter options to operational client -->
+ <xsl:for-each select="optionParam">
+ addPropertyToOperationClient(_operationClient,<xsl:value-of select="@name"/>,<xsl:value-of select="@value"/>);
+ </xsl:for-each>
+
+ // create a message context
+ org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
+
<!--todo if the stub was generated with unwrapping, wrap all parameters into a single element-->
// create SOAP envelope with that payload
@@ -323,13 +341,29 @@
</xsl:otherwise>
</xsl:choose>
- <xsl:if test="count(input/param[@location='header']) > 0">
+ <xsl:if test="count(input/param[@location='soap_header']) > 0">
env.build();
</xsl:if>
- <xsl:for-each select="input/param[@location='header']">
+ <xsl:for-each select="input/param[@location='soap_header']">
// add the children only if the parameter is not null
if (<xsl:value-of select="@name"/>!=null){
- env.getHeader().addChild(toOM(<xsl:value-of select="@name"/>, optimizeContent(new javax.xml.namespace.QName("<xsl:value-of select="$method-ns"/>", "<xsl:value-of select="$method-name"/>"))));
+ <xsl:choose>
+ <xsl:when test="@mustUnderstand = 'true'">
+ org.apache.axiom.om.OMElement omElement = toOM(<xsl:value-of select="@name"/>, optimizeContent(new javax.xml.namespace.QName("<xsl:value-of select="$method-ns"/>", "<xsl:value-of select="$method-name"/>")))
+ setMustUnderstand(omElement);
+ env.getHeader().addChild(omElement);
+ </xsl:when>
+ <xsl:otherwise>
+ env.getHeader().addChild(toOM(<xsl:value-of select="@name"/>, optimizeContent(new javax.xml.namespace.QName("<xsl:value-of select="$method-ns"/>", "<xsl:value-of select="$method-name"/>"))));
+ </xsl:otherwise>
+ </xsl:choose>
+ }
+ </xsl:for-each>
+
+ <xsl:for-each select="input/param[@location='http_header']">
+ // add the children only if the parameter is not null
+ if (<xsl:value-of select="@name"/>!=null){
+ addHttpHeader(_messageContext,"<xsl:value-of select="@headername"/>",<xsl:value-of select="@name"/>);
}
</xsl:for-each>
</xsl:when>
@@ -341,22 +375,27 @@
<!-- No input parameters present. So generate assuming no input parameters-->
<xsl:otherwise>
<xsl:choose>
- <xsl:when test="$style='rpc' or $style='document'">
- //Style is taken to be "document". No input parameters
+ <xsl:when test="$style='rpc'">
+ //Style is taken to be "rpc". No input parameters
org.apache.axiom.soap.SOAPFactory factory = getFactory(_operationClient.getOptions().getSoapVersionURI());
env = factory.getDefaultEnvelope();
env.getBody().addChild(factory.createOMElement("<xsl:value-of select="$method-name"/>", "<xsl:value-of select="$method-ns"/>", ""));
</xsl:when>
+ <xsl:when test="$style='document'">
+ //Style is taken to be "document". No input parameters
+ // according to the WS-Basic profile in this case we have to send an empty soap message
+ org.apache.axiom.soap.SOAPFactory factory = getFactory(_operationClient.getOptions().getSoapVersionURI());
+ env = factory.getDefaultEnvelope();
+ </xsl:when>
<xsl:otherwise>
//Unknown style detected !! No code is generated
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
- //adding SOAP headers
+ //adding SOAP soap_headers
_serviceClient.addHeadersToEnvelope(env);
- // create message context with that soap envelope
- org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext() ;
+ // set the message context with that soap envelope
_messageContext.setEnvelope(env);
// add the message contxt to the operation client
@@ -365,6 +404,11 @@
//execute the operation client
_operationClient.execute(true);
+ <xsl:if test="string-length(normalize-space(@http_location)) > 0">
+ // set the old address again
+ setServiceClientEPR(oldAdress);
+ </xsl:if>
+
<xsl:choose>
<xsl:when test="$outputtype=''">
return;
@@ -398,6 +442,10 @@
</xsl:otherwise>
</xsl:choose>
}catch(org.apache.axis2.AxisFault f){
+ <xsl:if test="string-length(normalize-space(@http_location)) > 0">
+ // set the old address again
+ setServiceClientEPR(oldAdress);
+ </xsl:if>
org.apache.axiom.om.OMElement faultElt = f.getDetail();
if (faultElt!=null){
if (faultExeptionNameMap.containsKey(faultElt.getQName())){
@@ -488,14 +536,31 @@
throws java.rmi.RemoteException{
+ <xsl:if test="string-length(normalize-space(@http_location)) > 0">
+ // keep the old address to add later
+ String oldAdress = null;
+ </xsl:if>
+
org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[<xsl:value-of select="position()-1"/>].getName());
_operationClient.getOptions().setAction("<xsl:value-of select="$soapAction"/>");
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
+ <!-- change the EPR if http location available -->
+ <xsl:if test="string-length(normalize-space(@http_location)) > 0">
+ oldAdress = setAppendAddressToEPR(_operationClient,"<xsl:value-of select="@http_location"/>");
+ </xsl:if>
+
+ <!-- add the other parameter options to operational client -->
+ <xsl:for-each select="optionParam">
+ addPropertyToOperationClient(_operationClient,<xsl:value-of select="@name"/>,<xsl:value-of select="@value"/>);
+ </xsl:for-each>
+
<!--todo if the stub was generated with unwrapping, wrap all parameters into a single element-->
// create SOAP envelope with that payload
org.apache.axiom.soap.SOAPEnvelope env=null;
+ org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
+
<xsl:variable name="count" select="count(input/param[@type!=''])"/>
<xsl:choose>
<!-- test the number of input parameters
@@ -536,10 +601,25 @@
</xsl:otherwise>
</xsl:choose>
- <xsl:for-each select="input/param[@location='header']">
- // add the headers only if they are not null
+ <xsl:for-each select="input/param[@location='soap_header']">
+ // add the soap_headers only if they are not null
if (<xsl:value-of select="@name"/>!=null){
- env.getHeader().addChild(toOM(<xsl:value-of select="@name"/>, optimizeContent(new javax.xml.namespace.QName("<xsl:value-of select="$method-ns"/>", "<xsl:value-of select="$method-name"/>"))));
+ <xsl:choose>
+ <xsl:when test="@mustUnderstand = 'true'">
+ org.apache.axiom.om.OMElement omElement = toOM(<xsl:value-of select="@name"/>, optimizeContent(new javax.xml.namespace.QName("<xsl:value-of select="$method-ns"/>", "<xsl:value-of select="$method-name"/>")))
+ setMustUnderstand(omElement);
+ env.getHeader().addChild(omElement);
+ </xsl:when>
+ <xsl:otherwise>
+ env.getHeader().addChild(toOM(<xsl:value-of select="@name"/>, optimizeContent(new javax.xml.namespace.QName("<xsl:value-of select="$method-ns"/>", "<xsl:value-of select="$method-name"/>"))));
+ </xsl:otherwise>
+ </xsl:choose>
+ }
+ </xsl:for-each>
+ <xsl:for-each select="input/param[@location='http_header']">
+ // add the children only if the parameter is not null
+ if (<xsl:value-of select="@name"/>!=null){
+ addHttpHeader(_messageContext,"<xsl:value-of select="@headername"/>",<xsl:value-of select="@name"/>);
}
</xsl:for-each>
</xsl:when>
@@ -551,22 +631,27 @@
<!-- No input parameters present. So generate assuming no input parameters-->
<xsl:otherwise>
<xsl:choose>
- <xsl:when test="$style='document' or $style='rpc'">
+ <xsl:when test="$style='rpc'">
//Style is Doc. No input parameters
org.apache.axiom.soap.SOAPFactory factory = getFactory(_operationClient.getOptions().getSoapVersionURI());
env = factory.getDefaultEnvelope();
env.getBody().addChild(factory.createOMElement("<xsl:value-of select="$method-name"/>", "<xsl:value-of select="$method-ns"/>", ""));
</xsl:when>
+ <xsl:when test="$style='document'">
+ //Style is taken to be "document". No input parameters
+ // according to the WS-Basic profile in this case we have to send an empty soap message
+ org.apache.axiom.soap.SOAPFactory factory = getFactory(_operationClient.getOptions().getSoapVersionURI());
+ env = factory.getDefaultEnvelope();
+ </xsl:when>
<xsl:otherwise>
//Unknown style detected !! No code is generated
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
- //adding SOAP headers
+ //adding SOAP soap_headers
_serviceClient.addHeadersToEnvelope(env);
// create message context with that soap envelope
- org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext() ;
_messageContext.setEnvelope(env);
// add the message contxt to the operation client
@@ -604,6 +689,10 @@
//execute the operation client
_operationClient.execute(false);
+ <xsl:if test="string-length(normalize-space(@http_location)) > 0">
+ // set the old address again
+ setServiceClientEPR(oldAdress);
+ </xsl:if>
}
</xsl:if>
@@ -651,13 +740,29 @@
</xsl:if>
{
+ <xsl:if test="string-length(normalize-space(@http_location)) > 0">
+ // keep the old address to add later
+ String oldAdress = null;
+ </xsl:if>
+
<xsl:if test="$mep='11'">try {</xsl:if>
org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[<xsl:value-of select="position()-1"/>].getName());
_operationClient.getOptions().setAction("<xsl:value-of select="$soapAction"/>");
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
+ <!-- change the EPR if http location available -->
+ <xsl:if test="string-length(normalize-space(@http_location)) > 0">
+ oldAdress = setAppendAddressToEPR(_operationClient,"<xsl:value-of select="@http_location"/>");
+ </xsl:if>
+
+ <!-- add the other parameter options to operational client -->
+ <xsl:for-each select="optionParam">
+ addPropertyToOperationClient(_operationClient,<xsl:value-of select="@name"/>,<xsl:value-of select="@value"/>);
+ </xsl:for-each>
+
<xsl:for-each select="input/param[@Action!='']">_operationClient.getOptions().setAction("<xsl:value-of select="@Action"/>");</xsl:for-each>
org.apache.axiom.soap.SOAPEnvelope env = null;
+ org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
<xsl:variable name="count" select="count(input/param[@type!=''])"/>
<xsl:choose>
@@ -700,10 +805,25 @@
</xsl:otherwise>
</xsl:choose>
- <xsl:for-each select="input/param[@location='header']">
+ <xsl:for-each select="input/param[@location='soap_header']">
// add the children only if the parameter is not null
if (<xsl:value-of select="@name"/>!=null){
- env.getHeader().addChild(toOM(<xsl:value-of select="@name"/>, optimizeContent(new javax.xml.namespace.QName("<xsl:value-of select="$method-ns"/>", "<xsl:value-of select="$method-name"/>"))));
+ <xsl:choose>
+ <xsl:when test="@mustUnderstand = 'true'">
+ org.apache.axiom.om.OMElement omElement = toOM(<xsl:value-of select="@name"/>, optimizeContent(new javax.xml.namespace.QName("<xsl:value-of select="$method-ns"/>", "<xsl:value-of select="$method-name"/>")))
+ setMustUnderstand(omElement);
+ env.getHeader().addChild(omElement);
+ </xsl:when>
+ <xsl:otherwise>
+ env.getHeader().addChild(toOM(<xsl:value-of select="@name"/>, optimizeContent(new javax.xml.namespace.QName("<xsl:value-of select="$method-ns"/>", "<xsl:value-of select="$method-name"/>"))));
+ </xsl:otherwise>
+ </xsl:choose>
+ }
+ </xsl:for-each>
+ <xsl:for-each select="input/param[@location='http_header']">
+ // add the children only if the parameter is not null
+ if (<xsl:value-of select="@name"/>!=null){
+ addHttpHeader(_messageContext,"<xsl:value-of select="@headername"/>",<xsl:value-of select="@name"/>);
}
</xsl:for-each>
</xsl:when>
@@ -715,12 +835,18 @@
<!-- No input parameters present. So generate assuming no input parameters-->
<xsl:otherwise>
<xsl:choose>
- <xsl:when test="$style='rpc' or $style='document'">
+ <xsl:when test="$style='rpc'">
//Style is taken to be "document". No input parameters
org.apache.axiom.soap.SOAPFactory factory = getFactory(_operationClient.getOptions().getSoapVersionURI());
env = factory.getDefaultEnvelope();
env.getBody().addChild(factory.createOMElement("<xsl:value-of select="$method-name"/>", "<xsl:value-of select="$method-ns"/>", ""));
</xsl:when>
+ <xsl:when test="$style='document'">
+ //Style is taken to be "document". No input parameters
+ // according to the WS-Basic profile in this case we have to send an empty soap message
+ org.apache.axiom.soap.SOAPFactory factory = getFactory(_operationClient.getOptions().getSoapVersionURI());
+ env = factory.getDefaultEnvelope();
+ </xsl:when>
<xsl:otherwise>
//Unknown style detected !! No code is generated
</xsl:otherwise>
@@ -728,18 +854,27 @@
</xsl:otherwise>
</xsl:choose>
- //adding SOAP headers
+ //adding SOAP soap_headers
_serviceClient.addHeadersToEnvelope(env);
// create message context with that soap envelope
- org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext() ;
+
_messageContext.setEnvelope(env);
// add the message contxt to the operation client
_operationClient.addMessageContext(_messageContext);
_operationClient.execute(true);
+
+ <xsl:if test="string-length(normalize-space(@http_location)) > 0">
+ // set the old address again
+ setServiceClientEPR(oldAdress);
+ </xsl:if>
<xsl:if test="$mep='11'">
}catch(org.apache.axis2.AxisFault f){
+ <xsl:if test="string-length(normalize-space(@http_location)) > 0">
+ // set the old address again
+ setServiceClientEPR(oldAdress);
+ </xsl:if>
org.apache.axiom.om.OMElement faultElt = f.getDetail();
if (faultElt!=null){
if (faultExeptionNameMap.containsKey(faultElt.getQName())){
@@ -795,6 +930,7 @@
</xsl:if>
</xsl:if>
</xsl:for-each>
+
/**
* A utility method that copies the namepaces from the SOAPEnvelope
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl Mon Feb 5 00:21:12 2007
@@ -204,6 +204,7 @@
<xsl:for-each select="fault-list/fault">
<xsl:if test="position()=1">}</xsl:if>catch (<xsl:value-of select="@name"/> e) {
+ msgContext.setProperty(org.apache.axis2.Constants.FAULT_NAME,"<xsl:value-of select="@localname"/>");
org.apache.axis2.AxisFault f = createAxisFault(e);
f.setDetail(toOM(e.getFaultMessage(),false));
@@ -512,7 +513,7 @@
}
<xsl:for-each select="fault-list/fault">
<xsl:if test="position()=1">}</xsl:if>catch (<xsl:value-of select="@name"/> e) {
-
+ msgContext.setProperty(org.apache.axis2.Constants.FAULT_NAME,"<xsl:value-of select="@localname"/>");
org.apache.axis2.AxisFault f = createAxisFault(e);
f.setDetail(toOM(e.getFaultMessage(),false));
Modified: webservices/axis2/trunk/java/modules/integration/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/project.xml?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/project.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/project.xml Mon Feb 5 00:21:12 2007
@@ -121,6 +121,14 @@
</properties>
</dependency>
<dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>${commons.fileupload.version}</version>
+ <properties>
+ <module>true</module>
+ </properties>
+ </dependency>
+ <dependency>
<groupId>groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${groovy.all.version}</version>
@@ -456,7 +464,4 @@
</resource>
</resources>
</build>
-
- <reports/>
-
</project>
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.service.axis2.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.service.axis2.xml?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.service.axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.service.axis2.xml Mon Feb 5 00:21:12 2007
@@ -64,6 +64,10 @@
class="org.apache.axis2.engine.RequestURIBasedDispatcher">
<order phase="Dispatch"/>
</handler>
+ <handler name="RequestURIBasedOperationDispatcher"
+ class="org.apache.axis2.dispatchers.RequestURIBasedOperationDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
<handler name="SOAPActionBasedDispatcher"
class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
<order phase="Dispatch"/>
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java Mon Feb 5 00:21:12 2007
@@ -65,8 +65,7 @@
//This is not smt we need to do but , my build is fail if I dont do that :)
serviceClient.getOptions().setTo(new EndpointReference(epr));
System.out.println(serviceClient.getOptions().getTo().getAddress());
- OMElement response = serviceClient.sendReceive(
- new QName("http://engine.axis2.apache.org/xsd", "echoOM"), payload);
+ OMElement response = serviceClient.sendReceive(new QName("", "echoOM"), payload);
assertNotNull(response);
String textValue = response.getFirstElement().getFirstElement().getText();
assertEquals(textValue, "Isaac Asimov, The Foundation Trilogy");
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java Mon Feb 5 00:21:12 2007
@@ -68,6 +68,7 @@
start(org.apache.axis2.Constants.TESTING_REPOSITORY);
}
+
public static synchronized void start(String repository) throws Exception {
if (count == 0) {
ConfigurationContext er = getNewConfigurationContext(repository);
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/MessageSaveAndRestoreWithMTOMTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/MessageSaveAndRestoreWithMTOMTest.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/MessageSaveAndRestoreWithMTOMTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/MessageSaveAndRestoreWithMTOMTest.java Mon Feb 5 00:21:12 2007
@@ -146,7 +146,7 @@
options.setAction(Constants.AXIS2_NAMESPACE_URI+"/"+TestConstants.operationName.getLocalPart());
options.setUseSeparateListener(true);
- ConfigurationContext configurationContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem("target/test-resources/integrationRepo",null);
+ ConfigurationContext configurationContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem("target/test-resources/integrationRepo",null);
ServiceClient sender = new ServiceClient(configurationContext,null);
sender.setOptions(options);
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/AddressingMTOMSecurityTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/AddressingMTOMSecurityTest.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/AddressingMTOMSecurityTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/AddressingMTOMSecurityTest.java Mon Feb 5 00:21:12 2007
@@ -34,7 +34,7 @@
public static Test suite() {
return getTestSetup2(new TestSuite(AddressingMTOMSecurityTest.class),Constants.TESTING_PATH + COMPLETE_SERVICE_REPOSITORY);
}
-
+
protected OutflowConfiguration getOutflowConfiguration() {
OutflowConfiguration ofc = new OutflowConfiguration();
@@ -121,11 +121,11 @@
prop2.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
prop2.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
prop2.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
-
+
Hashtable table = new Hashtable();
table.put("key1", prop1);
table.put("key2", prop2);
-
+
return table;
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java Mon Feb 5 00:21:12 2007
@@ -125,7 +125,7 @@
private String targetEpr = "http://127.0.0.1:" +
// 5556 +
UtilServer.TESTING_PORT +
- "/axis2/services/PingPort";
+ "/axis2/services/PingPort/Ping";
public InteropTestBase() {
super();
@@ -189,7 +189,7 @@
public void testInteropWithDynamicConfigWithProfRefs() {
if(getPropertyRefs() != null) {
try {
-
+
Class interopScenarioClientClass = Class
.forName("org.apache.axis2.security.InteropScenarioClient");
Constructor c = interopScenarioClientClass
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java Mon Feb 5 00:21:12 2007
@@ -147,89 +147,89 @@
sender.cleanup();
}
- public void testEchoXMLSync() throws Exception {
- OMElement payload = createPayload();
-
- Options options = new Options();
- options.setTo(targetEPR);
- options.setTransportInProtocol(Constants.TRANSPORT_TCP);
- options.setAction(Constants.AXIS2_NAMESPACE_URI+"/"+operationName.getLocalPart());
-
- ServiceClient sender = new ServiceClient(configContext, clientService);
- sender.setOptions(options);
- OMElement result = sender.sendReceive(operationName, payload);
-
- result.serialize(StAXUtils.createXMLStreamWriter(
- System.out));
- sender.cleanup();
- }
-
- public void testEchoXMLCompleteSync() throws Exception {
- OMFactory fac = OMAbstractFactory.getOMFactory();
-
- OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
- OMElement payloadElement = fac.createOMElement("echoOMElement", omNs);
- OMElement value = fac.createOMElement("myValue", omNs);
- value.setText("Isaac Asimov, The Foundation Trilogy");
- payloadElement.addChild(value);
-
- Options options = new Options();
- options.setTo(targetEPR);
- options.setAction(Constants.AXIS2_NAMESPACE_URI+"/"+operationName.getLocalPart());
- options.setTransportInProtocol(Constants.TRANSPORT_TCP);
- options.setUseSeparateListener(true);
-
- ServiceClient sender = new ServiceClient(configContext, clientService);
- sender.setOptions(options);
- OMElement result = sender.sendReceive(operationName, payloadElement);
-
- result.serialize(StAXUtils.createXMLStreamWriter(
- System.out));
- sender.cleanup();
-
- }
-
- public void testEchoXMLSyncMC() throws Exception {
- ConfigurationContext configContext =
- ConfigurationContextFactory.createConfigurationContextFromFileSystem(Constants.TESTING_REPOSITORY, Constants.TESTING_REPOSITORY + "/conf/axis2.xml");
-
- AxisOperation opdesc = new OutInAxisOperation(new QName("echoOMElement"));
- Options options = new Options();
- options.setTo(targetEPR);
- options.setAction(operationName.getLocalPart());
- options.setTransportInProtocol(Constants.TRANSPORT_TCP);
-
- OMFactory fac = OMAbstractFactory.getOMFactory();
-
- OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
- OMElement method = fac.createOMElement("echoOMElement", omNs);
- OMElement value = fac.createOMElement("myValue", omNs);
- value.setText("Isaac Asimov, The Foundation Trilogy");
- method.addChild(value);
- SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
- SOAPEnvelope envelope = factory.getDefaultEnvelope();
- envelope.getBody().addChild(method);
-
- MessageContext requestContext = new MessageContext();
- requestContext.setConfigurationContext(configContext);
- requestContext.setAxisService(clientService);
- requestContext.setAxisOperation(opdesc);
- requestContext.setEnvelope(envelope);
-
- ServiceClient sender = new ServiceClient(configContext, clientService);
- sender.setOptions(options);
- OperationClient opClient = sender.createClient(new QName("echoOMElement"));
- opClient.addMessageContext(requestContext);
- opClient.setOptions(options);
- opClient.execute(true);
-
- MessageContext response = opClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
- SOAPEnvelope env = response.getEnvelope();
- assertNotNull(env);
- env.getBody().serialize(StAXUtils.createXMLStreamWriter(
- System.out));
- sender.cleanup();
- }
+// public void testEchoXMLSync() throws Exception {
+// OMElement payload = createPayload();
+//
+// Options options = new Options();
+// options.setTo(targetEPR);
+// options.setTransportInProtocol(Constants.TRANSPORT_TCP);
+// options.setAction(Constants.AXIS2_NAMESPACE_URI+"/"+operationName.getLocalPart());
+//
+// ServiceClient sender = new ServiceClient(configContext, clientService);
+// sender.setOptions(options);
+// OMElement result = sender.sendReceive(operationName, payload);
+//
+// result.serialize(StAXUtils.createXMLStreamWriter(
+// System.out));
+// sender.cleanup();
+// }
+
+// public void testEchoXMLCompleteSync() throws Exception {
+// OMFactory fac = OMAbstractFactory.getOMFactory();
+//
+// OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
+// OMElement payloadElement = fac.createOMElement("echoOMElement", omNs);
+// OMElement value = fac.createOMElement("myValue", omNs);
+// value.setText("Isaac Asimov, The Foundation Trilogy");
+// payloadElement.addChild(value);
+//
+// Options options = new Options();
+// options.setTo(targetEPR);
+// options.setAction(Constants.AXIS2_NAMESPACE_URI+"/"+operationName.getLocalPart());
+// options.setTransportInProtocol(Constants.TRANSPORT_TCP);
+// options.setUseSeparateListener(true);
+//
+// ServiceClient sender = new ServiceClient(configContext, clientService);
+// sender.setOptions(options);
+// OMElement result = sender.sendReceive(operationName, payloadElement);
+//
+// result.serialize(StAXUtils.createXMLStreamWriter(
+// System.out));
+// sender.cleanup();
+//
+// }
+//
+// public void testEchoXMLSyncMC() throws Exception {
+// ConfigurationContext configContext =
+// ConfigurationContextFactory.createConfigurationContextFromFileSystem(Constants.TESTING_REPOSITORY, Constants.TESTING_REPOSITORY + "/conf/axis2.xml");
+//
+// AxisOperation opdesc = new OutInAxisOperation(new QName("echoOMElement"));
+// Options options = new Options();
+// options.setTo(targetEPR);
+// options.setAction(operationName.getLocalPart());
+// options.setTransportInProtocol(Constants.TRANSPORT_TCP);
+//
+// OMFactory fac = OMAbstractFactory.getOMFactory();
+//
+// OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
+// OMElement method = fac.createOMElement("echoOMElement", omNs);
+// OMElement value = fac.createOMElement("myValue", omNs);
+// value.setText("Isaac Asimov, The Foundation Trilogy");
+// method.addChild(value);
+// SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
+// SOAPEnvelope envelope = factory.getDefaultEnvelope();
+// envelope.getBody().addChild(method);
+//
+// MessageContext requestContext = new MessageContext();
+// requestContext.setConfigurationContext(configContext);
+// requestContext.setAxisService(clientService);
+// requestContext.setAxisOperation(opdesc);
+// requestContext.setEnvelope(envelope);
+//
+// ServiceClient sender = new ServiceClient(configContext, clientService);
+// sender.setOptions(options);
+// OperationClient opClient = sender.createClient(new QName("echoOMElement"));
+// opClient.addMessageContext(requestContext);
+// opClient.setOptions(options);
+// opClient.execute(true);
+//
+// MessageContext response = opClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+// SOAPEnvelope env = response.getEnvelope();
+// assertNotNull(env);
+// env.getBody().serialize(StAXUtils.createXMLStreamWriter(
+// System.out));
+// sender.cleanup();
+// }
}
Modified: webservices/axis2/trunk/java/modules/integration/test/samples/wsdl/perf/PerfPortTypeTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/samples/wsdl/perf/PerfPortTypeTest.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/samples/wsdl/perf/PerfPortTypeTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/samples/wsdl/perf/PerfPortTypeTest.java Mon Feb 5 00:21:12 2007
@@ -34,7 +34,7 @@
private String targetEpr = "http://127.0.0.1:" +
UtilServer.TESTING_PORT +
- "/axis2/services/PerfPortType";
+ "/axis2/services/PerfPortType.PerfPortTypeSOAP12port/handleStringArray";
public PerfPortTypeTest() {
super();
Modified: webservices/axis2/trunk/java/modules/java2wsdl/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/java2wsdl/project.xml?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/java2wsdl/project.xml (original)
+++ webservices/axis2/trunk/java/modules/java2wsdl/project.xml Mon Feb 5 00:21:12 2007
@@ -140,5 +140,4 @@
</resource>
</resources>
</build>
- <reports/>
</project>
Modified: webservices/axis2/trunk/java/modules/jibx/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jibx/project.xml?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/jibx/project.xml (original)
+++ webservices/axis2/trunk/java/modules/jibx/project.xml Mon Feb 5 00:21:12 2007
@@ -184,15 +184,15 @@
</dependencies>
<build>
<resources>
- <resource>
- <directory>../../</directory>
- <targetPath>META-INF</targetPath>
- <includes>
- <include>NOTICE.txt</include>
- <include>LICENSE.txt</include>
- </includes>
- </resource>
- </resources>
- </build>
- <reports/>
+ <resource>
+ <directory>../../</directory>
+ <targetPath>META-INF</targetPath>
+ <includes>
+ <include>NOTICE.txt</include>
+ <include>LICENSE.txt</include>
+ </includes>
+ </resource>
+ </resources>
+ </build>
+
</project>
Modified: webservices/axis2/trunk/java/modules/jibx/test-resources/repo/conf/axis2.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jibx/test-resources/repo/conf/axis2.xml?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/jibx/test-resources/repo/conf/axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/jibx/test-resources/repo/conf/axis2.xml Mon Feb 5 00:21:12 2007
@@ -109,6 +109,10 @@
<handler name="RequestURIBasedDispatcher"
class="org.apache.axis2.engine.RequestURIBasedDispatcher">
<order phase="Dispatch"/>
+ </handler>
+ <handler name="RequestURIBasedOperationDispatcher"
+ class="org.apache.axis2.dispatchers.RequestURIBasedOperationDispatcher">
+ <order phase="Dispatch"/>
</handler>
<handler name="SOAPActionBasedDispatcher"
class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
Modified: webservices/axis2/trunk/java/modules/jibx/test/org/apache/axis2/jibx/Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jibx/test/org/apache/axis2/jibx/Test.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/jibx/test/org/apache/axis2/jibx/Test.java (original)
+++ webservices/axis2/trunk/java/modules/jibx/test/org/apache/axis2/jibx/Test.java Mon Feb 5 00:21:12 2007
@@ -19,6 +19,7 @@
import java.io.File;
import java.io.FileReader;
import java.lang.reflect.Method;
+import java.lang.reflect.Constructor;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.HashMap;
@@ -238,25 +239,26 @@
javaCompiler.execute();
// codeGenProject.executeTarget(COMPILE_TARGET_NAME);
}
-
+
public void testBuildAndRun() throws Exception {
startServer();
-
+
// start by generating and compiling the Axis2 interface code
String outdir =
OUTPUT_LOCATION_BASE + OUTPUT_LOCATION_PREFIX;
codeGenerate(WSDL_BASE_DIR + "customer-echo.wsdl",
BINDING_BASE_DIR + "customer-binding.xml", outdir, false);
compile(outdir);
-
- // finish by testing a roundtrip call to the echo server
+
+// finish by testing a roundtrip call to the echo server
File classesdir = new File(outdir + "/classes/");
URLClassLoader loader = new URLClassLoader(new URL[] {classesdir.toURL()}, this.getClass().getClassLoader());
Class stub = loader.loadClass(STUB_CLASS);
- Object inst = stub.newInstance();
Person person = new Person(42, "John", "Smith");
Customer customer = new Customer("Redmond", person, "+14258858080",
"WA", "14619 NE 80th Pl.", new Integer(98052));
+ Constructor constructor = stub.getConstructor(new Class[]{"http://127.0.0.1:5555/axis2/services/EchoCustomerService/echo".getClass()});
+ Object inst = constructor.newInstance(new Object[]{"http://127.0.0.1:5555/axis2/services/EchoCustomerService/echo"});
Method method = stub.getMethod("echo", new Class[] {Customer.class});
Object result = method.invoke(inst, new Object[] {customer});
stopServer();
@@ -265,20 +267,22 @@
}
public void testCompileWrapped() throws Exception {
-
+
// generate and compile the Axis2 interface code
String outdir = OUTPUT_LOCATION_BASE + OUTPUT_LOCATION_PREFIX;
codeGenerate(WSDL_BASE_DIR + "library.wsdl",
BINDING_BASE_DIR + "library-binding.xml", outdir, false);
compile(outdir);
}
-
+
public void testCompileUnwrapped() throws Exception {
-
+
// generate and compile the Axis2 interface code
String outdir = OUTPUT_LOCATION_BASE + OUTPUT_LOCATION_PREFIX;
codeGenerate(WSDL_BASE_DIR + "library.wsdl",
BINDING_BASE_DIR + "library-binding.xml", outdir, true);
compile(outdir);
}
-}
\ No newline at end of file
+
+}
+
Modified: webservices/axis2/trunk/java/modules/kernel/conf/axis2.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/conf/axis2.xml?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/conf/axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/kernel/conf/axis2.xml Mon Feb 5 00:21:12 2007
@@ -236,6 +236,12 @@
class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
<order phase="Dispatch"/>
</handler>
+
+ <handler name="HTTPLocationBasedDispatcher"
+ class="org.apache.axis2.engine.HTTPLocationBasedDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+
<handler name="InstanceDispatcher"
class="org.apache.axis2.engine.InstanceDispatcher">
<order phase="Dispatch"/>
@@ -282,6 +288,12 @@
class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
<order phase="Dispatch"/>
</handler>
+
+ <handler name="HTTPLocationBasedDispatcher"
+ class="org.apache.axis2.engine.HTTPLocationBasedDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+
<handler name="InstanceDispatcher"
class="org.apache.axis2.engine.InstanceDispatcher">
<order phase="PostDispatch"/>
Modified: webservices/axis2/trunk/java/modules/kernel/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/project.xml?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/project.xml (original)
+++ webservices/axis2/trunk/java/modules/kernel/project.xml Mon Feb 5 00:21:12 2007
@@ -234,5 +234,4 @@
</resources>
</unitTest>
</build>
- <reports/>
</project>
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/AxisFault.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/AxisFault.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/AxisFault.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/AxisFault.java Mon Feb 5 00:21:12 2007
@@ -25,7 +25,7 @@
import org.apache.axiom.soap.SOAPFaultNode;
import org.apache.axiom.soap.SOAPFaultReason;
import org.apache.axiom.soap.SOAPFaultRole;
-import org.apache.axiom.soap.SOAPHeader;
+import org.apache.axiom.soap.SOAPHeaderBlock;
import org.apache.axis2.context.MessageContext;
import javax.xml.namespace.QName;
@@ -264,7 +264,7 @@
*
* @param header to add.
*/
- public void addHeader(SOAPHeader header) {
+ public void addHeader(SOAPHeaderBlock header) {
headers.add(header);
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java Mon Feb 5 00:21:12 2007
@@ -67,6 +67,8 @@
*/
public static final String MESSAGE_SCOPE = "message";
+ public static final String AXIS_BINDING_OPERATION = "AxisBindingOperation";
+
/**
* To chenge the conetext path from axis2/service to something else
*/
@@ -112,6 +114,7 @@
public static final String TCCL_DEFAULT = "default";
public static final String TCCL_COMPOSITE = "composite";
public static final String TCCL_SERVICE = "service";
+ public static final String FAULT_NAME = "faultName";
/**
* Field REQUEST_URL_PREFIX
@@ -255,10 +258,14 @@
public static final String HTTP_METHOD_GET = "GET";
+ public static final String HTTP_METHOD_DELETE = "DELETE";
+ public static final String HTTP_METHOD_PUT = "PUT";
public static final String HTTP_METHOD = "HTTP_METHOD";
public static final String HTTP_METHOD_POST = "POST";
public static final String CONTENT_TYPE = "ContentType";
+ public static final String CONTENT_TYPE_OF_FAULT = "ContentTypeOfFault";
+
public static final String IS_USING_SEPARATE_LISTENER = "IsUsingSeparateListener";
public static final String CONFIG_CONTEXT_TIMOUT_INTERVAL = "ConfigContextTimeoutInterval";
@@ -266,6 +273,7 @@
public static final String TRANSPORT_IN_URL = "TransportInURL";
public static final String URL_PARAMETER_LIST = "URLParameterList";
+ public static final String URL_HTTP_LOCATION_PARAMS_LIST = "HTTPLocationParamsList";
public static final String SEND_STACKTRACE_DETAILS_WITH_FAULTS = "sendStacktraceDetailsWithFaults";
@@ -293,7 +301,7 @@
/**
* If this is set to a Boolean 'true' value, the replyTo value will not be replaced in
- * an OutIn invocation. This is useful for modules that hope to get the reply message in
+ * an OutIn invocation. This is useful for modules that hope to get the reply message in
* its own manner.
*/
public static final String USE_CUSTOM_LISTENER = "UseCustomListener";
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReference.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReference.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReference.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReference.java Mon Feb 5 00:21:12 2007
@@ -45,12 +45,12 @@
private static final long serialVersionUID = 5278892171162372439L;
private static final Log log = LogFactory.getLog(EndpointReference.class);
-
+
/**
* <EndpointReference>
- * <Address>xs:anyURI</Address>
- * <ReferenceParameters>xs:any*</ReferenceParameters>
- * <MetaData>xs:any*</MetaData>
+ * <Address>xs:anyURI</Address>
+ * <ReferenceParameters>xs:any*</ReferenceParameters>
+ * <MetaData>xs:any*</MetaData>
* <!-- In addition to this, EPR can contain any number of OMElements -->
* </EndpointReference>
*/
@@ -139,7 +139,7 @@
/**
* hasAnonymousAddress
- *
+ *
* @return true if address is 'Anonymous URI'
*/
public boolean hasAnonymousAddress(){
@@ -157,20 +157,20 @@
}
return result;
}
-
+
/**
* hasNoneAddress
- *
+ *
* @return true if the address is the 'None URI' from the final addressing spec.
*/
public boolean hasNoneAddress() {
boolean result = AddressingConstants.Final.WSA_NONE_URI.equals(address);
- if(log.isTraceEnabled()){
- log.trace("hasNoneAddress: "+address+" is None: "+result);
+ if (log.isTraceEnabled()) {
+ log.trace("hasNoneAddress: " + address + " is None: " + result);
}
return result;
}
-
+
/**
* @param localName
* @param ns
@@ -242,7 +242,6 @@
}
/**
- *
* @param name
* @deprecated
*/
@@ -259,14 +258,14 @@
public void setReferenceParameters(Map referenceParameters) {
this.referenceParameters = referenceParameters;
}
-
+
/*
- * (non-Javadoc)
- * @see java.lang.Object#toString()
- */
+ * (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
public String toString() {
StringBuffer buffer = new StringBuffer("Address: " + address);
-
+
if(addressAttributes != null){
buffer.append(", Address Attributes: ").append(addressAttributes);
}
@@ -276,20 +275,19 @@
if (referenceParameters != null)
buffer.append(", Reference Parameters: ").append(referenceParameters);
-
+
if (extensibleElements != null)
buffer.append(", Extensibility elements: ").append(extensibleElements);
-
+
if (attributes != null)
buffer.append(", Attributes: ").append(attributes);
-
+
return buffer.toString();
}
/**
- *
* @param eprOMElement
- * @deprecated use {@link org.apache.axis2.addressing.EndpointReferenceHelper#fromOM(OMElement)} instead.
+ * @deprecated use {@link EndpointReferenceHelper#fromOM(OMElement)} instead.
*/
public void fromOM(OMElement eprOMElement) {
OMElement addressElement = eprOMElement.getFirstChildWithName(new QName("Address"));
@@ -336,26 +334,25 @@
OMAttribute attribute = (OMAttribute) allAttributes.next();
attributes.add(attribute);
}
-
+
Iterator childElements = eprOMElement.getChildElements();
while (childElements.hasNext()) {
OMElement eprChildElement = (OMElement) childElements.next();
String localName = eprChildElement.getLocalName();
- if(!localName.equals("Address") &&
- !localName.equals(AddressingConstants.EPR_REFERENCE_PARAMETERS) &&
- !localName.equals(AddressingConstants.Final.WSA_METADATA)){
+ if (!localName.equals("Address") &&
+ !localName.equals(AddressingConstants.EPR_REFERENCE_PARAMETERS) &&
+ !localName.equals(AddressingConstants.Final.WSA_METADATA)) {
addExtensibleElement(eprChildElement);
}
}
}
/**
- *
* @param nsurl
* @param localName
* @param prefix
* @throws AxisFault
- * @deprecated use {@link org.apache.axis2.addressing.EndpointReferenceHelper#toOM(EndpointReference, QName, String)} instead.
+ * @deprecated use {@link EndpointReferenceHelper#toOM(EndpointReference, QName, String)} instead.
*/
public OMElement toOM(String nsurl, String localName, String prefix) throws AxisFault {
OMFactory fac = OMAbstractFactory.getOMFactory();
@@ -365,7 +362,7 @@
OMNamespace wsaNS = fac.createOMNamespace(AddressingConstants.Final.WSA_NAMESPACE, AddressingConstants.WSA_DEFAULT_PREFIX);
OMElement addressE = fac.createOMElement(AddressingConstants.EPR_ADDRESS, wsaNS, epr);
addressE.setText(address);
-
+
if (addressAttributes != null) {
Iterator attrIter = addressAttributes.iterator();
while (attrIter.hasNext()) {
@@ -389,7 +386,7 @@
refParameterElement.addChild((OMNode) refParms.next());
}
}
-
+
if (attributes != null) {
Iterator attrIter = attributes.iterator();
while (attrIter.hasNext()) {
@@ -397,7 +394,7 @@
epr.addAttribute(omAttributes);
}
}
-
+
// add xs:any
ArrayList omElements = extensibleElements;
if (omElements != null) {
@@ -405,13 +402,12 @@
epr.addChild((OMElement) omElements.get(i));
}
}
-
+
return epr;
} else {
throw new AxisFault("prefix must be specified");
}
}
-
/**
* Compares key parts of the state from the current instance of
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Stub.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Stub.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Stub.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Stub.java Mon Feb 5 00:21:12 2007
@@ -18,14 +18,22 @@
package org.apache.axis2.client;
import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMAttribute;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
import org.apache.axiom.soap.SOAP11Constants;
import org.apache.axiom.soap.SOAP12Constants;
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFactory;
import org.apache.axiom.soap.SOAPProcessingException;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.context.MessageContext;
import org.apache.axis2.description.AxisService;
import org.apache.axis2.i18n.Messages;
+import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.commons.httpclient.Header;
import java.util.ArrayList;
@@ -37,7 +45,7 @@
* underscore character to avoid conflicts with actual implementation methods.
*/
public abstract class Stub {
-
+
protected AxisService _service;
protected ArrayList modules = new ArrayList();
@@ -46,7 +54,7 @@
/**
* Get service client implementation used by this stub.
- *
+ *
* @return service client
*/
public ServiceClient _getServiceClient() {
@@ -57,7 +65,7 @@
* Set service client implementation used by this stub. Once set, the
* service client is owned by this stub and will automatically be removed
* from the configuration when use of the stub is done.
- *
+ *
* @param _serviceClient
*/
public void _setServiceClient(ServiceClient _serviceClient) {
@@ -68,9 +76,9 @@
* Create a SOAP message envelope using the supplied options.
* TODO generated stub code should use this method, or similar method taking
* an operation client
- *
+ *
* @param options
- * @return generated
+ * @return generated
* @throws SOAPProcessingException
*/
protected static SOAPEnvelope createEnvelope(Options options) throws SOAPProcessingException {
@@ -79,7 +87,7 @@
/**
* Get Axiom factory appropriate to selected SOAP version.
- *
+ *
* @param soapVersionURI
* @return factory
*/
@@ -98,21 +106,114 @@
/**
* Finalize method called by garbage collection. This is overridden to
* support cleanup of any associated resources.
- *
+ *
* @throws Throwable
*/
protected void finalize() throws Throwable {
- super.finalize();
- cleanup();
+ super.finalize();
+ cleanup();
}
/**
* Cleanup associated resources. This removes the axis service from the
* configuration.
- *
+ *
* @throws AxisFault
*/
public void cleanup() throws AxisFault {
_service.getAxisConfiguration().removeService(_service.getName());
}
+
+ /**
+ * sets the EPR in operation client. First get the available EPR from the service client
+ * and then append the addressFromBinding string to available address
+ *
+ * @param _operationClient
+ * @param addressFromBinding
+ * return existing address
+ */
+
+
+ protected String setAppendAddressToEPR(OperationClient _operationClient,
+ String addressFromBinding) {
+ EndpointReference toEPRFromServiceClient = _serviceClient.getOptions().getTo();
+
+ String oldAddress = toEPRFromServiceClient.getAddress();
+ String address = toEPRFromServiceClient.getAddress();
+
+ // here we assume either addressFromBinding have a '?' infront or not
+ if (addressFromBinding.charAt(0) != '?') {
+ addressFromBinding = "/" + addressFromBinding;
+ }
+
+ address += addressFromBinding;
+ toEPRFromServiceClient.setAddress(address);
+ _operationClient.getOptions().setTo(toEPRFromServiceClient);
+ return oldAddress;
+ }
+
+ /**
+ * sets the epr of the service client to given value
+ * @param address
+ */
+
+ protected void setServiceClientEPR(String address) {
+ EndpointReference toEPRFromServiceClient = _serviceClient.getOptions().getTo();
+ toEPRFromServiceClient.setAddress(address);
+ }
+
+ /**
+ * add an http header with name and value to message context
+ *
+ * @param messageContext
+ * @param name
+ * @param value
+ */
+ protected void addHttpHeader(MessageContext messageContext,
+ String name,
+ String value) {
+ java.lang.Object headersObj = messageContext.getProperty(HTTPConstants.HTTP_HEADERS);
+ if (headersObj == null) {
+ headersObj = new java.util.ArrayList();
+ }
+ java.util.List headers = (java.util.List) headersObj;
+ Header header = new Header();
+ header.setName(name);
+ header.setValue(value);
+ headers.add(header);
+ messageContext.setProperty(HTTPConstants.HTTP_HEADERS, headers);
+ }
+
+ /**
+ * sets the propertykey and propertyValue as a pair to operation client
+ * @param operationClient
+ * @param propertyKey
+ * @param propertyValue
+ */
+
+ protected void addPropertyToOperationClient(OperationClient operationClient,
+ String propertyKey,
+ Object propertyValue){
+ operationClient.getOptions().setProperty(propertyKey,propertyValue);
+ }
+
+ protected void addPropertyToOperationClient(OperationClient operationClient,
+ String propertyKey,
+ boolean value){
+ addPropertyToOperationClient(operationClient,propertyKey,new Boolean(value));
+ }
+
+ protected void addPropertyToOperationClient(OperationClient operationClient,
+ String propertyKey,
+ int value){
+ addPropertyToOperationClient(operationClient,propertyKey,new Integer(value));
+ }
+
+ protected void setMustUnderstand(OMElement headerElement, OMNamespace omNamespace){
+ OMFactory omFactory = OMAbstractFactory.getOMFactory();
+ OMAttribute mustUnderstandAttribute =
+ omFactory.createOMAttribute(SOAP12Constants.ATTR_MUSTUNDERSTAND,omNamespace, "true");
+ headerElement.addAttribute(mustUnderstandAttribute);
+ }
+
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/OperationContextFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/OperationContextFactory.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/OperationContextFactory.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/OperationContextFactory.java Mon Feb 5 00:21:12 2007
@@ -37,11 +37,11 @@
*/
public static OperationContext createOperationContext(int mepURI, AxisOperation axisOp)
throws AxisFault {
- if ((WSDL20_2004Constants.MEP_CONSTANT_IN_OUT == mepURI) || (WSDL20_2004Constants.MEP_CONSTANT_IN_ONLY == mepURI)
- || (WSDL20_2004Constants.MEP_CONSTANT_IN_OPTIONAL_OUT == mepURI)
- || (WSDL20_2004Constants.MEP_CONSTANT_ROBUST_IN_ONLY == mepURI) || (WSDL20_2004Constants.MEP_CONSTANT_OUT_ONLY == mepURI)
- || (WSDL20_2004Constants.MEP_CONSTANT_OUT_IN == mepURI) || (WSDL20_2004Constants.MEP_CONSTANT_OUT_OPTIONAL_IN == mepURI)
- || (WSDL20_2004Constants.MEP_CONSTANT_ROBUST_OUT_ONLY == mepURI)) {
+ if ((WSDLConstants.MEP_CONSTANT_IN_OUT == mepURI) || (WSDLConstants.MEP_CONSTANT_IN_ONLY == mepURI)
+ || (WSDLConstants.MEP_CONSTANT_IN_OPTIONAL_OUT == mepURI)
+ || (WSDLConstants.MEP_CONSTANT_ROBUST_IN_ONLY == mepURI) || (WSDLConstants.MEP_CONSTANT_OUT_ONLY == mepURI)
+ || (WSDLConstants.MEP_CONSTANT_OUT_IN == mepURI) || (WSDLConstants.MEP_CONSTANT_OUT_OPTIONAL_IN == mepURI)
+ || (WSDLConstants.MEP_CONSTANT_ROBUST_OUT_ONLY == mepURI)) {
return new OperationContext(axisOp);
} else {
throw new AxisFault(Messages.getMessage("unSupportedMEP", "ID is " + mepURI));
@@ -51,11 +51,11 @@
public static OperationContext createOperationContext(int mepURI, AxisOperation axisOp,
ServiceContext serviceContext)
throws AxisFault {
- if ((WSDL20_2004Constants.MEP_CONSTANT_IN_OUT == mepURI) || (WSDL20_2004Constants.MEP_CONSTANT_IN_ONLY == mepURI)
- || (WSDL20_2004Constants.MEP_CONSTANT_IN_OPTIONAL_OUT == mepURI)
- || (WSDL20_2004Constants.MEP_CONSTANT_ROBUST_IN_ONLY == mepURI) || (WSDL20_2004Constants.MEP_CONSTANT_OUT_ONLY == mepURI)
- || (WSDL20_2004Constants.MEP_CONSTANT_OUT_IN == mepURI) || (WSDL20_2004Constants.MEP_CONSTANT_OUT_OPTIONAL_IN == mepURI)
- || (WSDL20_2004Constants.MEP_CONSTANT_ROBUST_OUT_ONLY == mepURI)) {
+ if ((WSDLConstants.MEP_CONSTANT_IN_OUT == mepURI) || (WSDLConstants.MEP_CONSTANT_IN_ONLY == mepURI)
+ || (WSDLConstants.MEP_CONSTANT_IN_OPTIONAL_OUT == mepURI)
+ || (WSDLConstants.MEP_CONSTANT_ROBUST_IN_ONLY == mepURI) || (WSDLConstants.MEP_CONSTANT_OUT_ONLY == mepURI)
+ || (WSDLConstants.MEP_CONSTANT_OUT_IN == mepURI) || (WSDLConstants.MEP_CONSTANT_OUT_OPTIONAL_IN == mepURI)
+ || (WSDLConstants.MEP_CONSTANT_ROBUST_OUT_ONLY == mepURI)) {
return new OperationContext(axisOp, serviceContext);
} else {
throw new AxisFault(Messages.getMessage("unSupportedMEP", "ID is " + mepURI));
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java Mon Feb 5 00:21:12 2007
@@ -305,7 +305,7 @@
protected MessageReceiver loadDefaultMessageReceiver(String mepURL, AxisService service) {
MessageReceiver messageReceiver;
if (mepURL == null) {
- mepURL = WSDLConstants.WSDL20_2004Constants.MEP_URI_IN_OUT;
+ mepURL = WSDLConstants.WSDL20_2006Constants.MEP_URI_IN_OUT;
}
if (service != null) {
messageReceiver = service.getMessageReceiver(mepURL);
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DescriptionBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DescriptionBuilder.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DescriptionBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DescriptionBuilder.java Mon Feb 5 00:21:12 2007
@@ -109,7 +109,7 @@
AxisService service) {
MessageReceiver messageReceiver;
if (mepURL == null) {
- mepURL = WSDLConstants.WSDL20_2004Constants.MEP_URI_IN_OUT;
+ mepURL = WSDLConstants.WSDL20_2006Constants.MEP_URI_IN_OUT;
}
if (service != null) {
messageReceiver = service.getMessageReceiver(mepURL);
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java Mon Feb 5 00:21:12 2007
@@ -562,12 +562,12 @@
}
op_descrip.setName(new QName(opname));
String MEP = op_descrip.getMessageExchangePattern();
- if (WSDLConstants.WSDL20_2004Constants.MEP_URI_IN_ONLY.equals(MEP) ||
- WSDLConstants.WSDL20_2004Constants.MEP_URI_IN_OPTIONAL_OUT.equals(MEP) ||
- WSDLConstants.WSDL20_2004Constants.MEP_URI_OUT_OPTIONAL_IN.equals(MEP) ||
- WSDLConstants.WSDL20_2004Constants.MEP_URI_ROBUST_OUT_ONLY.equals(MEP) ||
- WSDLConstants.WSDL20_2004Constants.MEP_URI_ROBUST_IN_ONLY.equals(MEP) ||
- WSDLConstants.WSDL20_2004Constants.MEP_URI_IN_OUT.equals(MEP)) {
+ if (WSDLConstants.WSDL20_2006Constants.MEP_URI_IN_ONLY.equals(MEP) ||
+ WSDLConstants.WSDL20_2006Constants.MEP_URI_IN_OPTIONAL_OUT.equals(MEP) ||
+ WSDLConstants.WSDL20_2006Constants.MEP_URI_OUT_OPTIONAL_IN.equals(MEP) ||
+ WSDLConstants.WSDL20_2006Constants.MEP_URI_ROBUST_OUT_ONLY.equals(MEP) ||
+ WSDLConstants.WSDL20_2006Constants.MEP_URI_ROBUST_IN_ONLY.equals(MEP) ||
+ WSDLConstants.WSDL20_2006Constants.MEP_URI_IN_OUT.equals(MEP)) {
AxisMessage inaxisMessage = op_descrip
.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
if (inaxisMessage != null) {
@@ -575,11 +575,11 @@
}
}
- if (WSDLConstants.WSDL20_2004Constants.MEP_URI_OUT_ONLY.equals(MEP) ||
- WSDLConstants.WSDL20_2004Constants.MEP_URI_OUT_OPTIONAL_IN.equals(MEP) ||
- WSDLConstants.WSDL20_2004Constants.MEP_URI_IN_OPTIONAL_OUT.equals(MEP) ||
- WSDLConstants.WSDL20_2004Constants.MEP_URI_ROBUST_OUT_ONLY.equals(MEP) ||
- WSDLConstants.WSDL20_2004Constants.MEP_URI_IN_OUT.equals(MEP)) {
+ if (WSDLConstants.WSDL20_2006Constants.MEP_URI_OUT_ONLY.equals(MEP) ||
+ WSDLConstants.WSDL20_2006Constants.MEP_URI_OUT_OPTIONAL_IN.equals(MEP) ||
+ WSDLConstants.WSDL20_2006Constants.MEP_URI_IN_OPTIONAL_OUT.equals(MEP) ||
+ WSDLConstants.WSDL20_2006Constants.MEP_URI_ROBUST_OUT_ONLY.equals(MEP) ||
+ WSDLConstants.WSDL20_2006Constants.MEP_URI_IN_OUT.equals(MEP)) {
AxisMessage outAxisMessage = op_descrip
.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
if (outAxisMessage != null) {
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java Mon Feb 5 00:21:12 2007
@@ -207,6 +207,10 @@
((WSDL11ToAxisServiceBuilder) axisServiceBuilder).setCustomWSLD4JResolver(
new AARBasedWSDLLocator(baseURI, serviceArchiveFile, in));
+ } else if (axisServiceBuilder instanceof WSDL20ToAxisServiceBuilder) {
+ // trying to use the jar scheme as the base URI. I think this can be used to handle
+ // wsdl 1.1 as well without using a custome URI resolver. Need to look at it later.
+ axisServiceBuilder.setBaseUri("jar:file:/"+ serviceArchiveFile.getAbsolutePath() + "!/" + baseURI);
}
} else {
if (serviceArchiveFile != null) {
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java Mon Feb 5 00:21:12 2007
@@ -354,9 +354,9 @@
AxisOperation operation;
String opName = jmethod.getSimpleName();
if (jmethod.getReturnType().isVoidType()) {
- operation = AxisOperationFactory.getAxisOperation(WSDLConstants.WSDL20_2004Constants.MEP_CONSTANT_IN_ONLY);
+ operation = AxisOperationFactory.getAxisOperation(WSDLConstants.MEP_CONSTANT_IN_ONLY);
} else {
- operation = AxisOperationFactory.getAxisOperation(WSDLConstants.WSDL20_2004Constants.MEP_CONSTANT_IN_OUT);
+ operation = AxisOperationFactory.getAxisOperation(WSDLConstants.MEP_CONSTANT_IN_OUT);
AxisMessage outMessage = operation.getMessage(
WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
outMessage.setElementQName(table.getQNamefortheType(jmethod.getSimpleName() +
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java?view=diff&rev=503585&r1=503584&r2=503585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java Mon Feb 5 00:21:12 2007
@@ -49,12 +49,10 @@
public static final String STYLE_DOC = "doc";
private static final Log log = LogFactory.getLog(AxisOperation.class);
-
-
/**
* message exchange pattern
*/
- private int mep = WSDL20_2004Constants.MEP_CONSTANT_INVALID;
+ private int mep = WSDLConstants.MEP_CONSTANT_INVALID;
/**
* list of engaged modules
@@ -90,7 +88,7 @@
* constructor
*/
public AxisOperation() {
- mepURI = WSDL20_2004Constants.MEP_URI_IN_OUT;
+ mepURI = WSDL20_2006Constants.MEP_URI_IN_OUT;
modulerefs = new ArrayList();
moduleConfigmap = new HashMap();
faultMessages = new ArrayList();
@@ -407,31 +405,31 @@
* up value so that the subsequent method calls are extremely efficient.
*/
public int getAxisSpecifMEPConstant() {
- if (this.mep != WSDL20_2004Constants.MEP_CONSTANT_INVALID) {
+ if (this.mep != WSDLConstants.MEP_CONSTANT_INVALID) {
return this.mep;
}
- int temp = WSDL20_2004Constants.MEP_CONSTANT_INVALID;
+ int temp = WSDLConstants.MEP_CONSTANT_INVALID;
- if (WSDL20_2004Constants.MEP_URI_IN_OUT.equals(mepURI) || WSDL20_2006Constants.MEP_URI_IN_OUT.equals(mepURI)) {
- temp = WSDL20_2004Constants.MEP_CONSTANT_IN_OUT;
- } else if (WSDL20_2004Constants.MEP_URI_IN_ONLY.equals(mepURI) || WSDL20_2006Constants.MEP_URI_IN_ONLY.equals(mepURI)) {
- temp = WSDL20_2004Constants.MEP_CONSTANT_IN_ONLY;
- } else if (WSDL20_2004Constants.MEP_URI_IN_OPTIONAL_OUT.equals(mepURI) || WSDL20_2006Constants.MEP_URI_IN_OPTIONAL_OUT.equals(mepURI)) {
- temp = WSDL20_2004Constants.MEP_CONSTANT_IN_OPTIONAL_OUT;
- } else if (WSDL20_2004Constants.MEP_URI_OUT_IN.equals(mepURI) || WSDL20_2006Constants.MEP_URI_OUT_IN.equals(mepURI)) {
- temp = WSDL20_2004Constants.MEP_CONSTANT_OUT_IN;
- } else if (WSDL20_2004Constants.MEP_URI_OUT_ONLY.equals(mepURI) || WSDL20_2006Constants.MEP_URI_OUT_ONLY.equals(mepURI)) {
- temp = WSDL20_2004Constants.MEP_CONSTANT_OUT_ONLY;
- } else if (WSDL20_2004Constants.MEP_URI_OUT_OPTIONAL_IN.equals(mepURI) || WSDL20_2006Constants.MEP_URI_OUT_OPTIONAL_IN.equals(mepURI)) {
- temp = WSDL20_2004Constants.MEP_CONSTANT_OUT_OPTIONAL_IN;
- } else if (WSDL20_2004Constants.MEP_URI_ROBUST_IN_ONLY.equals(mepURI) || WSDL20_2006Constants.MEP_URI_ROBUST_IN_ONLY.equals(mepURI)) {
- temp = WSDL20_2004Constants.MEP_CONSTANT_ROBUST_IN_ONLY;
- } else if (WSDL20_2004Constants.MEP_URI_ROBUST_OUT_ONLY.equals(mepURI) || WSDL20_2006Constants.MEP_URI_ROBUST_OUT_ONLY.equals(mepURI)) {
- temp = WSDL20_2004Constants.MEP_CONSTANT_ROBUST_OUT_ONLY;
+ if (WSDL20_2006Constants.MEP_URI_IN_OUT.equals(mepURI)) {
+ temp = WSDLConstants.MEP_CONSTANT_IN_OUT;
+ } else if (WSDL20_2006Constants.MEP_URI_IN_ONLY.equals(mepURI)) {
+ temp = WSDLConstants.MEP_CONSTANT_IN_ONLY;
+ } else if (WSDL20_2006Constants.MEP_URI_IN_OPTIONAL_OUT.equals(mepURI)) {
+ temp = WSDLConstants.MEP_CONSTANT_IN_OPTIONAL_OUT;
+ } else if (WSDL20_2006Constants.MEP_URI_OUT_IN.equals(mepURI)) {
+ temp = WSDLConstants.MEP_CONSTANT_OUT_IN;
+ } else if (WSDL20_2006Constants.MEP_URI_OUT_ONLY.equals(mepURI)) {
+ temp = WSDLConstants.MEP_CONSTANT_OUT_ONLY;
+ } else if (WSDL20_2006Constants.MEP_URI_OUT_OPTIONAL_IN.equals(mepURI)) {
+ temp = WSDLConstants.MEP_CONSTANT_OUT_OPTIONAL_IN;
+ } else if (WSDL20_2006Constants.MEP_URI_ROBUST_IN_ONLY.equals(mepURI)) {
+ temp = WSDLConstants.MEP_CONSTANT_ROBUST_IN_ONLY;
+ } else if (WSDL20_2006Constants.MEP_URI_ROBUST_OUT_ONLY.equals(mepURI)) {
+ temp = WSDLConstants.MEP_CONSTANT_ROBUST_OUT_ONLY;
}
- if (temp == WSDL20_2004Constants.MEP_CONSTANT_INVALID) {
+ if (temp == WSDLConstants.MEP_CONSTANT_INVALID) {
throw new AxisError(Messages.getMessage("mepmappingerror"));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org