Thanks dims, I've got it now. I'm a bit confused as to why the toolkit can't pull the service name out of the WSDL as well? It seems like the WSDL is being parsed twice in this respect. In short, I'm populating a class with information strictly from the WSDL.
Blake -----Original Message----- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 11, 2004 7:33 PM To: [EMAIL PROTECTED] Subject: Re: Question about Service() Constructor Blake, Can you post the WSDL itself? typically you pick up the targetNamespace as the uri for constructuing the QName. You can check out my samples/client/DynamicInvoker code -- dims (Davanum Srinivas) ----- Original Message ----- From: Blake Dournaee <[EMAIL PROTECTED]> Date: Tue, 11 May 2004 16:14:57 -0700 Subject: RE: Question about Service() Constructor To: [EMAIL PROTECTED] All, I've updated this to include a guess at the namespace part of the QName. Still the same problem: try { String uri = new String("http://localhost:8080/axis/Tester.jws"); String localPart = new String("TesterClient"); QName serviceName = new QName(uri,localPart); Service service = new Service(wsdl,serviceName); } catch (Exception xp) { System.out.println("Error building Service object"); xp.printStackTrace(); } Error building Service object javax.xml.rpc.ServiceException: Error processing WSDL document: javax.xml.rpc.ServiceException: Error processing WSDL document: javax.xml.rpc.ServiceException: Cannot find service: {http://localhost:8080/axis/Tester.jws}TesterClient at org.apache.axis.client.Service.initService(Service.java:261) at org.apache.axis.client.Service.<init>(Service.java:217) at TesterClient.main(TesterClient.java:44) Does anyone have any ideas? Thanks, Blake ________________________________ From: Blake Dournaee [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 11, 2004 2:15 PM To: [EMAIL PROTECTED] Subject: Question about Service() Constructor All, Given a WSDL, how does one properly find the name of the service? That is, I have a WSDL and am making a call to the Service() constructor that takes two arguments: The WSDL (stream or file) A QName. I am stuck on how to properly populate the QName. At this point I am guessing. In my WSDL, the <service> element has an attribute called name, e.g: <wsdl:service name="TesterService"> <wsdl:port binding="impl:TesterSoapBinding" name="Tester"> <wsdlsoap:address location="http://localhost:8080/axis/Tester.jws"/> </wsdl:port> </wsdl:service> So my call looks like: try { QName serviceName = new QName("TesterClient"); Service service = new Service(wsdl,serviceName); } catch (Exception xp) { System.out.println("Error building Service object"); xp.printStackTrace(); } But this gives me an exception: og4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle). og4j:WARN Please initialize the log4j system properly. rror building Service object avax.xml.rpc.ServiceException: Error processing WSDL document: avax.xml.rpc.ServiceException: Error processing WSDL document: avax.xml.rpc.ServiceException: Cannot find service: TesterClient at org.apache.axis.client.Service.initService(Service.java:261) at org.apache.axis.client.Service.<init>(Service.java:217) at TesterClient.main(TesterClient.java:41) I am not even getting off the ground on this. Can someone help me figure out how to properly name my Service? Thanks, Blake
