Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 69060 invoked from network); 18 Jul 2007 08:56:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jul 2007 08:56:21 -0000 Received: (qmail 16013 invoked by uid 500); 18 Jul 2007 08:56:12 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 15877 invoked by uid 500); 18 Jul 2007 08:56:12 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 15866 invoked by uid 500); 18 Jul 2007 08:56:12 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 15863 invoked by uid 99); 18 Jul 2007 08:56:11 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2007 01:56:11 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2007 01:56:08 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 8D6081A981A; Wed, 18 Jul 2007 01:55:48 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r557203 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: deployment/util/ description/ transport/http/ transport/nhttp/ util/ Date: Wed, 18 Jul 2007 08:55:48 -0000 To: axis2-cvs@ws.apache.org From: davidillsley@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070718085548.8D6081A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: davidillsley Date: Wed Jul 18 01:55:47 2007 New Revision: 557203 URL: http://svn.apache.org/viewvc?view=rev&rev=557203 Log: Fix up MEP processing for WSDL2.0 and action processing for both wsdl 1.1 and wsdl 2.0 Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/Axis2HttpRequest.java webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java 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=557203&r1=557202&r2=557203 ============================================================================== --- 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 Wed Jul 18 01:55:47 2007 @@ -381,7 +381,7 @@ } pinfo.setOperationPhases(operation); axisService.addOperation(operation); - if (operation.getInputAction() == null) { + if (operation.getSoapAction() == null) { operation.setSoapAction("urn:" + opName); } } 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=557203&r1=557202&r2=557203 ============================================================================== --- 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 Wed Jul 18 01:55:47 2007 @@ -507,9 +507,25 @@ public void setSoapAction(String soapAction) { this.soapAction = soapAction; } - + + /* + * Convenience method to access the WS-A Input Action per the + * WS-A spec. Effectively use the soapAction if available else + * use the first entry in the WSA Mapping list. + * + * Use getSoapAction when you want to get the soap action and this + * when you want to get the wsa input action. + */ public String getInputAction() { - return soapAction; + String result = null; + if(soapAction != null && !"".equals(soapAction)){ + result = soapAction; + }else{ + if(wsamappingList != null && !wsamappingList.isEmpty()){ + result = (String)wsamappingList.get(0); + } + } + return result; } public String getOutputAction() { @@ -565,5 +581,9 @@ public AxisService getAxisService() { return (AxisService)getParent(); } + + public String getSoapAction() { + return soapAction; + } } Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java?view=diff&rev=557203&r1=557202&r2=557203 ============================================================================== --- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java (original) +++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java Wed Jul 18 01:55:47 2007 @@ -573,7 +573,7 @@ OMElement operation = fac.createOMElement(OPERATION_LOCAL_NAME, wsdl); binding.addChild(operation); - String soapAction = axisOperation.getInputAction(); + String soapAction = axisOperation.getSoapAction(); if (soapAction == null) { soapAction = ""; } @@ -713,7 +713,7 @@ OMElement operation = fac.createOMElement(OPERATION_LOCAL_NAME, wsdl); binding.addChild(operation); - String soapAction = axisOperation.getInputAction(); + String soapAction = axisOperation.getSoapAction(); if (soapAction == null) { soapAction = ""; } Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java?view=diff&rev=557203&r1=557202&r2=557203 ============================================================================== --- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java (original) +++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java Wed Jul 18 01:55:47 2007 @@ -74,6 +74,7 @@ import org.apache.woden.wsdl20.xml.TypesElement; import org.apache.woden.wsdl20.xml.DocumentationElement; import org.apache.woden.wsdl20.xml.DocumentableElement; +import org.apache.woden.xml.XMLAttr; import org.apache.ws.commons.schema.XmlSchema; import org.apache.ws.commons.schema.utils.NamespaceMap; import org.w3c.dom.Document; @@ -368,6 +369,7 @@ DescriptionElement descriptionElement = null; if (wsdlURI != null && !"".equals(wsdlURI)) { description = readInTheWSDLFile(wsdlURI); + descriptionElement = description.toElement(); } else if (in != null) { DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory @@ -866,6 +868,18 @@ } else { MEP = pattern.toString(); } + if(!isServerSide){ + // If in the client, need to toggle in-out to out-in etc. + if(WSDL2Constants.MEP_URI_IN_OUT.equals(MEP)){ + MEP = WSDL2Constants.MEP_URI_OUT_IN; + } + if(WSDL2Constants.MEP_URI_IN_ONLY.equals(MEP)){ + MEP = WSDL2Constants.MEP_URI_OUT_ONLY; + } + if(WSDL2Constants.MEP_URI_IN_OPTIONAL_OUT.equals(MEP)){ + MEP = WSDL2Constants.MEP_URI_OUT_OPTIONAL_IN; + } + } axisOperation = AxisOperationFactory.getOperationDescription(MEP); axisOperation.setName(opName); @@ -971,6 +985,30 @@ message.setName(elementQName != null ? elementQName.getLocalPart() : axisOperation.getName().getLocalPart()); axisOperation.addMessage(message, messageLabel); + + if(WSDLConstants.MESSAGE_LABEL_IN_VALUE.equals(messageLabel)){ + XMLAttr xa = messageReference.toElement().getExtensionAttribute(new QName("http://www.w3.org/2006/05/addressing/wsdl","Action")); + if(xa!=null){ + String value = (String)xa.getContent(); + if(value != null){ + ArrayList al = axisOperation.getWSAMappingList(); + if(al == null){ + al = new ArrayList(); + axisOperation.setWsamappingList(al); + } + al.add(value); + } + } + }else{ + XMLAttr xa = messageReference.toElement().getExtensionAttribute(new QName("http://www.w3.org/2006/05/addressing/wsdl","Action")); + if(xa!=null){ + String value = (String)xa.getContent(); + if(value != null){ + axisOperation.setOutputAction(value); + } + } + } + // populate this map so that this can be used in SOAPBody based dispatching if (elementQName != null) { axisService Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java?view=diff&rev=557203&r1=557202&r2=557203 ============================================================================== --- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java (original) +++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java Wed Jul 18 01:55:47 2007 @@ -361,7 +361,7 @@ .length() == 0))) { // last option is to get it from the axis operation soapActionString = messageContext.getAxisOperation() - .getInputAction(); + .getSoapAction(); } } } Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/Axis2HttpRequest.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/Axis2HttpRequest.java?view=diff&rev=557203&r1=557202&r2=557203 ============================================================================== --- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/Axis2HttpRequest.java (original) +++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/Axis2HttpRequest.java Wed Jul 18 01:55:47 2007 @@ -126,7 +126,7 @@ soapAction = msgContext.getWSAAction(); } if (soapAction == null) { - msgContext.getAxisOperation().getInputAction(); + msgContext.getAxisOperation().getSoapAction(); } if (msgContext.isSOAP11() && soapAction != null && Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java?view=diff&rev=557203&r1=557202&r2=557203 ============================================================================== --- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java (original) +++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java Wed Jul 18 01:55:47 2007 @@ -264,7 +264,7 @@ opElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_REF, null, tns.getPrefix() + ":" + name)); opElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ACTION, wsoap, - axisOperation.getInputAction())); + axisOperation.getSoapAction())); } } --------------------------------------------------------------------- To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org For additional commands, e-mail: axis-cvs-help@ws.apache.org