For a test application, the namespace isn't particularly significant.
You can keep the original namespaces, or you can change them to your
own format. But for production applications, namespaces are very
important -- especially if the goal is to manage and organize reusable
services. Typically a company defines corporate standards on how to
create namespaces.

If your company has any policies about namespaces, then follow those.
If it doesn't, then I suggest you devise your own conventions, just to
get into good practice. I suggest you devise names something like
this:

wsdl target namespace: 
        http://<company>.com/services/<servicename>/wsdl
wsdl types schema target namespace: 
        http://<company>.com/services/<servicename>/wsdl/types
other schema target namespaces:
        http://<company>.com/schemas/<schemaname>
SOAPAction URI:
        http://<company>.com/services/<servicename>/<operationname>

Anne

On 7/6/05, Miller, Janet <[EMAIL PROTECTED]> wrote:
> 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
> >
>

Reply via email to