Hi,
I have a beans.xml file containing:
<http:conduit
name="{http://ws.unwire.dk/ldap/MyService/v1}MyService1Staging.http-conduit">
<http:tlsClientParameters secureSocketProtocol="SSL">
</http:tlsClientParameters>
</http:conduit>
And a little test client that does this in it's main() method:
ApplicationContext ac = new ClassPathXmlApplicationContext("beans.xml");
MyService1_Service service = new MyService1_Service();
MyService1 my = service.getMyService1Staging();
Client c = ClientProxy.getClient(my);
HTTPConduit conduit = (HTTPConduit) c.getConduit();
TLSClientParameters tlsParams = new TLSClientParameters();
conduit.setTlsClientParameters(tlsParams);
System.out.println(my.someOperation());
And that works and all is well.
However, if I comment the creation of the ApplicationContext out, I
get the following error:
INFO: Creating Service
{http://ws.unwire.dk/ldap/MyService/v1}MyService1 from WSDL:
https://staging.unwire.dk/ldapservice/services/MyService1?wsdl
Exception in thread "main" org.apache.cxf.interceptor.Fault: No
conduit initiator was found for the namepsace
http://schemas.xmlsoap.org/soap/http.
at
org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:89)
at
org.apache.cxf.endpoint.UpfrontConduitSelector.selectConduit(UpfrontConduitSelector.java:71)
at org.apache.cxf.endpoint.ClientImpl.getConduit(ClientImpl.java:413)
at dk.unwire.ws.ldap.myservice.v1.MyService1_Service.main(Main.java:95)
Caused by: org.apache.cxf.BusException: No conduit initiator was found
for the namepsace http://schemas.xmlsoap.org/soap/http.
at
org.apache.cxf.transport.ConduitInitiatorManagerImpl.getConduitInitiator(ConduitInitiatorManagerImpl.java:96)
at
org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:70)
... 3 more
So, is it possible to perform the same configuration using the API as
would otherwise have been done by the ApplicationContext and the
http:conduit element?
This whole thing is being used in a component intended for other
projects to use, so I could simplify my public interface and
configuration overhead if I could make all the default configurations
built in.
--
Venlig hilsen / Kind regards,
Christian Vest Hansen.