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 du...@apache.org on 2006/04/14 14:47:21 UTC
svn commit: r394074 - in
/webservices/axis/trunk/proposals/dug/java/src/org/apache/axis:
client/Call.java client/Service.java wsa/EndpointReference.java
Author: dug
Date: Fri Apr 14 05:47:19 2006
New Revision: 394074
URL: http://svn.apache.org/viewcvs?rev=394074&view=rev
Log:
per the latest WSA spec - pick up the ref-params in the wsdl
Modified:
webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/client/Call.java
webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/client/Service.java
webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/wsa/EndpointReference.java
Modified: webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/client/Call.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/client/Call.java?rev=394074&r1=394073&r2=394074&view=diff
==============================================================================
--- webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/client/Call.java (original)
+++ webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/client/Call.java Fri Apr 14 05:47:19 2006
@@ -1655,14 +1655,14 @@
else if ( obj instanceof UnknownExtensibilityElement ) {
UnknownExtensibilityElement ee =
(UnknownExtensibilityElement) obj ;
- QName QN1 = new QName( WSAConstants.NS_WSA1, "EndpointReference");
- QName QN2 = new QName( WSAConstants.NS_WSA2, "EndpointReference");
- if ( QN1.equals(ee.getElementType()) ||
- QN2.equals(ee.getElementType()) ) {
+ QName QN1 = new QName(WSAConstants.NS_WSA1,"ReferenceParameters");
+ QName QN2 = new QName(WSAConstants.NS_WSA2,"ReferenceParameters");
+ QName eeQ = ee.getElementType();
+ if ( QN1.equals(eeQ) || QN2.equals(eeQ) ) {
try {
- EndpointReference epr =
- EndpointReference.fromDOM( ee.getElement() );
- this.setTo( epr );
+ this.setTo( this.getTargetEndpointAddress() );
+ this.getTo().addReferenceParameters( ee.getElement() );
+ this.getTo().setWSAVersion( eeQ.getNamespaceURI() );
}
catch(Exception exp) {
throw new JAXRPCException(
Modified: webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/client/Service.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/client/Service.java?rev=394074&r1=394073&r2=394074&view=diff
==============================================================================
--- webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/client/Service.java (original)
+++ webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/client/Service.java Fri Apr 14 05:47:19 2006
@@ -513,14 +513,14 @@
else if ( obj instanceof UnknownExtensibilityElement ) {
UnknownExtensibilityElement ee =
(UnknownExtensibilityElement) obj ;
- QName QN1 = new QName( WSAConstants.NS_WSA1, "EndpointReference");
- QName QN2 = new QName( WSAConstants.NS_WSA2, "EndpointReference");
- if ( QN1.equals(ee.getElementType()) ||
- QN2.equals(ee.getElementType()) ) {
+ QName QN1 = new QName(WSAConstants.NS_WSA1,"ReferenceParameters");
+ QName QN2 = new QName(WSAConstants.NS_WSA2,"ReferenceParameters");
+ QName eeQ = ee.getElementType();
+ if ( QN1.equals(eeQ) || QN2.equals(eeQ) ) {
try {
- EndpointReference epr =
- EndpointReference.fromDOM( ee.getElement() );
- call.setTo( epr );
+ call.setTo( call.getTargetEndpointAddress() );
+ call.getTo().addReferenceParameters( ee.getElement() );
+ call.getTo().setWSAVersion( eeQ.getNamespaceURI() );
}
catch(Exception exp) {
throw new ServiceException(
Modified: webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/wsa/EndpointReference.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/wsa/EndpointReference.java?rev=394074&r1=394073&r2=394074&view=diff
==============================================================================
--- webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/wsa/EndpointReference.java (original)
+++ webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/wsa/EndpointReference.java Fri Apr 14 05:47:19 2006
@@ -153,34 +153,50 @@
}
nl = el.getElementsByTagNameNS(ns, "ReferenceProperties");
- if (nl.item(0)!=null) {
- nl = nl.item(0).getChildNodes();
-
- for ( int i = 0 ; nl != null && i < nl.getLength() ; i++ ) {
- Node n = nl.item(i);
- if ( n.getNodeType() != Node.ELEMENT_NODE ) continue ;
- n = n.cloneNode(true);
- er.addReferenceProperty( XMLUtils.ElementToString((Element) n) );
- }
- }
+ if (nl.item(0)!=null)
+ er.addReferenceProperties( (Element) nl.item(0) );
nl = el.getElementsByTagNameNS(ns, "ReferenceParameters");
- if (nl.item(0)!=null) {
- nl = nl.item(0).getChildNodes();
-
- for ( int i = 0 ; nl != null && i < nl.getLength() ; i++ ) {
- Node n = nl.item(i);
- if ( n.getNodeType() != Node.ELEMENT_NODE ) continue ;
- n = n.cloneNode(true);
- er.addReferenceParameter( XMLUtils.ElementToString((Element) n) );
- }
- }
+ if (nl.item(0)!=null)
+ er.addReferenceParameters( (Element) nl.item(0) );
}
if ( er.getAddress() == null ) {
String tmp = "Missing Address in EPR: " + XMLUtils.ElementToString(el);
throw new Exception( tmp );
}
return er ;
+ }
+
+ /**
+ * Passing in a wsa:ReferenceParameter element this will add all children
+ * add references parameters to the EPR
+ * @param refp The DOM element of the wsa:ReferenceParameter
+ */
+ public void addReferenceParameters(Element refp) {
+ NodeList nl = refp.getChildNodes();
+
+ for ( int i = 0 ; nl != null && i < nl.getLength() ; i++ ) {
+ Node n = nl.item(i);
+ if ( n.getNodeType() != Node.ELEMENT_NODE ) continue ;
+ n = n.cloneNode(true);
+ this.addReferenceParameter( XMLUtils.ElementToString((Element) n ));
+ }
+ }
+
+ /**
+ * Passing in a wsa:ReferenceProperties element this will add all children
+ * add references properties to the EPR
+ * @param refp The DOM element of the wsa:ReferenceProperties
+ */
+ public void addReferenceProperties(Element refp) {
+ NodeList nl = refp.getChildNodes();
+
+ for ( int i = 0 ; nl != null && i < nl.getLength() ; i++ ) {
+ Node n = nl.item(i);
+ if ( n.getNodeType() != Node.ELEMENT_NODE ) continue ;
+ n = n.cloneNode(true);
+ this.addReferenceProperty( XMLUtils.ElementToString((Element) n ));
+ }
}
/**