You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Jonathan Bricker <je...@gmail.com> on 2010/01/26 15:41:30 UTC

jaxws:conduitSelector

Is there an example of how to use the conduitSelector element?  If I have a
conduit defined how do I reference it from the jaxws:client?

thanks

Re: jaxws:conduitSelector

Posted by Jonathan Bricker <je...@gmail.com>.
Here is what appears to be null when the getUriPrefixes() is called.

"org.apache.cxf.headers.Header.list => []"

On Mon, Feb 1, 2010 at 3:38 PM, Daniel Kulp <dk...@apache.org> wrote:

>
> The transportId's are a bit irrelevant at this point.  It's looping through
> the ConduitInitiator calling getUriPrefixes().   Thus, there needs to be a
> ConduitInitiator registered that returns "https"  or similar from that
> call.
> It looks (via "http://cxf.apache.org/transports/http/configuration") that
> you
> have the http transport registered so I'm not sure what would be happening.
> If you can debug this, trace into the getUriPrefixes calls and see what is
> being returned.
>
> Dan
>
>
> On Mon February 1 2010 9:16:51 am Jonathan Bricker wrote:
> > here is the method throwing the exception.  This is
> > ConduitInitiatorManagerImpl
> >
> >  public ConduitInitiator getConduitInitiatorForUri(
> > String uri) {
> >         for (ConduitInitiator ci : conduitInitiators.values()) {
> >             for (String prefix : ci.getUriPrefixes()) {
> >                 if (uri.startsWith(prefix)) {
> >                     return ci;
> >                 }
> >             }
> > With a debug trace I can get the following information:
> >
> > The URI is my service that I'm calling
> > http://blah.blah.DoSomthing<http://blah.blah.dosomthing/>
> > The prefix is correct in that is is looking for a https://
> >
> > ConduitIntiator has a arrayList of transport IDS
> > "http://schemas.xmlsoap.org/soap/http"
> > "http://schemas.xmlsoap.org/wsdl/http/"
> > "http://schemas.xmlsoap.org/wsdl/soap/http"
> > "http://www.w3.org/2003/05/soap/bindings/HTTP/"
> > "http://cxf.apache.org/transports/http/configuration"
> > "http://cxf.apache.org/bindings/xformat"
> >
> > And an ArrayList of activation Namespaces
> > "http://schemas.xmlsoap.org/soap/http"
> > "http://schemas.xmlsoap.org/wsdl/http/"
> > "http://schemas.xmlsoap.org/wsdl/soap/http"
> > "http://www.w3.org/2003/05/soap/bindings/HTTP/"
> > "http://cxf.apache.org/transports/http/configuration"
> > "http://cxf.apache.org/bindings/xformat"
> >
> > The binding for https is not there so where is these list set and what do
> I
> > have to do to get the https transport Id in the list?
> >
> > thanks,
> >
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>

Re: jaxws:conduitSelector

Posted by Daniel Kulp <dk...@apache.org>.
The transportId's are a bit irrelevant at this point.  It's looping through 
the ConduitInitiator calling getUriPrefixes().   Thus, there needs to be a 
ConduitInitiator registered that returns "https"  or similar from that call.   
It looks (via "http://cxf.apache.org/transports/http/configuration") that you 
have the http transport registered so I'm not sure what would be happening.   
If you can debug this, trace into the getUriPrefixes calls and see what is 
being returned.

Dan


On Mon February 1 2010 9:16:51 am Jonathan Bricker wrote:
> here is the method throwing the exception.  This is
> ConduitInitiatorManagerImpl
> 
>  public ConduitInitiator getConduitInitiatorForUri(
> String uri) {
>         for (ConduitInitiator ci : conduitInitiators.values()) {
>             for (String prefix : ci.getUriPrefixes()) {
>                 if (uri.startsWith(prefix)) {
>                     return ci;
>                 }
>             }
> With a debug trace I can get the following information:
> 
> The URI is my service that I'm calling
> http://blah.blah.DoSomthing<http://blah.blah.dosomthing/>
> The prefix is correct in that is is looking for a https://
> 
> ConduitIntiator has a arrayList of transport IDS
> "http://schemas.xmlsoap.org/soap/http"
> "http://schemas.xmlsoap.org/wsdl/http/"
> "http://schemas.xmlsoap.org/wsdl/soap/http"
> "http://www.w3.org/2003/05/soap/bindings/HTTP/"
> "http://cxf.apache.org/transports/http/configuration"
> "http://cxf.apache.org/bindings/xformat"
> 
> And an ArrayList of activation Namespaces
> "http://schemas.xmlsoap.org/soap/http"
> "http://schemas.xmlsoap.org/wsdl/http/"
> "http://schemas.xmlsoap.org/wsdl/soap/http"
> "http://www.w3.org/2003/05/soap/bindings/HTTP/"
> "http://cxf.apache.org/transports/http/configuration"
> "http://cxf.apache.org/bindings/xformat"
> 
> The binding for https is not there so where is these list set and what do I
> have to do to get the https transport Id in the list?
> 
> thanks,
> 

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: jaxws:conduitSelector

Posted by Jonathan Bricker <je...@gmail.com>.
here is the method throwing the exception.  This is
ConduitInitiatorManagerImpl

 public ConduitInitiator getConduitInitiatorForUri(
String uri) {
        for (ConduitInitiator ci : conduitInitiators.values()) {
            for (String prefix : ci.getUriPrefixes()) {
                if (uri.startsWith(prefix)) {
                    return ci;
                }
            }
With a debug trace I can get the following information:

The URI is my service that I'm calling
http://blah.blah.DoSomthing<http://blah.blah.dosomthing/>
The prefix is correct in that is is looking for a https://

ConduitIntiator has a arrayList of transport IDS
"http://schemas.xmlsoap.org/soap/http"
"http://schemas.xmlsoap.org/wsdl/http/"
"http://schemas.xmlsoap.org/wsdl/soap/http"
"http://www.w3.org/2003/05/soap/bindings/HTTP/"
"http://cxf.apache.org/transports/http/configuration"
"http://cxf.apache.org/bindings/xformat"

And an ArrayList of activation Namespaces
"http://schemas.xmlsoap.org/soap/http"
"http://schemas.xmlsoap.org/wsdl/http/"
"http://schemas.xmlsoap.org/wsdl/soap/http"
"http://www.w3.org/2003/05/soap/bindings/HTTP/"
"http://cxf.apache.org/transports/http/configuration"
"http://cxf.apache.org/bindings/xformat"

The binding for https is not there so where is these list set and what do I
have to do to get the https transport Id in the list?

thanks,

Re: jaxws:conduitSelector

Posted by Daniel Kulp <dk...@apache.org>.
On Tue January 26 2010 9:41:30 am Jonathan Bricker wrote:
> Is there an example of how to use the conduitSelector element?  If I have a
> conduit defined how do I reference it from the jaxws:client?

Most likely, you would need to write your own ConduitSelector object that 
would be ApplicationContextAware and in your selectConduit(...) call, would 
make whatever choice it needs.   

You could try the "UpfrontConduitSelector" as that has a Conduit constructor 
arg.   Never really tried it.

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog