axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <>
Subject RE: how to include custom soap header definition in wsdl using axis2 framework?
Date Mon, 30 Dec 2013 23:05:58 GMT
serviceClient.addStringHeader(new javax.xml.namespace.QName("","AdditionalSoapHeader"),"This
is a sample Header" );

Keep in mind 'header' has a strict definition .. if you want your SOAP header to pass validation
you *should* conform:
<xs:element name="header" type="wsoap12:tHeader"/>
  <xs:attributeGroup name="tHeaderAttributes">
    <xs:attribute name="message" type="xs:QName" use="required"/>
    <xs:attribute name="part" type="xs:NMTOKEN" use="required"/>
    <xs:attribute name="use" type="wsoap12:useChoice" use="required"/>
    <xs:attribute name="encodingStyle" type="xs:anyURI" use="optional"/>
    <xs:attribute name="namespace" type="xs:anyURI" use="optional"/>
   <xs:complexType name="tHeader">
     <xs:extension base="wsoap12:tExtensibilityElementOpenAttrs">
       <xs:element ref="wsoap12:headerfault" minOccurs="0" maxOccurs="unbounded"/>
      <xs:attributeGroup ref="wsoap12:tHeaderAttributes"/>
   <xs:element name="headerfault" type="wsoap12:tHeaderFault"/>
   <xs:complexType name="tHeaderFault">
      <xs:attributeGroup ref="wsoap12:tHeaderAttributes"/>
      <xs:anyAttribute namespace="##other" processContents="lax"/>
   <xs:element name="address" type="wsoap12:tAddress"/>
     <xs:complexType name="tAddress">
       <xs:extension base="wsoap12:tExtensibilityElementOpenAttrs">
        <xs:attribute name="location" type="xs:anyURI" use="required"/>

Be sure to keep conformity with
otherwise your validating parsers will fail..

Date: Tue, 31 Dec 2013 01:21:38 +0800
Subject: how to include custom soap header definition in wsdl using axis2 framework?

we are using axis2 framework and passing security session id as custom soap header. How to
include the soap header definition in wsdl?

PS: I posted the same question in stack overflow as well.
View raw message