• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

problem with jax-ws trying to overide default callback endpoint address

Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I'm having problems trying to implement a callback that has a client defined endpoint. I used wsimport to build the interfaces.
I did a simple implementation of the callback method that just printlns a message. Every thing works fine if I dont try to override the
endpoint and just use the endpoint defined in the wsdl that the code was generated from.

cbService=new AudioStreamCallbackServices();

However if I try to pass in a url the constructor for the service throws an exception

SEVERE: {http://interfaces.ticomgeo.com/2010/geonet/AudioStream/v0}AudioStreamCallbackServices is not a valid service.
Valid services are: {http://interfaces.ticomgeo.com/2010/geonet/AudioStream/v0}AudioStreamCallbackPortImplService
javax.xml.ws.WebServiceException: {http://interfaces.ticomgeo.com/2010/geonet/AudioStream/v0}AudioStreamCallbackServices
is not a valid service. Valid services are: {http://interfaces.ticomgeo.com/2010/geonet/AudioStream/v0}AudioStreamCallbackPortImplService
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:233)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:178)
at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:106)

The url in the wsdl is

<soap:address location="http://localhost:8055/AudioStreamCallback/"/>

I have tried building urls from


I get the same result when I used the contructor that accepts a url , In each case I can see the schemas streaming back to the service that
is calling the callback (using tcpmon).

The annotations in the generated Service proxy are
new QName("http://interfaces.ticomgeo.com/2010/geonet/AudioStream/v0", "AudioStreamCallbackServices");

I grepped my entire source tree for AudioStreamCallbackPortImplService and it doesnt occur, but I do see the sample name as the
service name when I use the Oxygen WSDL soap analyzer so it must be generated by jax-ws based on the schema contents.

find . -exec grep AudioStreamCallbackPortImplService {} \;

Simple question is what is the easiest way for me to dynamically set the service endpoint address at run time.
Jeff Gaer
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To answer my own question

Service service = new Service();
port = service.getPort();
((BindingProvider) port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
I'm not dead! I feel happy! I'd like to go for a walk! I'll even read a tiny ad:
a bit of art, as a gift, that will fit in a stocking
    Bookmark Topic Watch Topic
  • New Topic