Forum Discussion

Exardious's avatar
Exardious
New Contributor
15 years ago

WS-A Header fields disappearing after commenting out some xm

I have some fields in my Soap:Body, like this:

<!--Optional:-->
<cre:DeliveryAddress>?</cre:DeliveryAddress>
<!--Optional:-->
<cre:DocumentAddressId>?</cre:DocumentAddressId>
<!--Optional:-->
<cre:IntrastatExemptDb>?</cre:IntrastatExemptDb>
<!--Optional:-->

When I have them like that, and run the test in SOAPui, then the http debug sends this as the SOAP:Header:

" <soap:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">[\n]"
" <ns:Application>[\n]"
" <ns:Sender>[\n]"
" <ns:AuthorizationID>[\n]"
" <ns:Credentials>[\n]"
" <!--Optional:-->[\n]"
" <ns:CustomerID>?</ns:CustomerID>[\n]"
" <!--Optional:-->[\n]"
" <ns:ApplicationGUID>?</ns:ApplicationGUID>[\n]"
" <ns:CustomerPassword>?</ns:CustomerPassword>[\n]"
" </ns:Credentials>[\n]"
" <ns:SiteID>[\n]"
" <ns:Site>?</ns:Site>[\n]"
" <ns:Instance>?</ns:Instance>[\n]"
" </ns:SiteID>[\n]"
" </ns:AuthorizationID>[\n]"
" </ns:Sender>[\n]"
" </ns:Application>[\n]"
" wsa:Action>http://thingie.com/myAction</wsa:Action><wsa:To>http://localhost:4369/myService.svc</wsa:To></soap:Header>[\n]"


But if I comment some of the fields out, like this:

<!--Optional:
<cre:DeliveryAddress>?</cre:DeliveryAddress>
<!--Optional:
<cre:DocumentAddressId>?</cre:DocumentAddressId>
<!--Optional:-->
<cre:IntrastatExemptDb>?</cre:IntrastatExemptDb>

And execute the test, then SOAPui sends this as my SOAP:Header:

" <soap:Header>[\r][\n]"
" <ns:Application>[\r][\n]"
" <ns:Sender>[\r][\n]"
" <ns:AuthorizationID>[\r][\n]"
" <ns:Credentials>[\r][\n]"
" <!--Optional:-->[\r][\n]"
" <ns:CustomerID>?</ns:CustomerID>[\r][\n]"
" <!--Optional:-->[\r][\n]"
" <ns:ApplicationGUID>?</ns:ApplicationGUID>[\r][\n]"
" <ns:CustomerPassword>?</ns:CustomerPassword>[\r][\n]"
" </ns:Credentials>[\r][\n]"
" <ns:SiteID>[\r][\n]"
" <ns:Site>DK101</ns:Site>[\r][\n]"
" <ns:Instance>DKTEST</ns:Instance>[\r][\n]"
" </ns:SiteID>[\r][\n]"
" </ns:AuthorizationID>[\r][\n]"
" </ns:Sender>[\r][\n]"
" </ns:Application>[\r][\n]"
" </soap:Header>[\r][\n]"