aspose file tools*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes doubt with soap NS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "doubt with soap NS" Watch "doubt with soap NS" New topic
Author

doubt with soap NS

sita raman subra
Ranch Hand

Joined: Apr 09, 2007
Posts: 47
Hi,

I had a doubt regarding the NS applied to SOAP elements.I studied in MH that all the elemnt ,local elemnets & attributes of the SOAP must be fully qualified.But when I went through some other notes they mentioned that application specific element in body may be qualified.

So please confirm me the below things.

1) soap msg with all elements fully qualified
<soap:Envelope xmlns:soap="......../soap/envelope">
<soap:Header xmlns:hi=".........">
<hi:log xmlns:hii=".........">
<hii:logger>.......</hii:logger>
</hi:log>
</soap:Header>
<soap:Body xmlns:bo=".........">
<bo:calc xmlns:boo=".........">
<boo:add>.......</boo:add>
</bo:calc>
</soap:Body>
</soap:Envelope>


2) soap elements with application specific local elements not qualified
<soap:Envelope xmlns:soap="......../soap/envelope">
<soap:Header xmlns:hi=".........">
<hi:log>
<logger>.......</logger>
</hi:log>
</soap:Header>
<soap:Body xmlns:bo=".........">
<bo:calc>
<add>.......</add>
</bo:calc>
</soap:Body>
</soap:Envelope>

3)Only soap elements qualified.
<soap:Envelope xmlns:soap="......../soap/envelope">
<soap:Header >
<log>
<logger>.......</logger>
</log>
</soap:Header>
<soap:Body >
<calc>
<add>.......</add>
</calc>
</soap:Body>
</soap:Envelope>


Could you please let me know which one of he above is must and which is optiona.Also please let me know any other option.

Thanks & Regards,
sitaraman
Sundar Murthi
Ranch Hand

Joined: Mar 05, 2004
Posts: 209
Only SOAP standard element should be qualified elements. Other local element can be optional.

For instance Envelop, Header, Body and fault element must be soap namespcae qualified. namespace for content of Header Body and fault are optional. Element with no namespace prefix are qualified with defaultnamespace.

In your sample all 3 are valid.
sita raman subra
Ranch Hand

Joined: Apr 09, 2007
Posts: 47
Thanks.
But I came to know that all the immediate child of the header should be qualified.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doubt with soap NS
 
Similar Threads
SOAP doubt: The Envelope element
Mock exam question: SOAP doubt
Do grandchildren of Soap:body element need to be fully qualified?
Doubt in soap:header
My SCDJWS Notes available now!