About Question enthuware.ocejws.v6.2.286 :

Moderators: Site Manager, fjwalraven

Post Reply
himaiMinh
Posts: 358
Joined: Fri Nov 29, 2013 8:26 pm
Contact:

About Question enthuware.ocejws.v6.2.286 :

Post by himaiMinh »

How about using JSON, JSP and JAX-RS?
My reasons:
1. SOAP/XML is too verbose for a mobile application. JSON is less verbose and consumes less bandwidth.
2. Since I choose JSON, I choose JAX-RS which supports JSON based web services. JAX-WS only supports XML based web services.
3. JSP is good for developing a user interface on browsers.

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

Re: About Question enthuware.ocejws.v6.2.286 :

Post by fjwalraven »

1. SOAP/XML is too verbose for a mobile application. JSON is less verbose and consumes less bandwidth.
I agree.
2. Since I choose JSON, I choose JAX-RS which supports JSON based web services. JAX-WS only supports XML based web services.
I agree, and a JAX-RS service can easily return XML and/or JSON; both use less bandwidth then SOAP (JAX-WS)
JSP is good for developing a user interface on browsers.
Yes, but the questions states that "new customers have given the preference to get updates on their mobile phone via a specialized app". It explicitly did not mention a browser.

Regards,
Frits

austinor
Posts: 41
Joined: Mon Oct 27, 2014 11:35 pm
Contact:

Re: About Question enthuware.ocejws.v6.2.286 :

Post by austinor »

For question:

Code: Select all

What will be the URL of the WebService if the following SIB is deployed in a Servlet container. Assume that the context-root is "log".  

@WebService( serviceName="" ) 
public class LogServiceImpl {

    public void log( String msg ) {
       System.out.println( msg );
    } 
}

Correct answer: 
/log/LogServiceImplService
If the annotation is @WebService( serviceName="LogWS" ) will the default endpoint address become
/log/LogServiceImplService ?

(How do you even test this when Tomcat always asks for a user-supplied "url-pattern="..."" in the sun-jaxws.xml???)

austinor
Posts: 41
Joined: Mon Oct 27, 2014 11:35 pm
Contact:

Re: About Question enthuware.ocejws.v6.2.286 :

Post by austinor »

For question:

Code: Select all

What will be the URL of the WebService if the following SIB is deployed in a Servlet container. Assume that the context-root is "log".  

@WebService
public class LogServiceImpl {

    public void log( String msg ) {
       System.out.println( msg );
    } 
}

Correct answer: 
        /log/LogServiceImplService
If the annotation is @WebService( serviceName="LogWS" ) will the default endpoint address url become:

/log/LogServiceImplService ?

(How do you even test this when Tomcat always asks for a user-supplied "url-pattern="..."" in the sun-jaxws.xml???)

austinor
Posts: 41
Joined: Mon Oct 27, 2014 11:35 pm
Contact:

Re: About Question enthuware.ocejws.v6.2.286 :

Post by austinor »

Sorry about that, i had to edit my question.

For question:

Code: Select all

What will be the URL of the WebService if the following SIB is deployed in a Servlet container. Assume that the context-root is "log".  

@WebService
public class LogServiceImpl {

    public void log( String msg ) {
       System.out.println( msg );
    } 
}

Correct answer: 
        /log/LogServiceImplService

If the annotation is @WebService( serviceName="LogWS" ) will the default endpoint address url become:

/log/LogWS ?

(How do you even test the default url when Tomcat always asks for a user-supplied url-pattern="..." in the sun-jaxws.xml???)

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

Re: About Question enthuware.ocejws.v6.2.286 :

Post by fjwalraven »

Did the "Discuss Button" have a problem? You are reporting a problem not related to question enthuware.ocejws.v6.2.286 in this thread?

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

Re: About Question enthuware.ocejws.v6.2.286 :

Post by fjwalraven »

If the annotation is @WebService( serviceName="LogWS" ) will the default endpoint address url become:
/log/LogWS ?
Yes, that is correct.
(How do you even test the default url when Tomcat always asks for a user-supplied url-pattern="..." in the sun-jaxws.xml???)
Create a Dynamic Web Project called "log" in Eclipse and use the Glassfish server. No need of sun-jaxws.xml or other deployment descriptors. Just create the class in the problem statement and deploy the dynamic web project on the server.

Regards,
Frits

austinor
Posts: 41
Joined: Mon Oct 27, 2014 11:35 pm
Contact:

Re: About Question enthuware.ocejws.v6.2.286 :

Post by austinor »

fjwalraven wrote:Did the "Discuss Button" have a problem? You are reporting a problem not related to question enthuware.ocejws.v6.2.286 in this thread?
Yes, I noticed that too in not a few questions already... but even if I close the page and press 'Discuss' button again and again to check if I missed anything, the same (wrong) question discussion thread still comes up.

But the correct behavior happens more often than the wrong ones, so I didn't think much about it... until you brought it up.

Or am I the only one that gets this?

ramy6_1
Posts: 124
Joined: Wed Feb 12, 2014 2:44 am
Contact:

Re: About Question enthuware.ocejws.v6.2.286 :

Post by ramy6_1 »

Hello ,

I suggest the question will be clearer if the last option JSP removed here.
Since it is not wrong according to this question context.

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

Re: About Question enthuware.ocejws.v6.2.286 :

Post by fjwalraven »

Hi,

JSP is not a lightweight solution and therefore not the best possible answer here. Note that you will get plenty of such questions in which you have to select the best options in the real exam.

Regards,
Frits

Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests