Author: thomas.diesler(a)jboss.com
Date: 2007-03-23 10:46:26 -0400 (Fri, 23 Mar 2007)
New Revision: 2672
Modified:
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/soap/XMLContent.java
Log:
Allow encodingStyle on envelope
Modified:
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
===================================================================
---
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2007-03-23
12:59:52 UTC (rev 2671)
+++
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2007-03-23
14:46:26 UTC (rev 2672)
@@ -212,8 +212,9 @@
}
// Process additional soap encoded body elements
- String encodingStyle = soapBody.getAttributeNS(envNS, "encodingStyle");
- while(Constants.URI_SOAP11_ENC.equals(encodingStyle) && itBody.hasNext())
+ boolean isSOAPEncoded =
Constants.URI_SOAP11_ENC.equals(soapEnv.getAttributeNS(envNS,
"encodingStyle"));
+ isSOAPEncoded = isSOAPEncoded ||
Constants.URI_SOAP11_ENC.equals(soapBody.getAttributeNS(envNS,
"encodingStyle"));
+ while(isSOAPEncoded && itBody.hasNext())
{
Element srcElement = (Element)itBody.next();
registerNamespacesLocally(srcElement);
Modified:
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/soap/XMLContent.java
===================================================================
---
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/soap/XMLContent.java 2007-03-23
12:59:52 UTC (rev 2671)
+++
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/soap/XMLContent.java 2007-03-23
14:46:26 UTC (rev 2672)
@@ -143,7 +143,7 @@
DeserializerSupport des =
(DeserializerSupport)deserializerFactory.getDeserializer();
Source source = xmlFragment.getSource();
-
+
// Get the rpc/encoded referenced content
if (opMetaData.isRPCEncoded() &&
container.getAttribute("href").length() > 0)
{
@@ -153,7 +153,7 @@
if (parentElement instanceof SOAPBodyElement)
{
SOAPContentElement refElement = null;
-
+
SOAPBody soapBody = (SOAPBody)parentElement.getParentElement();
Iterator it = soapBody.getChildElements();
while (it.hasNext())
@@ -162,17 +162,16 @@
if (refID.equals("#" +
soapElement.getAttribute("id")))
{
refElement = (SOAPContentElement)soapElement;
+ source = refElement.getXMLFragment().getSource();
break;
}
}
-
+
if (refElement == null)
- throw new IllegalStateException ("Cannot find referrenced element:
" + refID);
-
- source = refElement.getXMLFragment().getSource();
+ log.warn("Cannot find referrenced element: " + refID);
}
}
-
+
obj = des.deserialize(container.getElementQName(), xmlType, source,
serContext);
if (obj != null)
{
@@ -304,7 +303,7 @@
// Remove all child nodes
container.removeContents();
-
+
// Copy attributes
DOMUtils.copyAttributes(container, domElement);
Show replies by date