Hi Ah which Camel version do you use?
And it may be that there is a bug in camel-spring-ws where such header gets mapped to SOAP-ENV header. You are welcome to dive into the source code and try to find out. There are some filtering that "filter" which headers that gets to SOAP ENV and which does not. So its maybe a matter of adding Content-Type as one to skip On Mon, Mar 8, 2021 at 4:58 PM Harsh Karn <harsh.k...@gmail.com> wrote: > > Hi, > > I'm getting invalid attribute "Content-Type" in SOAP-ENV:Header element. > I'm trying camel-spring-ws example. > > I'm running camel example > https://github.com/apache/camel-examples/tree/master/examples/spring-ws. > > SOAP Request - > <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:inc="http://camel.apache.org/example/increment"> > <soapenv:Header/> > <soapenv:Body> > <inc:incrementRequest> > <inc:input>1</inc:input> > </inc:incrementRequest> > </soapenv:Body> > </soapenv:Envelope> > > SOAP Response - > <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/ > "> > <SOAP-ENV:Header Content-Type="application/xml"/> > <SOAP-ENV:Body> > <incrementResponse xmlns="http://camel.apache.org/example/increment"> > <result>2</result> > </incrementResponse> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > > Following is error in SOAP UI - > "line 2: Attribute not allowed: Content-Type in element Header@ > http://schemas.xmlsoap.org/soap/envelope/ " > > How can I suppress the "Content-Type" attribute in "SOAP-ENV:Header" > element? > > *Thanks* > *Harsh* -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2