I may be misunderstanding you, but as Anne and Oliver have said, you can just
leave the "http://Sirit/ETTM/" as it is in the WSDL and in the generated code.
That's just referring to the namespace of the WSDL/schema. You might want to
consider doing a little research into the XML side of things to familiarize
yourself. I know it helped me a lot.
In your client code, try the following:
String test = null;
TZCService service = new TZCServiceLocator();
URL url = new URL("http://localhost:8080/axis/services/TZCServicePort");
TZCServiceSoap port = service.getTZCServiceSoap(url);
test = port.getTransactions("Test");
System.out.println("Call Results:" + test);
This may work for you. Change the content of url to whatever you named your
actual port in the WSDL, but if you followed the same convention I imagine you
did, that should work if everything is deployed to the server properly. You'll
have to import the URL type as well.
Dan
-----Original Message-----
From: Miller, Janet [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 06, 2005 9:19 AM
To: [email protected]; Anne Thomas Manes
Subject: RE: Basic Newbie Question - Endpoint
Ok, that makes sense, however, I'm still confused about the namespace. What
should I use if I'm just creating a web service on my localhost? My generated
Locator.java code contains the following:
public javax.xml.namespace.QName getServiceName() {
return new javax.xml.namespace.QName("http://Sirit/ETTM/",
"TZCService");
}
Do I need to change "http://Sirit/ETTM/" to something different? Or should I
just leave it the way it is?
Also, my Skeleton.java code contains code such as the following:
_oper = new
org.apache.axis.description.OperationDesc("getTransactions", _params, new
javax.xml.namespace.QName("http://Sirit/ETTM/", "GetTransactionsResult"));
_oper.setElementQName(new
javax.xml.namespace.QName("http://Sirit/ETTM/", "GetTransactions"));
_oper.setSoapAction("http://Sirit/ETTM/GetTransactions");
The Skeleton.java also has the following:
public TZCServiceSoapSkeleton() {
this.impl = new Sirit.ETTM.TZCServiceSoapImpl();
}
but I think this is ok since my Java package structure matches this?
Not sure what I should do. Can you guys help more?
Thanks a ton for your help!! If I can just get this client to work, I'll be
good to go and past this bottleneck.
Jan
-----Original Message-----
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 06, 2005 8:44 AM
To: [email protected]
Subject: Re: Basic Newbie Question - Endpoint
Yes, Oliver, you're correct.
Anne
On 7/6/05, Wolters, Oliver <[EMAIL PROTECTED]> wrote:
> Hi Janet,
>
> I'm a newbie too but I hope I guess right when I say: The location
> should be changed to "http://localhost:8080/<Service>" because that's
> the address the client tries to connect to. But the namespace is not a
> webaddress that something has to be connected to but some kind of
> logical structuring in the service names to ensure that two services
> from company A and B with the same name "MyService" can be identified
> as different. That meens: the namespace should be something like
> "http://mycompany.com" for example. As a result when you generate the
> Java classes with wsdl2java the generated classes go to the package
> "com.mycompany.<Servicename>". That's what you can achieve with the
> namespace.
>
> Can somebody out there tell me if I'm right or wrong?
>
> Hope that helps you
> Oliver
>
> -----Ursprüngliche Nachricht-----
> Von: Miller, Janet [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 6. Juli 2005 00:23
> An: [email protected]; Anne Thomas Manes
> Betreff: Basic Newbie Question - Endpoint
>
>
> I'm trying to create my first web service using wsdl that was
> generated from an outside source (remote wsdl). The wsdl looks like the
> following:
>
> <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:s="http://www.w3.org/2001/XMLSchema"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:tns="http://Sirit/ETTM/"
> xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> targetNamespace="http://Sirit/ETTM/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
> <wsdl:types>
> <s:schema elementFormDefault="qualified"
> targetNamespace="http://Sirit/ETTM/">
> .
> .
> .
> <wsdl:service name="TZCService">
> <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">External
> Access Web Services for Hybrid Tolling</documentation>
> <wsdl:port name="TZCServiceSoap" binding="tns:TZCServiceSoap">
> <soap:address location="http://localhost/ETTMServices/TZCService.asmx" />
> </wsdl:port>
> </wsdl:service>
>
> I ran wsdl2java and generated both the client and server stub and
> skeleton code, added my implementation code, and modified the target
> url in many places. Would it be easier to just modify the original
> wsdl and change the url to my localhost?
>
> What do I change the soap:address location to? Should it be
> "http://localhost:8080/axis/TZCService"? And should I change
> "http://Sirit/ETTM/" to "http://localhost:8080"?
>
> Thanks for your help,
>
> Jan
>