[ 
https://issues.apache.org/jira/browse/AXIS2-3291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Patrik Tennberg closed AXIS2-3291.
----------------------------------

    Resolution: Fixed

A bug fix has been provided by Morten Frank, the resolution can be found here 
AXIS2-3308.

https://issues.apache.org/jira/browse/AXIS2-3308



> An xsd-file specifies both elements and attributes as parts of a SOAP block 
> header. WSDL2Java generates all neccessary code for both elements and 
> attributes but only the elements are included in the actual SOAP request when 
> it arrives to the server
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3291
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3291
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Patrik Tennberg
>
> Our xsd-file specifies both elements and attributes as part of a SOAP block 
> header. WSDL2Java generates all neccessary code for both elements and 
> attributes but only the elements are included in the actual SOAP request.
> We are using the default databinding.
> The SOAP standard says (5.2.1) says:
> "Among these MAY be any or all of the following, which have special 
> significance for SOAP processing:
> encodingStyle attribute information item (see 5.1.1 SOAP encodingStyle 
> Attribute).
> role attribute information item (see 5.2.2 SOAP role Attribute).
> mustUnderstand attribute information item (see 5.2.3 SOAP mustUnderstand 
> Attribute).
> relay attribute information item (see 5.2.4 SOAP relay Attribute)."
> We interpret this as that you are allowed to include your own attributes in a 
> SOAP header block.
> The generated request looks like follows:
> <?xml version='1.0' encoding='UTF-8'?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
>                              <soapenv:Header>
>                                                           <ns3:metadata 
> xmlns:ns3="http://metadata.ntpsoa.nordea.com/object"; 
> soapenv:mustUnderstand="0">
>                                                                               
>          <ns3:userId>N231820</ns3:userId>
>                                                                               
>          <ns3:technicalUserId 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:nil="1" />
>                                                                               
>          <ns3:sessionId>String</ns3:sessionId>
>                                                                               
>          <ns3:requestId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xsi:nil="1" />
>                                                                               
>          <ns3:applicationId>String</ns3:applicationId>
>                                                                               
>          <ns3:userPresent>true</ns3:userPresent>
>                                                                               
>          <ns3:requestDomain>DK</ns3:requestDomain>
>                                                                               
>          <ns3:messageTimeStamp>2007-10-18T13:12:07.413Z</ns3:messageTimeStamp>
>                                                                               
>          <ns3:businessProcessId 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:nil="1" />
>                                                                               
>          <ns3:authMethod>String</ns3:authMethod>
>                                                                               
>          <ns3:officeMode>OFFICE</ns3:officeMode>
>                                                                               
>          <ns3:test>false</ns3:test>
>                                                                               
>          <ns3:testParams 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:nil="1" />
>                                                           </ns3:metadata>
>                              </soapenv:Header>
>                              <soapenv:Body>
>                                                           
> <ns1:FindHelloWorldRequest 
> xmlns:ns1="http://helloworld.ntpref.nordea.com/object/v1";>
>                                                                               
>          <ns1:HelloWorldType>
>                                                                               
>                                       <ns1:Hello>Hello</ns1:Hello>
>                                                                               
>          </ns1:HelloWorldType>
>                                                           
> </ns1:FindHelloWorldRequest>
>                              </soapenv:Body>
> </soapenv:Envelope>
> The edited source XSD-file looks like this:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:mo="http://metadata.ntpsoa.nordea.com/object"; 
> xmlns:xs="http://www.w3.org/2001/XMLSchema";
>       targetNamespace="http://metadata.ntpsoa.nordea.com/object"; 
> elementFormDefault="qualified"
>       attributeFormDefault="unqualified" version="1.0">
>       
>       <xs:simpleType name="officeMode">
>               <xs:restriction base="xs:string">
>                       <xs:enumeration value="OFFICE"></xs:enumeration>
>                       <xs:enumeration value="REMOTE"></xs:enumeration>
>                       <xs:enumeration value="NETBANK"></xs:enumeration>
>               </xs:restriction>
>       </xs:simpleType>
>       <xs:complexType name="businessProcessId">
>               <xs:sequence>
>                       <xs:element name="processId" type="xs:string" />
>                       <xs:element name="instanceId" type="xs:string" />
>               </xs:sequence>
>       </xs:complexType>
>       <xs:complexType name="testParam">
>               <xs:simpleContent>
>                       <xs:extension base="xs:string">
>                               <xs:attribute name="target" type="xs:string" 
> use="optional">
>                                       <xs:annotation>
>                                               <xs:documentation>
>                                                       The layer or component 
> that this test parameter is intended for. Components are expected to
>                                                       ignore params targeted 
> at others. Easily selectable using XPath:
>                                                       //[EMAIL 
> PROTECTED]'mycomponent']
>                                               </xs:documentation>
>                                       </xs:annotation>
>                               </xs:attribute>
>                       </xs:extension>
>               </xs:simpleContent>
>       </xs:complexType>
>       <xs:complexType name="metadata">
>               </xs:annotation>
>               <xs:sequence>
>                       <xs:element name="userId" type="xs:string" 
> nillable="false">
>                       </xs:element>
>                       <xs:element name="technicalUserId" type="xs:string" 
> nillable="true">
>                               </xs:annotation>
>                       </xs:element>
>                       <xs:element name="sessionId" type="xs:string" 
> nillable="false">
>                       </xs:element>
>                       
>                       // Removed all of the other elements to keep it short 
> and sweet
>                       
>     </xs:sequence>
>               <xs:attribute name="schemaVersion" type="xs:string" 
> use="required">
>                       <xs:annotation>
>                               <xs:documentation>
>                                       Identifies the version of this schema 
> used for creating the metadata. Currently this should always
>                                       be schemaVersion="1.0".
>                               </xs:documentation>
>                       </xs:annotation>
>               </xs:attribute>
>               <xs:anyAttribute processContents="lax"/>
>       </xs:complexType>
>       <xs:element name="metadata" type="mo:metadata" >
>               <xs:annotation>
>                       <xs:documentation>Element containing metadata 
> information</xs:documentation>
>               </xs:annotation>
>       </xs:element>
> </xs:schema>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to