I am using Axis 1.4 to generate Axis web service clients against an externally defined Web Service which has both elementFormDefault and attributeFormDefault set to qualified. However, in the SOAP message that the generated web service clients sends to the web service, neither the elements nor the attributes in the body of the SOAP message are qualified. For the elements, this is not an issue as a default namespace is provided in the root element of the content of the message body. However, in the case of attributes, this is an issue as according to W3 standards (which our web service provider is adhering to) "Default namespace declarations do not apply directly to attribute names; the interpretation of unprefixed attributes is determined by the element on which they appear" meaning that, presumably, all attributes in the message need to be quaified with a namepace or a default namespace needs to be specified in the actual element in which the attributes reside. Additionally, the produced XML does not conform to the XSD in XML Spy. The root element of the XSD is as follows:
<xsd:schema xmlns:cormac="http://www.ibm.com/cormac" xmlns:xsd=" http://www.w3.org/2001/XMLSchema" targetNamespace=" http://www.ibm.com/cormac" elementFormDefault="qualified" attributeFormDefault="qualified"> and the message produced by Axis is follows: <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ " xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header> <ns1:ServiceRequest xmlns:ns1="http://tempuri.org/CorMacServices/" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0"> <ns1:ServiceName> http://filenet4.lexington.ibm.com/CorMacServices/IpldTerroristLst </ns1:ServiceName> <ns1:Action>UploadTerroristList</ns1:Action> <ns1:From>WEBRSLTSBDC1001/SBAO</ns1:From> <ns1:MessageId>ABCD-5432-32AD-CD33-A332-14CD-54CD-A86D</ns1:MessageId> </ns1:ServiceRequest> <ns2:Security xmlns:ns2="http://tempuri.org/CorMacServices/" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0"> <ns2:Username>Shanker</ns2:Username> <ns2:UsernameToken Id="" UNPMechanismType="" UserType=""/> </ns2:Security> <ns3:ContactPoint xmlns:ns3="http://tempuri.org/CorMacServices/" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0"> <ns3:ContactPointType> http://filenet4.lexington.ibm.com/CorMacServices/IpldTerroristLst </ns3:ContactPointType> <ns3:ContactPointId>UploadTerroristList</ns3:ContactPointId> <ns3:ApplicationId>WEBRSLTSBDC1001/SBAO</ns3:ApplicationId> <ns3:InitialOriginatorId>WEBRSLTSBDC1001/SBAO</ns3:InitialOriginatorId> <ns3:InitialOriginatorType>WEBRSLTSBDC1001/SBAO</ns3:InitialOriginatorType> <ns3:OperatorType>WEBRSLTSBDC1001/SBAO</ns3:OperatorType> </ns3:ContactPoint> </soapenv:Header> <soapenv:Body> <FindParty xmlns="http://www.ibm.com/cormac"> <npleSearchCriteria> <searchByLEIdCriteria> <partyId System="CMD">8691210245836926</partyId> <registrationNumber/> </searchByLEIdCriteria> <searchByNameCriteria> <displayName/> <postalCode/> <registeredCountry code=""/> </searchByNameCriteria> <searchByAccountCriteria> <sortCode/> <accountNumber/> </searchByAccountCriteria> </npleSearchCriteria> </FindParty> </soapenv:Body> </soapenv:Envelope> with the crucial portion being <partyId System="CMD">8691210245836926</partyId> where the attribute System is unqualified. ==================================== Chris Wraith IBM Global Business Services Managing Consultant, Financial Services --------------------------------------------------------------- Mobile: 07841495592 Mobex: 263314 E-mail: [EMAIL PROTECTED] Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
