Hello,

We are having a problem with Rampart 1.2 generating the correct SOAP message for a complex type with attributes
and text content.  We are using Axis2 1.2.

In this example, the srcHost element within layer3Info, with type CtrlPlaneAddressContent, demonstrates the problem.

<xs:complexType name="CtrlPlaneAddressContent">
   <xs:simpleContent>
       <xs:extension base="xs:string">
           <xs:attribute use="optional" name="value" type="xs:string"/>
           <xs:attribute use="optional" name="type" type="xs:string"/>
       </xs:extension>
   </xs:simpleContent>
</xs:complexType>


<xsd:complexType name="layer3Info">
 <xsd:sequence>
   <xsd:element name="srcHost" type="ctrlp:CtrlPlaneAddressContent" />
   <xsd:element name="destHost" type="xsd:string" />
<xsd:element name="protocol" type="xsd:string" maxOccurs="1" minOccurs="0" /> <xsd:element name="srcIpPort" type="xsd:int" maxOccurs="1" minOccurs="0" /> <xsd:element name="destIpPort" type="xsd:int" maxOccurs="1" minOccurs="0" /> <xsd:element name="ingressNodeIP" type="xsd:string" maxOccurs="1" minOccurs="0" /> <xsd:element name="egressNodeIP" type="xsd:string" maxOccurs="1" minOccurs="0" />
 </xsd:sequence>
</xsd:complexType>


With Rampart ON:

<ns2:createReservation xmlns:ns2="http://oscars.es.net/OSCARS";>
 <startTime xmlns="http://oscars.es.net/OSCARS";>1184336344861</startTime>
 <endTime xmlns="http://oscars.es.net/OSCARS";>1184336560861</endTime>
 <bandwidth xmlns="http://oscars.es.net/OSCARS";>100</bandwidth>
 <burstLimit xmlns="http://oscars.es.net/OSCARS";>10000000</<burstLimit>
 <description xmlns="http://oscars.es.net/OSCARS";>test</<description>
 <path xmlns="http://oscars.es.net/OSCARS";>
   <pathSetupMode>unimplemented yet</pathSetupMode>
   <layer3>
     <srcHost type="" value="">
<string xmlns="http://www.w3.org/2001/XMLSchema";>207.75.164.204</string>
     </srcHost>

     <destHost>207.75.164.207</destHost>
     <protocol />
   </layer3>
 </path>
</ns2:createReservation>

With Rampart OFF:

<ns2:createReservation xmlns:ns2="http://oscars.es.net/OSCARS";>
 <ns2:startTime>1184336820383</ns2:startTime>
 <ns2:endTime>1184337036383</ns2:endTime>
 <ns2:bandwidth>100</ns2:bandwidth>
 <ns2:burstLimit>10000000</ns2:burstLimit>
 <ns2:description>test</ns2:description>
 <ns2:path>
   <ns2:pathSetupMode>unimplemented yet</ns2:pathSetupMode>
   <ns2:layer3>
     <ns2:srcHost>207.75.164.204</ns2:srcHost>
     <ns2:destHost>207.75.164.207</ns2:destHost>
     <ns2:protocol></ns2:protocol>
   </ns2:layer3>
 </ns2:path>
</ns2:createReservation>

The exception message we get with Rampart on is
org.apache.axiom.om.impl.exception.OMStreamingException: com.ctc.wstx.exc.WstxParsingException: Expected a text
token, got START_ELEMENT.at [row,col {unknown-source}]: [27,1008]

The problem is the string element that gets inserted by Rampart. Does anyone know of a fix for this?

Thanks,

-David Robertson
-Berkeley Lab

Reply via email to