Page 1 of 1

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

Posted: Thu Nov 10, 2016 10:27 pm
by johnlong
Hi
If you deploy the Webservice in the problem statement you can check the WSDL and generate the client code. You will see that those are the classes generated by wsimport.
How am I suppose to know that ( know that MathTableImplService is the Service instance) on exam, without generating client code?

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

Posted: Fri Nov 11, 2016 12:39 pm
by fjwalraven
You need to know how this works. You might want to check JSR-181 for more information.

Regards,
Frits

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

Posted: Mon Nov 14, 2016 1:23 am
by johnlong
You need to know how this works.
Could you explain in brief? Another question - how do you know that classes are generated automatically by wsimport?

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

Posted: Mon Nov 14, 2016 2:50 am
by fjwalraven
Could you explain in brief?
Are you studying from a book? If you code a simple Webservice and publish it, you can see how the mapping is done. Furthermore (JSR-181) gives you the rules of how the mapping changes when you use attributes in the Webservice annotation.
Another question - how do you know that classes are generated automatically by wsimport?
Classes are not generated automatically: you have to generate them by using the wsimport tool.

Regards,
Frits

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

Posted: Mon Nov 21, 2016 12:24 am
by johnlong
Classes are not generated automatically: you have to generate them by using the wsimport tool.
You mean that there is no way to prepare classes manually?

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

Posted: Mon Nov 21, 2016 6:14 pm
by johnlong
You said that classes are generated by using wsimport?
Can't they be written manually by programmer?

Another question:
@WebService  (endpointInterface="notes.ws.MathTableService") -> MathTableService is SEI here
public class MathTableImpl implements MathTableService

@WebServiceRef(MathTableImplService.class)
private MathTableService service; -> MathTableService is proxy here

MathTableService is SEI and Proxy at the same time?

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

Posted: Wed Nov 23, 2016 12:51 am
by fjwalraven
You said that classes are generated by using wsimport?
Can't they be written manually by programmer?
That is possible however not common.
MathTableService is SEI and Proxy at the same time?
This is what they call a SEI proxy.

From the @Addressing API:
Annotation Type Addressing
This annotation MUST only be used in conjunction with the WebService, WebServiceProvider, and WebServiceRef annotations. When used with a javax.jws.WebService annotation, this annotation MUST only be used on the service endpoint implementation class. When used with a WebServiceRef annotation, this annotation MUST only be used when a proxy instance is created. The injected SEI proxy, and endpoint MUST honor the values of the Addressing annotation.
Regards,
Frits

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

Posted: Sat Dec 24, 2016 1:55 pm
by victor2016
Hi,

Just to confirm, this form:

Code: Select all

@WebServiceRef(type=MathTableService.class)
As I understand, according to jaxws-2.2 specification, is incorrect because it has a missing "value" element?

But had this expression be like so:

Code: Select all

@WebServiceRef
private MathTableImplService service;
Then that would be correct?

Thanks,
Victor.

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

Posted: Sun Dec 25, 2016 5:25 am
by fjwalraven
Hi!
As I understand, according to jaxws-2.2 specification, is incorrect because it has a missing "value" element?
No, this is wrong because the @Addressing annotation will only work on a proxy instance (so it has nothing to do with the @WebServiceRef annotation). In other words: the type of the instance variable has to be the SEI type.
But had this expression be like so:
Code:

@WebServiceRef
private MathTableImplService service;

Then that would be correct?
When it comes to the Addressing feature there is no alternative.

Regards,
Frits