How am I suppose to know that ( know that MathTableImplService is the Service instance) on exam, without generating client code?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.
About Question enthuware.ocejws.v6.2.170 :
Moderators: Site Manager, fjwalraven
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Re: About Question enthuware.ocejws.v6.2.170 :
Hi
-
- Posts: 429
- Joined: Tue Jul 24, 2012 2:43 am
- Contact:
Re: About Question enthuware.ocejws.v6.2.170 :
You need to know how this works. You might want to check JSR-181 for more information.
Regards,
Frits
Regards,
Frits
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Re: About Question enthuware.ocejws.v6.2.170 :
Could you explain in brief? Another question - how do you know that classes are generated automatically by wsimport?You need to know how this works.
-
- Posts: 429
- Joined: Tue Jul 24, 2012 2:43 am
- Contact:
Re: About Question enthuware.ocejws.v6.2.170 :
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.Could you explain in brief?
Classes are not generated automatically: you have to generate them by using the wsimport tool.Another question - how do you know that classes are generated automatically by wsimport?
Regards,
Frits
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Re: About Question enthuware.ocejws.v6.2.170 :
You mean that there is no way to prepare classes manually?Classes are not generated automatically: you have to generate them by using the wsimport tool.
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Re: About Question enthuware.ocejws.v6.2.170 :
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?
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?
-
- Posts: 429
- Joined: Tue Jul 24, 2012 2:43 am
- Contact:
Re: About Question enthuware.ocejws.v6.2.170 :
That is possible however not common.You said that classes are generated by using wsimport?
Can't they be written manually by programmer?
This is what they call a SEI proxy.MathTableService is SEI and Proxy at the same time?
From the @Addressing API:
Regards,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.
Frits
-
- Posts: 18
- Joined: Wed Jan 20, 2016 7:16 pm
- Contact:
Re: About Question enthuware.ocejws.v6.2.170 :
Hi,
Just to confirm, this form:
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:
Then that would be correct?
Thanks,
Victor.
Just to confirm, this form:
Code: Select all
@WebServiceRef(type=MathTableService.class)
But had this expression be like so:
Code: Select all
@WebServiceRef
private MathTableImplService service;
Thanks,
Victor.
-
- Posts: 429
- Joined: Tue Jul 24, 2012 2:43 am
- Contact:
Re: About Question enthuware.ocejws.v6.2.170 :
Hi!
Regards,
Frits
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.As I understand, according to jaxws-2.2 specification, is incorrect because it has a missing "value" element?
When it comes to the Addressing feature there is no alternative.But had this expression be like so:
Code:
@WebServiceRef
private MathTableImplService service;
Then that would be correct?
Regards,
Frits
Who is online
Users browsing this forum: No registered users and 63 guests