Announcement Announcement Module
Collapse
No announcement yet.
not able to access WS when i give the Ip Address in place for localhost in value fiel Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • not able to access WS when i give the Ip Address in place for localhost in value fiel

    Hi All

    I deployed a WS in axis , using SPRING DI . My simple helloworld WS works fine , but when i try to change the value of localhost to my IP address. The WS is not found and i get a error stating that wsdl not found

    <property name="wsdlDocumentUrl">
    <value>http://localhost:8080/remoting/services/HelloWorld?wsdl</value>
    </property>

    <property name="namespaceUri">
    <value>http://localhost:8080/remoting/services/HelloWorld</value>
    </property>


    changed to

    <property name="wsdlDocumentUrl">
    <value>http://xx.xx.xx.xxx:8080/remoting/services/HelloWorld?wsdl</value>
    </property>

    <property name="namespaceUri">
    <value>http://xx.xx.xx.xxx:8080/remoting/services/HelloWorld</value>
    </property>

    xx.xx.xx.xxx being my IP address.

    I could acces the same WS using the browser and it works fine.

    I could also acces the WS using the below client but not after chaning the localhost to IP address.

    public class HelloWorldClient {

    public static void main(String[] args) {
    ApplicationContext ctx = new FileSystemXmlApplicationContext(args[0]);

    HelloWorld helloWorld = (HelloWorld)ctx.getBean("helloWorldService");
    System.out.println(helloWorld.getMessage());
    }
    }

    //args[0] is the file configuration file i mentioned earlier where i changed the localhost to IP.


    Can anyone help me out?

    Regards
    Kris

  • #2
    I'm not sure how the namespaceUri property is used by your application, but if it is actually an XML namespace URI, you wouldn't want to change it when you relocate your webservice.
    Originally posted by kris_red View Post
    <property name="namespaceUri">
    <value>http://xx.xx.xx.xxx:8080/remoting/services/HelloWorld</value>
    </property>
    The namespace URI is supposed to be a globally unique string that identifies the namespace of XML elements (in this case, presumably, your WSDL). It often looks like a URL because domain names can be controlled to ensure a globally unique identifier... but it probably shouldn't move around when the service is hosted on a different machine. Changing it changes the "official" name of all of your XML elements.

    Note: This may have nothing to do with your problem, unfortunately.

    Comment


    • #3
      Originally posted by wlsmith View Post
      I'm not sure how the namespaceUri property is used by your application, but if it is actually an XML namespace URI, you wouldn't want to change it when you relocate your webservice.

      The namespace URI is supposed to be a globally unique string that identifies the namespace of XML elements (in this case, presumably, your WSDL). It often looks like a URL because domain names can be controlled to ensure a globally unique identifier... but it probably shouldn't move around when the service is hosted on a different machine. Changing it changes the "official" name of all of your XML elements.

      Note: This may have nothing to do with your problem, unfortunately.
      thanks smith ...for the hint ..it solves my problem ...everything works fine

      <property name="wsdlDocumentUrl">
      <value>http://xx.xx.xx.xxx:8080/remoting/services/HelloWorld?wsdl</value>
      </property>
      <property name="namespaceUri">
      <value>http://localhost:8080/remoting/services/HelloWorld</value>
      </property>
      regards
      kris

      Comment

      Working...
      X