[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


SOAPHeaderElement element = new SOAPHeaderElement

Posted on 2005-05-06
Medium Priority
Last Modified: 2013-11-19

Can someoe please tell me what i need to put after the following code

SOAPHeaderElement element = new SOAPHeaderElement("what goes in here??", "myHeaderName")

Also can someone explain URL endpoint = "what goes in here" - can this be a path to a wsdl fiel?

And finally

SOAPHeaderElement element = envelope.getHeaderByName("what goes in here ?", "myHeaderName)

Thanks for any help

Question by:code_123
  • 2
LVL 15

Accepted Solution

aozarov earned 240 total points
ID: 13950213
>> SOAPHeaderElement element = new SOAPHeaderElement("what goes in here??", "myHeaderName")
"what goes in here??" -> namespace (can be empty string if you don't have one)
The important part is that both sides which use the header (setter/getter) will use the same namespace, name combination

>> URL endpoint = "what goes in here" - can this be a path to a wsdl fiel?
No, this is the path to your web service. (see: http://www.onjava.com/lpt/a/1578)

>> SOAPHeaderElement element = envelope.getHeaderByName("what goes in here ?", "myHeaderName)
Again, this is the part of the namespace (can be any string). Just put here the same value that you used
when you set the header.

see: http://www-128.ibm.com/developerworks/xml/library/x-tipsoap.html

Author Comment

ID: 13960959

Thankyou for that - make a lot more sense that what i've been reading
LVL 15

Expert Comment

ID: 13961000

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses
Course of the Month20 days, 5 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question