title: How to parse Soap Envelope in Golang ?
body: <p>I am new to golang and Soap and having trouble in parsing soap msg. </p>
  
  <p>1.I have an Soap message</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;soap:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"&gt;
  &lt;soap:Body&gt;
  &lt;activationPack_completeResponse"http://tempuri.org/"&gt;
  &lt;activationPack_completeResult xsi:type="xsd:string"&gt;Active&lt;/activationPack_completeResult&gt;
  &lt;/activationPack_completeResponse&gt;
  &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>Now how should i Unmarshal them in golang what should be my struct declaration for tag Soap Envelope.</p>
  
  <p>I have some structure as below:</p>
  
  <pre><code>type MyRespEnvelope struct {
      XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
      Soap    *Body
  }
  type Body struct {
      XMLName     xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"`
      GetResponse *ActivationPack_CompleteResponse
  }
  type ActivationPack_CompleteResponse struct {
      XMLName xml.Name `xml:"activationPack_completeResponse"`
      Id      string   `xml:"xmlns,attr"`
      MyVar   string   `xml:"activationPack_completeResult"`
  } 
  </code></pre>
  
  <p>But I am getting error as below:</p>
  
  <pre><code>error: expected element &lt;Envelope&gt; in name space http://schemas.xmlsoap.org/soap/envelope/ but have soap*stopped,reason="end-stepping-range",frame={addr="0x0000000000401211",func="main.UnmarshalFirstDitto",args=[{name="data",value="\"\\nNotice: Undefined variable: area in /var/www/nusoap/dittotv.php on line 25\\n\\nNotice: Undefined variable: area in /var/www/nusoap/dittotv.php on line 27\\n\\nNotice: Undefined variable: area in /var/www/nu\"..."}],file="/media/winshare/Golang/WorkSpace/src/DittoTv/ditto.go",fullname="/media/winshare/Golang/WorkSpace/src/DittoTv/ditto.go",line="60"},thread-id="1",stopped-threads="all",core="0"
  </code></pre>
  
  <p>So someone please tell me how should i declare my structure so that i am able to parse the soap message.</p>