You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-commits@ws.apache.org by sc...@apache.org on 2005/10/19 22:44:18 UTC

svn commit: r326699 - /webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/porttype/impl/MetadataExchangePortTypeImpl.java

Author: scamp
Date: Wed Oct 19 13:44:16 2005
New Revision: 326699

URL: http://svn.apache.org/viewcvs?rev=326699&view=rev
Log: (empty)

Modified:
    webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/porttype/impl/MetadataExchangePortTypeImpl.java

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/porttype/impl/MetadataExchangePortTypeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/porttype/impl/MetadataExchangePortTypeImpl.java?rev=326699&r1=326698&r2=326699&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/porttype/impl/MetadataExchangePortTypeImpl.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/porttype/impl/MetadataExchangePortTypeImpl.java Wed Oct 19 13:44:16 2005
@@ -32,10 +32,6 @@
 import org.apache.ws.util.jndi.tools.MetadataConfigImpl;
 import org.apache.ws.util.jndi.tools.MetadataEntry;
 import org.apache.xmlbeans.XmlObject;
-import org.xmlsoap.schemas.soap.envelope.Envelope;
-import org.xmlsoap.schemas.soap.envelope.EnvelopeDocument;
-import org.xmlsoap.schemas.soap.envelope.Header;
-import org.xmlsoap.schemas.ws.x2004.x08.addressing.AttributedURI;
 import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType;
 import org.xmlsoap.schemas.ws.x2004.x09.mex.AnyXmlType;
 import org.xmlsoap.schemas.ws.x2004.x09.mex.GetMetadataDocument;
@@ -103,6 +99,7 @@
 						.addNewMetadataSection();
 				MetadataEntry metadataEntry = (MetadataEntry) metadataList.get(i);
 				XmlObject metadata = metadataEntry.getMetadata();
+				if(metadata == null) continue;
 				metadataSection.setDialect(dialectKey);
 				if ((identifier != null) && !"".equals(identifier)) {
 					metadataSection.setIdentifier(identifier);
@@ -148,49 +145,6 @@
 	 */
 	protected NamespaceVersionHolder getNamespaceSet() {
 		return NAMESPACE_SET;
-	}
-
-
-	/**
-	 * Builds a SOAP Envelope based on the EPR and makes a request to retrieve
-	 * the metadata.
-	 * 
-	 * @param address
-	 * @param endpointReferenceType
-	 * @return The SOAP Envelope for making a request.
-	 */
-	private EnvelopeDocument buildSoapEnvelopeForGet(String address,
-			EndpointReferenceType endpointReferenceType) {
-		EnvelopeDocument envelopeDocument = EnvelopeDocument.Factory
-				.newInstance();
-		Envelope envelope = envelopeDocument.addNewEnvelope();
-		envelope.addNewBody();
-		Header header = envelope.addNewHeader();
-		XmlObject toElem;
-		XmlObject actionElem;
-		org.xmlsoap.schemas.ws.x2004.x08.addressing.ToDocument toDoc = org.xmlsoap.schemas.ws.x2004.x08.addressing.ToDocument.Factory
-				.newInstance();
-		AttributedURI attributedURI = toDoc.addNewTo();
-		attributedURI.setStringValue(address);
-		toElem = toDoc;
-		org.xmlsoap.schemas.ws.x2004.x08.addressing.ActionDocument actionDoc = org.xmlsoap.schemas.ws.x2004.x08.addressing.ActionDocument.Factory
-				.newInstance();
-		AttributedURI actionType = actionDoc.addNewAction();
-		actionType.setStringValue(MetadataExchangeConstants.ACTION_GET_REQUEST);
-		actionElem = actionDoc;
-
-		XmlBeanUtils.addChildElement(header, toElem);
-		XmlBeanUtils.addChildElement(header, actionElem);
-		if (endpointReferenceType.getReferenceProperties() != null) {
-			XmlObject[] refPropElems = XmlBeanUtils
-					.getChildElements(endpointReferenceType
-							.getReferenceProperties());
-			for (int i = 0; i < refPropElems.length; i++) {
-				XmlBeanUtils.addChildElement(header, refPropElems[i]);
-			}
-		}
-
-		return envelopeDocument;
 	}
 
 	/**