Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Surpress 404 - No context found for request - Message

843833Mar 15 2010 — edited Mar 16 2010
Hello,
for testing purposes I have a small web service from a POJO that I deploy with javax.xml.ws.Endpoint.publish:
#############The annotated POJO:#################

import javax.jws.WebService;

@WebService(endpointInterface="services.adder.AddX")
public class Add1 implements AddX {

public int addx(int number) {
return number+1;
}

}

############the code for deployment################

Endpoint.publish("http://127.0.0.1:1/add1",new Add1());

-------------------------------------------------------------------------------------------
everything works fine. It even sends "404 - No context found for request" messages back to the client if it requests a web service that is not deployed. For example if a client requests for http://127.0.0.1:1/add2 instead of "add1". That's very neat, but in my special case I don't want this. I just want the web service to ignore such calls for un deployed or unknown web services. The client would then get a timeout and know that there is nothing to call there.
Can you please show me a way to do this?


Best Regards,

VirtualG
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2010
Added on Mar 15 2010
2 comments
791 views