About Question enthuware.ocejws.v6.2.167 :

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
austinor
Posts: 41
Joined: Mon Oct 27, 2014 11:35 pm
Contact:

About Question enthuware.ocejws.v6.2.167 :

Post by austinor »

For the question:

Code: Select all

We have a Web Service that requires Addressing headers to be present in all requests. 

@Addressing(required=true) 
@WebService 
public class MathTableImpl implements MathTableService {

   @Override
    public SimpleMathTable getTable(Integer number) throws NegativeNumberException {
       if (number < 0) {
          throw new NegativeNumberException("Number cannot be negative");
       }
       SimpleMathTable table = new SimpleMathTable(number);
       return table;
    }
} 

The Web Service is injected in a client. What is the correct code to enable Addressing?
Correct answer:

Code: Select all

@Stateless 
public class MyClient {

    @Addressing
    @WebServiceRef( MathTableImplService.class )
    private MathTableService service;
    ... 
}
The proxy type (or portType class) should be "MathTableImpl" and not "MathTableService"? =)

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

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

Post by fjwalraven »

Yes, you are right.

I solved this question when you reported the other question. (it will come in the next update)

Thank you for your feedback!
Frits

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests