Announcement Announcement Module
Collapse
No announcement yet.
WSDL addressing - How would you do this? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • WSDL addressing - How would you do this?

    Hi.

    I wonder if someone could point me in the right direction here – I’m certainly no expert in web services, so some friendly advice here would be very much appreciated!

    I’m trying to access a remote web service from within my spring app, however I have a problem. The WSDL obtained from this service contains a soap address where the location is dynamically generated. Unfortunately this location leads to an internal IP address, so obviously when my app tries to follow this it cannot gain access.

    The service itself is in fact alive and well at the URL where the WSDL is published.

    In an attempt to get around this I have created my own service based on the above WSDL but changed the soap address to the location of the working service. Using the Eclipse Web service Explorer, I am able to access the web service and get a meaningful result. However, when I try to access the service via my app, it fails since it appears to be looking for an endpoint rather following the soap location stated in my version of the WSDL.

    I’ve tried a number of things to get around this, but everything I have tried has failed in one way of another.

    I’m hoping that someone would be kind enough to help me out here and explain a good way of getting around this.

    Thanks for your time,
    Dave.

    PS. I'm using CXF here.
    Last edited by dave21; Oct 1st, 2009, 10:53 AM.

  • #2
    Hi!

    CXF is the answer. Using Spring's WebServicesTemplate you can pass in a URL address.

    In CXF, assuming you've generated your classes with cxf-codegen-plugin, you should get a class extending javax.xml.ws.Service - there should be one paramterless constructor and one that accepts URL - use the latter.

    regards
    Grzegorz Grzybek

    Comment


    • #3
      Brilliant.

      Just got it working after a long time trying. Thanks for the pointer.

      Dave.

      Comment

      Working...
      X