title: WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers
body: <p>I am trying to solve the below issue for last couple of days but still not able to resolve it. I have searched lots of forums but all in vain.</p>
  
  <p>*<em>Little bit of history:</em> My code was working well in the devp env but for accessing the production sever I received new URL and three new certificates after successfully including the certificates in new trust store file.I am facing below issue. Please help.</p>
  
  <pre><code>2013-11-25 11:32:30,373 INFO[BuilderUtil] OMException in getSOAPBuilder 
  org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers
   at [row,col {unknown-source}]:[1,46]
      at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
      at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:198)
      at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.&lt;init&gt;(StAXSOAPModelBuilder.java:154)
      at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.&lt;init&gt;(StAXSOAPModelBuilder.java:140)
      at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:686)
      at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:197)
      at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:145)
      at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:108)
      at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:67)
      at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:354)
      at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
      at org.apache.axis2.description.OutInAxisOperationClient$NonBlockingInvocationWorker.run(OutInAxisOperation.java:446)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers
   at [row,col {unknown-source}]: [1,46]
      at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:648)
      at com.ctc.wstx.sr.BasicStreamReader.startDTD(BasicStreamReader.java:2482)
      at com.ctc.wstx.sr.BasicStreamReader.nextFromPrologBang(BasicStreamReader.java:2398)
      at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2058)
      at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
      at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
      at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:668)
      at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
      ... 14 more
  2013-11-25 11:32:30,378 INFO   [BuilderUtil] Remaining input stream :[] 
  2013-11-25 11:32:30,380 DEBUG  [AuditUtilities] Request Message Id: urn:uuid:5f75a15c-ad57-4d00-b277-75fe7b1e241d 
  2013-11-25 11:32:30,380 DEBUG  [AuditUtilities] Response Message Id: null 
  2013-11-25 11:32:30,380 DEBUG  [AuditUtilities] Response Message Data: null 
  </code></pre>
  
  <p>My SOAP request seems me correct:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;&lt;soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"&gt;&lt;soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"&gt;&lt;ns4:product xmlns:ns4="http://ns.electronichealth.net.au/hi/xsd/common/CommonCoreElements/3.0" soapenv:mustUnderstand="false"&gt;&lt;ns4:vendor&gt;&lt;ns1:qualifier xmlns:ns1="http://ns.electronichealth.net.au/hi/xsd/common/QualifiedIdentifier/3.0"&gt;http://ns.electronichealth.net.au/id/hi/vendorid/1.0&lt;/ns1:qualifier&gt;&lt;ns1:id xmlns:ns1="http://ns.electronichealth.net.au/hi/xsd/common/QualifiedIdentifier/3.0"&gt;SDS&lt;/ns1:id&gt;&lt;/ns4:vendor&gt;&lt;ns4:productName&gt;HI&lt;/ns4:productName&gt;&lt;ns4:productVersion&gt;10.1&lt;/ns4:productVersion&gt;&lt;ns4:platform&gt;LINUX&lt;/ns4:platform&gt;&lt;/ns4:product&gt;&lt;h:signature xmlns:h="http://ns.electronichealth.net.au/hi/xsd/common/CommonCoreElements/3.0"&gt;&lt;ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"&gt;&lt;ds:SignedInfo&gt;&lt;ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /&gt;&lt;ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /&gt;&lt;ds:Reference URI="#body-c3c18409-d0df-4aed-b294-87af248c61f0"&gt;&lt;ds:Transforms&gt;&lt;ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /&gt;&lt;/ds:Transforms&gt;&lt;ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /&gt;&lt;ds:DigestValue&gt;3pGWeWvyYHDdsDTu0F7qATI3Jp4=&lt;/ds:DigestValue&gt;&lt;/ds:Reference&gt;&lt;ds:Reference URI="#timestamp-232e1ed9-f97a-4515-89bd-a3683fab0fce"&gt;&lt;ds:Transforms&gt;&lt;ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /&gt;&lt;/ds:Transforms&gt;&lt;ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /&gt;&lt;ds:DigestValue&gt;dGJxcKsX+y4jb0ndH1RQDqeWnTw=&lt;/ds:DigestValue&gt;&lt;/ds:Reference&gt;&lt;ds:Reference URI="#user-69d4eead-8b69-4e0a-85d7-b2a58867aaa0"&gt;&lt;ds:Transforms&gt;&lt;ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /&gt;&lt;/ds:Transforms&gt;&lt;ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /&gt;&lt;ds:DigestValue&gt;9ET9aqC4jkINuYY8OhKsAJPEwX8=&lt;/ds:DigestValue&gt;&lt;/ds:Reference&gt;&lt;/ds:SignedInfo&gt;&lt;ds:SignatureValue&gt;W24rpxUgpbTzxvJUoj5WpBsEssdaaddd56464t4eyYCAa2q9J0izrWIuukvOovde5h+xxxd1+5h/7JREGERGERGEGEGEGRTH5YT34R3EHYJGBDSEFERHJNFGGFFWEBzj7Jj3wfGs3WOLwsvhCuVBRY79mXTAxyQZYiUl7+tk3Pdm5YcSM0ZKfQJyUChIL1mjxALhwdCJkHOneJenjTgFaGRP+0iPF51TDc7l5ruxw8NdsSuN7P8D6lax3Fa4lck2iW/+t43yJ6cqTjZztMPuyKcYUgFhCS4334534234ERFGWBqyZhgRGFREGREG4543645FGER34WEFW4TERSygB8Gj+nx+217qRFTXD8/vcr8/BA1zWDLR05QdyZSDfuOfWTXpgfDcPTqedteeaww5cetv8L5J0dpFvRUkVDFGFGERcTOzmQALQZ+2C81RaNidKeQz++Q==&lt;/ds:SignatureValue&gt;&lt;ds:KeyInfo&gt;&lt;ds:X509Data&gt;&lt;ds:X509Certificate&gt;MIIF+zCCBOOgAwIBAgIDBWhPMA0GCSqGSIb3DQEBBQUAMH8xCzAJBgNVBAYTAkFVMQwwCgYDVQQKEwNHT1YxGzAZBgNVBAsTEk1lZGljYXJlIEF1c3RyYWxpYTFFMEMGA1UEAxM8VGVzdCBNZWRpY2FyZSBBdXN0cmFsaWEgT3JnYW5pc2F0aW9uIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDswdwsEWRWER435433dwdwqedTEyMDQzMDAxNDI0MloXDTE3MDQzMDAxNDI0MFowgbUxCzAJBgNVBAYTAkFVMQwwCgYDVQQIEwNBQ1QxFDASBgNVBAcTC1RVR0dFUkFOT05HMSYwJAYDVQQKEx1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5IHRoaXMgQ1AuMDAGCCsGAQUFBwIBFiRodHRwOi8vd3d3Lm1lZGljYXJlYXVzdHJhbGlhLmdvdi5hdS8wGQYJKiSjkJUXAc4ZBAwWCjU5NTQzODc2NTkwDgYDVR0PAQH/BAQDAgeAMBMGA1UdIwQMMAqACECvQwoiM+vJMDgGA1UdHwQxMC8wLaAroCmGJ2h0dHA6Ly9tYS10ZXN0LXBraS9NQU9DQUNSTHMvbGF0ZXN0LmNybDARBgNVHQ4ECgQITn3Ed1kIvoEwDQYJKoZIhvcNAQEFBQADggEBABq+Kl821YVzW8DE0xxLhjiD1CUDeqyrANQ0fszI83zedC2imcfvFoxPlZCpRLCmy434be22Flc0PDRCQcuZHa3sXj3PGsjpE2zhPP1sojD6riVR1ivu8CMh5XM+xiCsKwxIuXMWGUUm3xzNXv4VJ2fwk7Tpy+zmJbaxwu9ehyAcQpvJoirjicZ1qiapPFq4Y9qHecNOHt8Qe1fMrfmHJ2LxPvvTfNpX+VMYQsDGnhZ9yZgCXmi7+YfIk33605ddJGfzFh8Yp7PVAQtxbbHhSr+IqJTdpK8Tp/nPUJlzWZ1JKvWXRSzOH7OiuQVVda3tFUzPCCZ0El/ByIwwMmfDPy4=&lt;/ds:X509Certificate&gt;&lt;/ds:X509Data&gt;&lt;/ds:KeyInfo&gt;&lt;/ds:Signature&gt;&lt;/h:signature&gt;&lt;ns4:timestamp xmlns:ns4="http://ns.electronichealth.net.au/hi/xsd/common/CommonCoreElements/3.0" xml:id="timestamp-232e1ed9-f97a-4515-89bd-a3683fab0fce"&gt;&lt;ns4:created&gt;2013-11-25T11:32:27.296+11:00&lt;/ns4:created&gt;&lt;ns4:expires&gt;2013-11-25T12:32:27.296+11:00&lt;/ns4:expires&gt;&lt;/ns4:timestamp&gt;&lt;ns4:user xmlns:ns4="http://ns.electronichealth.net.au/hi/xsd/common/CommonCoreElements/3.0" xml:id="user-69d4eead-8b69-4e0a-85d7-b2a58867aaa0"&gt;&lt;ns1:qualifier xmlns:ns1="http://ns.electronichealth.net.au/hi/xsd/common/QualifiedIdentifier/3.0"&gt;http://sdspathology.com.au/id/hi/userid/1.0&lt;/ns1:qualifier&gt;&lt;ns1:id xmlns:ns1="http://ns.electronichealth.net.au/hi/xsd/common/QualifiedIdentifier/3.0"&gt;TEST_SDS_USER_ID&lt;/ns1:id&gt;&lt;/ns4:user&gt;&lt;wsa:To&gt;https://www3.medicareaustralia.gov.au/pcert/soap/services/&lt;/wsa:To&gt;&lt;wsa:MessageID&gt;urn:uuid:5f75a15c-ad57-4d00-b277-75fe7b1e241d&lt;/wsa:MessageID&gt;&lt;wsa:Action&gt;http://ns.electronichealth.net.au/hi/svc/ConsumerSearchIHIBatchAsync/3.0/ConsumerSearchIHIBatchAsyncPortType/submitSearchIHIBatchRequest&lt;/wsa:Action&gt;&lt;/soapenv:Header&gt;&lt;soapenv:Body xml:id="body-c3c18409-d0df-4aed-b294-87af248c61f0"&gt;&lt;ns12:submitSearchIHIBatch xmlns:ns12="http://ns.electronichealth.net.au/hi/svc/ConsumerSearchIHIBatchAsync/3.0"&gt;&lt;ns12:searchIHIBatchRequest&gt;&lt;searchIHI xmlns="http://ns.electronichealth.net.au/hi/xsd/consumermessages/SearchIHI/3.0"&gt;&lt;s36:medicareCardNumber xmlns:s36="http://ns.electronichealth.net.au/hi/xsd/consumercore/ConsumerCoreElements/3.0"&gt;2950249651&lt;/s36:medicareCardNumber&gt;&lt;/searchIHI&gt;&lt;ns11:requestIdentifier xmlns:ns11="http://ns.electronichealth.net.au/hi/xsd/consumermessages/SearchIHIBatch/3.0"&gt;d1f21610-6cb9-4e60-9673-18f43a4500b5&lt;/ns11:requestIdentifier&gt;&lt;/ns12:searchIHIBatchRequest&gt;&lt;/ns12:submitSearchIHIBatch&gt;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>Please suggest.</p>