About Question enthuware.ocejws.v6.2.12 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
rkbansal83
Posts: 33
Joined: Sat Nov 24, 2012 8:52 am
Contact:

About Question enthuware.ocejws.v6.2.12 :

Post by rkbansal83 »

SEI is declaring the webmethod with void return type

Code: Select all

public void log(String msg);
while SIB is implementing the log method with String return type

Code: Select all

public String log(String msg) {      System.out.println(msg);      return msg;   }
Can you please tell me, if this mismatch is kept intentionally ?
Also , should not this create any problem when deploying such webservice ?

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

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

Post by himaiMinh »

I don't think it is possible that the SEI declares

Code: Select all

 public void log(String msg) 
while the SIB declares

Code: Select all

 public String log(String msg) 
.

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

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

Post by fjwalraven »

Hi Himai,

I am not sure you are replying to the question 6.2.123. (as I don't see a log() method)

What is the correct statement about the following Web Service?

Code: Select all

@WebService(endpointInterface="ws.MathService") 
public class MathServiceImpl implements MathService {    
  @Override    
  public void getMathResult(int num, Holder<Integer> sq, Holder<Integer> vol) {       
       sq.value = num*num;       
       vol.value = num*num*num;    
  } 
}
Please confirm what question you are referring to.

Regards,
Frits

rkbansal83
Posts: 33
Joined: Sat Nov 24, 2012 8:52 am
Contact:

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

Post by rkbansal83 »

I guess, there is a problem with the "Discuss" hyper link , its taking me to wrong question thread.

Anywaz, here is question enthuware.ocejws.v6.2.12

Which methods are exposed in this WebService?

Code: Select all

@WebService
 public interface LogService 
{   @WebMethod   public void log(String msg); }
And the SIB:

Code: Select all

@WebService (endpointInterface="LogService")
 public class LogServiceImpl extends LogServiceImplSuper {  
 public String log(String msg) {      System.out.println(msg);      return msg;   }   
public String logN(String msg) {     System.out.println(msg);     return msg;   } } 

public class LogServiceImplSuper {  
  public String logS(String msg) {       System.out.println(msg);       return msg;    }  
  public String logR(String msg) {       System.out.println(msg);       return msg;    } }
Did you get now what I was talking about different return type for method log in SIB and SEI . ?

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

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

Post by fjwalraven »

Yes, I got it now. You are right: that is a mistake in the SEI!

I have corrected it. Thank you for the feedback!

I will have to look at the discuss button problem too.

Regards,
Frits

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

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

Post by himaiMinh »

This is what rkbansal83 is asking:
rkbansal83 wrote:SEI is declaring the webmethod with void return type

Code: Select all

public void log(String msg);
while SIB is implementing the log method with String return type

Code: Select all

public String log(String msg) {      System.out.println(msg);      return msg;   }
Can you please tell me, if this mismatch is kept intentionally ?
Also , should not this create any problem when deploying such webservice ?

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

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

Post by fjwalraven »

Yeah, I got it, thanks Himai.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests