posted 18 years ago
Hi,
Just wanted to say thanks to both of you guys - I had the same problem, and hadn't even found the -a switch, so that was helpful in itself!
I actually needed to use a slightly different solution from the one Ray suggested, and I also needed a slight intellectual leap, which wasn't immediately obvious from his answer, so I'll show my solution here, just in case:
As with Ray, my class generated for the header info will be MyHeaderType, and the instance of my generated Stub class is binding.
I actually had to cast binding, and the relevant line reads:
Where http://.../... represents the namespace of the WSDL, tns:MyHeaderType is the name of the type required in my header (taken from the WSDL), and header is an instance of MyHeaderType.
Not sure about the difference between my setHeader(), and Ray's addHeader() methods, but I couldn't find an addHeader() method, and setHeader() works just fine!
Hope this is helpful to someone.
David.