You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by James Mao <ja...@iona.com> on 2007/04/17 05:03:06 UTC

Namespace is out of track in runtime

I can see a lot of hard coded namespace in 
AbstractEndpointFactory/SOAPBindingFactory/ServerWSDLBuilder, i think we 
should put those in one place

I don't know what's "http://schemas.xmlsoap.org/soap/" means
In AbstractEndpointFactory it's binding, but in SoapTransportFactory 
it's transportid

 From the java2wsdl we used the AbstractEndpointFactory, from the 
generated wsdl, i can see lots of namespace in definition, some of them 
can be removed
e.g xmlns:soap="http://schemas.xmlsoap.org/soap/", i don't know what is 
it, seems never used in the whole wsdl.

Whatever soap version we used,  we put both soap11/soap12 namespaces in 
definition.
I will add the build(HashSet<String, String> ns) to ServiceWSDLBuilder, 
after that we don't need hard code the namespaces in ServiceWSDLBuilder

Cheers,
James.

Re: Namespace is out of track in runtime

Posted by Dan Diephouse <da...@envoisolutions.com>.
On 4/17/07, James Mao <ja...@iona.com> wrote:
>
> Again,
>
> In AbstractEndpointFactory around line 181, we hard coded the
> transportId to transportId = "http://schemas.xmlsoap.org/wsdl/soap/";
> Which is not ok when it's SOAP12, in which case, it should be
> transportId = "http://schemas.xmlsoap.org/wsdl/soap12/";
> I will remove this line, and fix the following testcases:
>
> ReflectionServiceFactoryTest
> ClientFactoryBeanTest
>
> in these two tests, we use set "http://schemas.xmlsoap.org/soap/http"
> as the transportId, which i think should be changed to
> http://schemas.xmlsoap.org/wsdl/soap/


The lines in those tests which do factory.setTransportId(..) can actually be
removed as they aren't needed.

Not sure if this helps at all, but inside AbstractEndpointFactory we do use
that as the transport ID if we have a SOAP binding. This is so the
SoapTransportFactory can customize the WSDL extensors (via
createPortExtensors). SoapTransportFactory then just delegates to whatever
the real transport is...


We really need to put the namespaces into one place.
>
> Let me know if I'm wrong.
>
> James.
>
>
> James Mao wrote:
> > I can see a lot of hard coded namespace in
> > AbstractEndpointFactory/SOAPBindingFactory/ServerWSDLBuilder, i think
> > we should put those in one place
> >
> > I don't know what's "http://schemas.xmlsoap.org/soap/" means
> > In AbstractEndpointFactory it's binding, but in SoapTransportFactory
> > it's transportid
> >
> > From the java2wsdl we used the AbstractEndpointFactory, from the
> > generated wsdl, i can see lots of namespace in definition, some of
> > them can be removed
> > e.g xmlns:soap="http://schemas.xmlsoap.org/soap/", i don't know what
> > is it, seems never used in the whole wsdl.
> >
> > Whatever soap version we used,  we put both soap11/soap12 namespaces
> > in definition.
> > I will add the build(HashSet<String, String> ns) to
> > ServiceWSDLBuilder, after that we don't need hard code the namespaces
> > in ServiceWSDLBuilder
> >
> > Cheers,
> > James.
> >
>
>


-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Re: Namespace is out of track in runtime

Posted by James Mao <ja...@iona.com>.
Again,

In AbstractEndpointFactory around line 181, we hard coded the 
transportId to transportId = "http://schemas.xmlsoap.org/wsdl/soap/";
Which is not ok when it's SOAP12, in which case, it should be 
transportId = "http://schemas.xmlsoap.org/wsdl/soap12/";
I will remove this line, and fix the following testcases:

ReflectionServiceFactoryTest
ClientFactoryBeanTest

in these two tests, we use set "http://schemas.xmlsoap.org/soap/http"  
as the transportId, which i think should be changed to 
http://schemas.xmlsoap.org/wsdl/soap/

We really need to put the namespaces into one place.

Let me know if I'm wrong.

James.


James Mao wrote:
> I can see a lot of hard coded namespace in 
> AbstractEndpointFactory/SOAPBindingFactory/ServerWSDLBuilder, i think 
> we should put those in one place
>
> I don't know what's "http://schemas.xmlsoap.org/soap/" means
> In AbstractEndpointFactory it's binding, but in SoapTransportFactory 
> it's transportid
>
> From the java2wsdl we used the AbstractEndpointFactory, from the 
> generated wsdl, i can see lots of namespace in definition, some of 
> them can be removed
> e.g xmlns:soap="http://schemas.xmlsoap.org/soap/", i don't know what 
> is it, seems never used in the whole wsdl.
>
> Whatever soap version we used,  we put both soap11/soap12 namespaces 
> in definition.
> I will add the build(HashSet<String, String> ns) to 
> ServiceWSDLBuilder, after that we don't need hard code the namespaces 
> in ServiceWSDLBuilder
>
> Cheers,
> James.
>