I need to do some further testing and tracing into the Axis source just so I can understand exactly where this is happening. At any rate, thanks for giving it a look.
- Geoff ________________________________ From: Walker, Jeff [mailto:[EMAIL PROTECTED] Sent: Thursday, October 18, 2007 4:16 PM To: [email protected] Subject: RE: MalformedURLException with cookieless .NET web service Well, I'm afraid I don't know the answer. I have used .NET clients in the past talking to a Java hosted web service. We did not use cookies and did not maintain state, so it was about as simple as it gets. (Although I wrote the .NET client I found C# difficult and was fortunate to have Visual Studio create nearly everything I needed back then starting from the wsdl). You also have no issues when cookies are on, but when you turn them off (and probably still try to maintain session state) your getting the url rewriting, most likely courtesy of Axis. But the fact that Axis strips off the protocol seems very weird. (I'm assuming your not even sending a request to the .NET service yet). It's a lame suggestion, but I would try adding the port number to the urls in the wsdl and see what happens. I realize you can't edit the wsdl from the service provider, but it may offer some insight as to what is happening. Sorry I couldn't be of more help! -jeff ________________________________ From: WALKER-GEOFF [mailto:[EMAIL PROTECTED] Sent: Thursday, October 18, 2007 3:51 PM To: [email protected] Subject: RE: MalformedURLException with cookieless .NET web service Service section from the wsdl: <wsdl:service name="Service1"> <wsdl:port name="Service1Soap" binding="tns:Service1Soap"> <soap:address location="http://localhost/MyWebService/Service1.asmx" /> </wsdl:port> <wsdl:port name="Service1Soap12" binding="tns:Service1Soap12"> <soap12:address location="http://localhost/MyWebService/Service1.asmx" /> </wsdl:port> </wsdl:service> Lines from Service1Locator.java: private java.lang.String Service1Soap12_address = "http://localhost/MyWebService/Service1.asmx"; private java.lang.String Service1Soap_address = "http://localhost/MyWebService/Service1.asmx"; ...and they are used thusly: public org.norc.test.Service1Soap getService1Soap() throws javax.xml.rpc.ServiceException { java.net.URL endpoint; try { endpoint = new java.net.URL(Service1Soap_address); } catch (java.net.MalformedURLException e) { throw new javax.xml.rpc.ServiceException(e); } return getService1Soap(endpoint); } There is also a series of getService1Soap12() methods that were generated that use the Service1Soap12_address value. In my testing of the client I have tried calling both getService1Soap() and getService1Soap12(). Also, I traced into the Axis code and the MalformedURLException is being thrown by HTTPSender when any of my service methods are called. The port number used by the service is 4572. Thanks for your help. - Geoff ________________________________ From: Walker, Jeff [mailto:[EMAIL PROTECTED] Sent: Thursday, October 18, 2007 2:12 PM To: [email protected] Subject: RE: MalformedURLException with cookieless .NET web service Cool. Can you post the exact line from the Locator class, as well as the entire last section of the wsdl, that is, the part from <wsdl:service name=".." to.. </wsdl:service> Also, do you know the port number that the .NET service uses? (The other part that is intriguing is the session number in the url. I have never actually seen that before). -jeff ________________________________ From: WALKER-GEOFF [mailto:[EMAIL PROTECTED] Sent: Thursday, October 18, 2007 3:02 PM To: [email protected] Subject: RE: MalformedURLException with cookieless .NET web service First of all, Jeff, I like your name. Secondly, that was a typo on my part (that's what I get for not cutting-and-pasting). The URL looks ok in the Locator. - Geoff ________________________________ From: Walker, Jeff [mailto:[EMAIL PROTECTED] Sent: Thursday, October 18, 2007 1:47 PM To: [email protected] Subject: RE: MalformedURLException with cookieless .NET web service Geoff, I think I see a "//" instead of a "/" after localhost. That is not allowed and may force the protocol to be stripped off? -jeff ________________________________ From: WALKER-GEOFF [mailto:[EMAIL PROTECTED] Sent: Thursday, October 18, 2007 1:35 PM To: [email protected] Subject: RE: MalformedURLException with cookieless .NET web service Hi, I'm sorry to double-post, but I've had no responses and I'm really under the gun. Does anybody have any ideas about how to get rid of this exception? Is this some kind of a configuration issue? Thanks, Geoff ________________________________ From: WALKER-GEOFF Sent: Wednesday, October 17, 2007 10:15 AM To: '[email protected]' Subject: MalformedURLException with cookieless .NET web service Hi, I have had years of experience as a Java developer, but I am relatively new to setting up web services/clients. I am trying to consume a cookieless .NET web service with WSDL2Java generated classes, and when my stub call invokes a web service method, I get the following exception: java.net.MalformedURLException: no protocol: /MyWebService/(S(ieyrnf55xs45pd55yi0mjd55))/Service1.asmx All of the strings in the generated "Locator" class used to set the endpoint URL correctly include the fully qualified path (http://localhost//MyWebService/Service1.asmx <http://localhost/MyWebService/Service1.asmx> ). As you can probably guess from the useless default names, the web service is also mine, and when I change the web.config sessionState properties to use cookies (which I'd rather not do), I don't get the exception. I will also add that I find dealing with sessions in .NET a thorough pain! So, why is Axis trying to create a URL with the sessionID-stamped path sans protocol/server? Thanks in advance for your help. - Geoff
