Results 1 to 3 of 3
  1. #1
    nilantha is offline Member
    Join Date
    Mar 2009
    Posts
    2
    Rep Power
    0

    Default How to getrid of Localhost in SOAP:Address location (runtime) - need help

    Hi all,

    Please help me to solve this problem,

    we have created a wsdl (webservice) for one of our clients and deployed in their apache tomcat server. i have problem with SOAP:Address location and schemaLocation. Story goes like this:

    say my webservice is Myservice.wsdl and hosted in " www . Mydomain . com / Mywebservice" and port is 80. developed using Java(Netbeans)

    So my problem is :
    When a client calls this webservice as Myservice ? wsdl from a remote location the result of "http : // www . MyDomain. com/ MyWebService / Myservice ? wsdl" as follows :

    -----------------------------------------------------------------------------
    <!-- My WSDL -->
    ........
    <types>
    <xsd:schema>
    <xsd:import namespace=" http : // MyWebService .Myservice .MYdomain .com/"
    schemaLocation=" http : // localhost : 80/ MyWebService / Myservice ? xsd=1" />
    </xsd:schema>
    </types>
    .....
    .....
    <service name="Myservice">
    <port name="MyPort" binding="tns:MyPortBinding">
    <soap:address location="http : // localhost: 80 / MyWebService / Myservice " />
    </port>
    </service>
    </definitions>
    <!-- end of WSDL -->
    ------------------------------------------------------------------------------
    the client cannot create a stub on this, because it is having SOAP:Address location and schemaLocation as Localhost. I tryied to hard code the locations but as this is dynamic binding, locations are automatically changes to localhost. (this is due to proxy settings on server, i think....?)

    Server side is Apache tomcat 6. and i want a solution without touching to server side configuration. (because my client does not like to change their server.xml or proxies or other settings due to security reasons + other applications are running on this server ). Are there any way to resolve this by hard coding the wsdl or any other way. ( if there is no solution, a server side modifications can be accepted without damaging their original settings)

    I really appreciate if you could help on this, and if you need more info on this please let me know,

    many many thanks,


    Nilantha Ganegama

  2. #2
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    8

    Default

    I gather that the server is publishing the Web service with an invalid address of localhost, rather than the real DNS name of the server. That doesn't make a lot of sense. Web Service Discovery Language (wsdl) is supposed to make Web services easier. The real problem seems to be with the configuration on their server. I doubt it has anything to do with proxies.

    Here are a couple of suggestions.

    First, you could try changing the host file on your development PC. I've never done that, so I can't swear that your PC won't have severe problems. Create the client side code, and then fix the host file. Edit the generated code to remove localhost and put in the proper domain name. That will get a client working, but it is not much of a fix.

    Second, you could set up a development server, if they don't have one, and configure the Web service correctly, using their domain name instead of local host. Then create a client and make sure everything works. Document the minimum steps required to fix the Web service; I suspect it will come down to editing a single file that has to do only with the Web service itself. Present the fix to the client.

  3. #3
    nilantha is offline Member
    Join Date
    Mar 2009
    Posts
    2
    Rep Power
    0

Similar Threads

  1. SOAP Client
    By sathish_2111 in forum Advanced Java
    Replies: 2
    Last Post: 01-27-2010, 08:08 AM
  2. connecting to a wsdl on localhost
    By david99world in forum Eclipse
    Replies: 0
    Last Post: 01-23-2009, 11:25 PM
  3. Replies: 2
    Last Post: 11-21-2008, 09:36 PM
  4. Replies: 0
    Last Post: 06-07-2008, 10:02 PM
  5. how to get the location of some button
    By mary in forum Java 2D
    Replies: 2
    Last Post: 08-05-2007, 05:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •