Hi
On Thu, Oct 14, 2010 at 3:11 PM, Peter Lauri <[email protected]>wrote:
> So there is no way to via configuration be able to consume a service over a
> SOCKS5 proxy with authentication? My plan was to use this, but it fails.
>
> <http-conf:conduit name="{http://mynamespace}ThePort.http-conduit">
> <http-conf:client ProxyServer="1.2.3.4" ProxyServerPort="80"
> ProxyServerType="SOCKS" />
> <http-conf:proxyAuthorization>
> <sec:UserName>asdf</sec:UserName>
> <sec:Password>asdf</sec:Password>
> </http-conf:proxyAuthorization>
> </http-conf:conduit>
>
>
David and myself have started a discussion on the dev list and hopefully
DOSGI RI 1.3 will offer one or two options.
One thing you might want to try in DOSGI RI 1.3-SNAPSHOT and update its
POJOConfigurationTypeHandler to read an external config file located on the
classpath. I'm not advocating it as the best DOSGI solution - it is just
something I know I'd probably be able to do myself :-), so you can try it
too.
So in its createProxy method, add a code like this :
SpringBusFactory bf = new SpringBusFactory();
Bus bus = bf.createBus(configLocation);
BusFactory.setThreadDefaultBus(bus);
and this may do the trick. 'config location' can be passed via the custom
property
cheers, Sergey
>
> On 2010-10-13 23.54, "ext Sergey Beryozkin" <[email protected]> wrote:
>
> > Hi
> >
> > IMHO we really should not force users into trying to achieve everything
> via
> > existing DOSGI concepts, such as intents.
> > Intents are like policies which the consumers are supposed to notice.
> They
> > are supposed to originate on the server and reach the consumer through
> the
> > discovery service, unless the consumer has been made aware of the intenst
> it
> > has to satisfy put-of-band. One can't really create such an intent which
> > will include the usernames and passwords.
> >
> > We've discussed this issue few months ago and the idea of templated
> intents
> > was mentioned.
> > That said I do believe we should be open to supporting extensions, ex,
> > supporting existing CXF constructs for configuring stuff like http
> proxies,
> > etc.
> > Ex, look at the JAXRS RI. It is a true RI but the extensions are
> important
> > and thus all JAXRS stacks do provide them...
> > They do not make the RI less compliant
> >
> > cheers, Sergey
> >
> > On Wed, Oct 13, 2010 at 8:10 PM, Fabio souza <
> [email protected]
> >> wrote:
> >
> >> Hi Peter,
> >>
> >> Are you planning to create a new intent or just use an existing one?
> >> Well, if you just want to use an existing intent, it is as simple as
> >> setting up some service's properties... Here is the intent-map.xml
> >> that comes with DOSGi:
> >>
> >> <beans xmlns="http://www.springframework.org/schema/beans"
> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >> xmlns:p="http://cxf.apache.org/policy"
> >> xmlns:wsp="http://www.w3.org/ns/ws-policy"
> >> xmlns:wsu="
> >>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1
> .
> >> 0.xsd
> >> "
> >> xmlns:core="http://cxf.apache.org/core"
> >> xmlns:soap="http://cxf.apache.org/bindings/soap"
> >> xsi:schemaLocation="
> >> http://cxf.apache.org/policy
> >> http://cxf.apache.org/schemas/policy.xsd
> >> http://www.w3.org/ns/ws-policy
> >> http://www.w3.org/2007/02/ws-policy.xsd
> >> http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
> >> http://cxf.apache.org/bindings/soap
> >> http://cxf.apache.org/schemas/configuration/soap.xsd
> >> http://www.springframework.org/schema/beans
> >> http://www.springframework.org/schema/beans/spring-beans.xsd">
> >>
> >> <bean id="intentMap" class="org.apache.cxf.dosgi.dsw.qos.IntentMap">
> >> <property name="intents">
> >> <map>
> >> <entry key="addressing" value-ref="nonDecoupledAddressing"/>
> >> <entry key="logging" value-ref="messageLogging"/>
> >> <entry key="SOAP" value-ref="soap11Binding"/>
> >> <entry key="SOAP.1_1" value-ref="soap11Binding"/>
> >> <entry key="SOAP.1_2" value-ref="soap12Binding"/>
> >> <entry key="HTTP" value="PROVIDED"/>
> >> </map>
> >> </property>
> >> </bean>
> >>
> >> <p:policies id="nonDecoupledAddressing">
> >> <wsp:PolicyReference URI="#AddressingPolicy"/>
> >> </p:policies>
> >>
> >> <wsp:Policy wsu:Id="AddressingPolicy"
> >> xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
> >> <wsam:Addressing>
> >> <wsp:Policy />
> >> </wsam:Addressing>
> >> </wsp:Policy>
> >>
> >> <core:logging id="messageLogging"/>
> >>
> >> <soap:soapBinding id="soap11Binding" version="1.1"/>
> >> <soap:soapBinding id="soap12Binding" version="1.2"/>
> >>
> >> </beans>
> >>
> >> As you can see, you can use "addressing" , "logging", "SOAP",
> >> "SOAP.1_1", "SOAP.1_2" and "HTTP" out-of-the-box.
> >>
> >> However, if you want to create your intents, things are a little bit
> >> more difficult. In that case, I think that you would need to create
> >> some interceptors/features and a handler that could be used to parse
> >> the intent-map file.
> >>
> >> Well, I hope this can help you....
> >>
> >> cheers,
> >>
> >> Fábio
> >>
> >>
> >>
> >> On Wed, Oct 13, 2010 at 3:34 PM, Peter Lauri <[email protected]>
> >> wrote:
> >>> Hi,
> >>>
> >>> I tried to do it with the intent-map.xml, but I always get SAX
> exceptions
> >>> all the time. Some are related to some wildcards etc.
> >>>
> >>> I'm going to try some more tomorrow, now time for bed :)
> >>>
> >>> /Peter
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> On 2010-10-13 21.17, "ext David Bosschaert" <
> [email protected]>
> >>> wrote:
> >>>
> >>>> Hi Peter,
> >>>>
> >>>> AFAIK, the CXF-DOSGi subproject doesn't yet support the cxf.xml.
> >>>> Configuration is done through OSGI-INF/cxf/intents/intent-map.xml
> >>>> although it doesn't fully support everything yet. Enhancements welcome
> >>>> :)
> >>>>
> >>>> Cheers,
> >>>>
> >>>> David
> >>>>
> >>>> On 13 October 2010 19:14, Peter Lauri <[email protected]>
> wrote:
> >>>>> I have some configuration that I have created, but I don¹t know how
> to
> >> get
> >>>>> the cxf.xml to be read up? Where to locate that file in my maven
> >> project.
> >>>>> According to documentation it should be in classpath, so /cxf.xml is
> my
> >>>>> assumption. But the configuration does not seem to have been read up.
> >>>>>
> >>>
> >>>
> >>
> >>
> >>
> >> --
> >> Fábio
> >>
>
>