set up an IP address to String endpointURL = "http://173.168.70.173:8080 however when I look at the .wsdl file it is: targetNamespace="http://localhost:8080/axis/services/OrderB why is the ip changed to localhost? is it because I am uploading on my computer which serves as a server?
thanks, Arie -----Original Message----- From: Ghershony, Arie Sent: Tuesday, February 04, 2003 12:44 PM To: '[EMAIL PROTECTED]' Subject: URL I set up an IP address to String endpointURL = "http://173.168.70.173:8080 however when I look at the .wsdl file it is: targetNamespace="http://localhost:8080/axis/services/OrderB why is it? is it because I am uploading on my computer which servs as a server? thanks, Arie -----Original Message----- From: Urban, Patrick [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 12:08 PM To: '[EMAIL PROTECTED]' Subject: RE: webservice.htc and complex objects David, Your result.value is not empty it is a javascript array object that best represents the java bean being returned. When you attempt to output its value with an alert() it shows up as empty because it is not a string. This is also why your result.error == false. class MyBean{ String stringOne; String stringTwo; //getters and setters here } would be returned by the webservice.htc as something like... var myBean = result.value; myBean["stringOne"]; myBean["stringTwo"]; more complex objects might return multidimensional arrays... class MyBean2{ MyBean myChildBean; //getters and setters here } Would translate to.... var myBean2 = result.value; myBean2["myChildBean"]["stringOne"]; myBean2["myChildBean"]["stringTwo"]; Here is a function interrogating a complex javascript object returned from the .htc. I havn't used it for many complex return types but I am sure you can modify it to get what you need ...... var currentObj = "myObject"; function iterateObj(obj){ for(var i in obj){ currentObj += "."+i; if((typeof obj[i] == "object") && (obj[i].year == "undefined")){ iterateObj(obj[i], i); }else{ //OUTPUT VALUE BELOW TO YOUR OUTPUTTING METHOD OF CHOICE // currentObj +" = "+obj[i] } currentObj = currentObj.substring(0, currentObj.lastIndexOf('.')); } } Patrick -----Original Message----- From: Shellman, Joel [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 04, 2003 10:58 AM To: [EMAIL PROTECTED] Subject: RE: webservice.htc and complex objects We have it working fine. With that new webservice.htc and some important guidelines (I'll post them below just for the benefit of the group), we're able to use it with a complex object and Axis autogenerating the WSDL (we were maintaining by hand previously). It's very convenient now. The only thing required to get things working is entries in the server-config.wsdd for the actual services and the doAutoTyping (if it works--still testing it) has made it extremely easy to deploy. Joel Shellman 1) All classes used in your service API (excluding the service classes themselves) must conform to standard JavaBean? guidelines. This includes having a default constructor. Also, the superclass must also have a default constructor. If it doesn't, it will generate a WSDL type that extends anyType and webservice.htc will choke on that. There may be a way around this, but it's not that hard to ensure a default constructor for supertype so I didn't bother looking any further into it. 2) You must use typed collections in the service interface--that means arrays or your own objects. You cannot use the Java Collections because they are not typed. This is because with non-typed collections, Axis has no way of knowing which type to map the entries to. 3) Do not use fields (class names might fail, too, didn't test) with the names "length" or "function". This is because in javascript those are special words and so webservice.htc crashed when I used them as field names. We could probably modify webservice.htc to deal with this, but it was easier to just change my names in the test. > -----Original Message----- > From: David Teare > Sent: Tuesday, February 04, 2003 7:08 AM > To: [EMAIL PROTECTED] > Subject: webservice.htc and complex objects > > > Hi all, > > Has anyone had any success retrieving a complex object > (i.e. a bean) from an Axis service using MS's > webservice.htc? > > I have downloaded the new webservice.htc as posted on > this form and have successfully invoked simple Axis > services from a browser. However, once I call a > service that returns a bean (instead of a simple > string), the result.value field is empty. What's > worst, the result.error == false! > > Any insights would be greatly appreciated. Thanks! > > --Dave. > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com