GeeCON Prague 2014*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Questions on Chap4 of RMH Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Questions on Chap4 of RMH" Watch "Questions on Chap4 of RMH" New topic
Author

Questions on Chap4 of RMH

Ajai
Ranch Hand

Joined: May 29, 2002
Posts: 198
Hi All,
Would appreciate if anyone could confirm/answer below queries from a very new to Web Services person.
1. As per the book the elements and attributes should be qualified.
<Envelope xlmns="http://envelope schema name"
xlmns:mi="valid namespace" >
<Header>
<mi:HB1 actor="some URI" />
</Header>
<Body>
<Fault>
<faultcode>Client</faultcode>
<faultstring/>
......
....valid content...
Is the above soap msg correct regarding the below.
I am not qualifying any of the atrrib/element explicitly, will the above be considered a valid soap msg?
Can we give faultstring as empty element as I gave above just like we can give empty detail element.
2 .On page 120:-
There is one statement which says
"Client fault will be generated if the Body elem. contains the elem./namespaces that receiver does not recognise."
Does that mean Client fault will not be generated when the above statement applies to Header elem?
3.
Assume in the below the msg is transmitted successfully to the receiver.
Are the below combinations correct reagrding the HTTP codes.
One way +succesful processing :- 200 OK
Onw way+ unsuccesful processing :- 200 Accepted
When can a Req/Res mode give the 200 Accepted code?
4.
Page 91:- BP requires the appl. specific elements in the Body to be qualified (prefix/default namespace).
What if the header block elements are not qualified(prefix/default ns).Will that not be an invalid soap msg?
Thanks ....
Richard Monson-Haefel
author
Ranch Hand

Joined: Oct 31, 2003
Posts: 92
I am not qualifying any of the atrrib/element explicitly, will the above be considered a valid soap msg? Can we give faultstring as empty element as I gave above just like we can give empty detail element.

Since you have assigned the SOAP elements to the default namespaced, you have technically fully qualified them. The default namespace is considered fully qualified.
2 .On page 120:-
There is one statement which says
"Client fault will be generated if the Body elem. contains the elem./namespaces that receiver does not recognise."
Does that mean Client fault will not be generated when the above statement applies to Header elem?

When an error is discovered in a header block, a Header Fault can be generated. It will probably be a Client faultcode type, but that's not required.
3.
Assume in the below the msg is transmitted successfully to the receiver.
Are the below combinations correct reagrding the HTTP codes.
One way +succesful processing :- 200 OK
Onw way+ unsuccesful processing :- 200 Accepted
When can a Req/Res mode give the 200 Accepted code?

The answers to this question is in sections 4.7.2.1 and 4.7.2.2. In summary, 200 ok is used for a successful request/response SOAP call. That means the endpoint got the message and was able to process it without a problem. 202 Acknowledge is used successful delivery, but not necessary the processing of a one-way SOAP message. In other words, 202 just says "Hey, the endpoint got the message."

4.
Page 91:- BP requires the appl. specific elements in the Body to be qualified (prefix/default namespace).
What if the header block elements are not qualified(prefix/default ns).Will that not be an invalid soap msg?

The WS-I BP doesn't specifically address this, so I would say technical answer is no. That said, in pratice you really do want to namespace qualify your header blocks so that they can be identified as being seperate from the SOAP message elements.

I hope this helps,
Richard


-- <br />Richard Monson-Haefel<br /><a href="http://www.Monson-Haefel.com" target="_blank" rel="nofollow">http://www.Monson-Haefel.com</a>
 
GeeCON Prague 2014
 
subject: Questions on Chap4 of RMH