aspose file tools*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Detail questions for OCEJWSD. Studied for 5/6 months. Read all the material discussed in JavaRanch. 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 "Detail questions for OCEJWSD. Studied for 5/6 months. Read all the material discussed in JavaRanch." Watch "Detail questions for OCEJWSD. Studied for 5/6 months. Read all the material discussed in JavaRanch." New topic
Author

Detail questions for OCEJWSD. Studied for 5/6 months. Read all the material discussed in JavaRanch.

Filipe Rosa
Greenhorn

Joined: May 11, 2011
Posts: 8
Good afternoon Guys,

I´ve read some of the threads of this forum, trying to answer my remaining detail doubts and trying to get additional insight and overlooked features.

My questions still remain though.

Just a pointer to those who would like to take any of the Oracle/Sun Java exams. No matter what the experience you might have with the technology, it is my opinion, that If you only study two weeks to the exam you will fail and fail big.

I´m an OCJP (95%) and OCEWCD (96%) and had to study for approximately 5 months in a row, for each of them.

I´ve divided my questions in three categories: Core functional doubts; questions that can get us, needlessly in trouble in the exam; and questions that are pissing me off.

Core functional doubts
-------------------------
1- Does JAX-RS RI provide default Entity Providers (javax.ws.rs.ext.MessageBodyReader and javax.ws.rs.ext.MessageBodyWriter) for media-type "application/json"? If so, what are the java types that correspond to that media-type? javax.xml.bind.JAXBElement<T>, JAXB schema generated classes and javax.xml.bind.annotation.* user-defined classes?

2- Does a JAX-WS EJB javax.jws.WebService annotated SIB, has to forcefully annotate the methods of the EJB it wants to expose with javax.jws.WebMethod? - This in contrast with POJO/Servlet, javax.jws.WebService annotated, JAX-WS SIBs, that doesn´t have to annotate the methods to expose with javax.jws.WebMethod, as long as those methods have the public access modifier.

questions that can get us, needlessly in trouble in the exam
--------------------------------------------------------------------

3- Do the children XML elements of <soap:header> have to mandatory be namespace qualified? And can they use the soap:encodingStyle attribute? According to what spec? SOAP or WS-I BP?

4- At least one of the authors of the material referenced in JavaRanch (I´m sorry, I don´t remember whom) stated something like this: "When a SIB implements a SEI, the only JSR 181 annotations that are permitted on the SIB are @WebService, @HandlerChain, @MTOM, and @Addressing."
Now here´s the problem, as I see it. JSR 181 only talks about javax.jws.* (@HandlerChain, @Oneway, @WebMethod, @WebParam, @WebResult, and @WebService) and javax.jws.soap.SoapBinding annotation. javax.xml.ws.soap.MTOM and javax.xml.ws.soap.Adressing annotations are clearly not (in my opinion) JSR 181 material.
But even if that is only a semantic problem, what about when a SIB implements a SEI and uses the exclude element of the javax.jws.WebMethod with the value of true. Now according to the javadocs (the exclude element is not permitted in SEIs, only in SIBs), and what I´ve also read, the exclude element is suitable for the cases when you implement a SEI and do not want to expose all the SEI´s methods.
And what about, for example:- an author wrote code, according to the same rule stated in the beginning, that demonstrated, according to him, that when a SIB was implementing a SEI, a javax.xml.bind.annotation.XmlMimeType on a SIB´s method was not permissible?

questions that are pissing me off
-------------------------------------

5- XSLT? Sequencial or random access to elements in XML? The author says XSLT is sequential. Despite that ,in a reference board outlining the characteristics, of JAXP (DOM, SAX, XSLT) and stAX, DOM (which accesses XML randomly) and XSLT had the "forward-only" attribute with the value of no.

6- stAX? Is it bidirectional? DOM is Bidirectional because you can go from parent XML elements to children and from children back to parents. Sax isn’t because it is "forward-only". The author says stAX is bidirectional, but I don´t see in the stAX API (javax.xml.stream.*) how can you go from XML children elements back to parent elements. For me is "forward only".

Thank you very much in advance to whom answers this, or some of this questions.

I feel current and future certification test takers will have same or similar questions.
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1714
    
  25

Hi Filipe,

Does JAX-RS RI provide default Entity Providers (javax.ws.rs.ext.MessageBodyReader and javax.ws.rs.ext.MessageBodyWriter) for media-type "application/json"? If so, what are the java types that correspond to that media-type? javax.xml.bind.JAXBElement<T>, JAXB schema generated classes and javax.xml.bind.annotation.* user-defined classes?

JAX-RS v1.1 does not require Entity Providers for JSON however Jersey (one implementation of JAX-RS) comes with POJO and JAXB based JSON Entity Providers. If you want to know more, you can read it Jersey guide chapter 5.

Does a JAX-WS EJB javax.jws.WebService annotated SIB, have to forcefully annotate the methods of the EJB it wants to expose with javax.jws.WebMethod? - This in contrast with POJO/Servlet, javax.jws.WebService annotated, JAX-WS SIBs, that don´t have to annotate the methods to expose with javax.jws.WebMethod, as long as those methods have the public access modifier.

There is no difference annotation wise. For a SIB (without referring to SEI) all public methods are exposed as long as the enclosing class has a @WebService annotation.

3- Does the children XML elements of <soapheader> have to mandatory be namespace qualified? And can they use the soapenconding attribute? According to what spec? SOAP or WS-I BP?

The SOAP v1.1 is clear about it (check SOAP v1.1 chapter 4.2. SOAP encoding is not conform WS-I Basic Profile v1.1.

At least one of the authors of the material referenced in JavaRanch (I'm sorry, I don't remember whom) stated something like this: "When a SIB implements a SEI, the only JSR 181 annotations that are permitted on the SIB are @WebService, @HandlerChain, @MTOM, and @Addressing."

I might be the author . The sentence you are quoting is not correct, it should be "When a SIB implements a SEI, the only JSR 181 annotations that are permitted on the SIB are @WebService, @HandlerChain. ( it can include other annotations like @MTOM and @Addressing)"

5- XSLT? Sequencial or random access to elements in XML? The author says XSLT is sequential. Despite that ,in a reference board outlining the characteristics, of JAXP (DOM, SAX, XSLT) and stAX, DOM (which accesses XML randomly) and XSLT had the "forward-only" attribute with the value of no.

6- stAX? Is it bidirectional? DOM is Bidirectional because you can go from parent XML elements to children and from children back to parents. Sax isn’t because it is "forward-only". The autor says stAX is bidirectional, but I don't see in the stAX API (javax.xml.stream.*) how can you go from XML children elements back to parent elements. For me is "forward only".


Bidirectional means: it can both read and write XML as opposed to it can only read XML. I guess you are using the Enthuware software, please hit the "discuss button" below the question whenever you have a question or doubt about something. You will be redirected to the support forum of Enthuware and you will receive a reply soon.

For the other questions you are quoting you need to provide the source (QuoteYourSources).

Regards,
Frits
Filipe Rosa
Greenhorn

Joined: May 11, 2011
Posts: 8
Thank you very much Fritz.

You´ve taken all my remaining doubts out.

I apologise for not quoting the sources.

Best regards,

FR
Filipe Rosa
Greenhorn

Joined: May 11, 2011
Posts: 8
Just to add that my sources (material to study and mock simulator exams) were from JavaRanch authors:

http://www.coderanch.com/how-to/java/ScdjwsLinks

and

http://www.coderanch.com/t/565795/sr/certification/passed-OCEJWSD

Best regards,

FR
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Detail questions for OCEJWSD. Studied for 5/6 months. Read all the material discussed in JavaRanch.