Hi,
For basic http auth, you need add add busCfg attribute (let's say
busCfg="basic_auth.xml") for your cxf bc provider xbean,
and your basic_auth.xml should be like
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sec="http://cxf.apache.org/configuration/security"
xmlns:http="http://cxf.apache.org/transports/http/configuration"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xsi:schemaLocation="
http://cxf.apache.org/configuration/security
http://cxf.apache.org/schemas/configuration/security.xsd
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
">
<http:conduit name="{your_name_space}your_endpoint_name.http-conduit">
<http:authorization>
<sec:UserName>Betty</sec:UserName>
<sec:Password>password</sec:Password>
</http:authorization>
</http:conduit>
</beans>
Freeman
On 2009-7-10, at 下午9:22, brijesh wrote:
Hi Freeman,
thanks for the reponse, my external service doesn't use ssl , its
plain http
call.
How to have basic http authentication in cxf provider? . In wsdl end
point
location is
location="http://xiserver:8000/XISOAPAdapter/MessageServlet?
regards
Brijesh N K,
Freeman Fang wrote:
Hi,
Is your external webservice server use https transport?
If so, you may need take a look at the testcase[1] that demostrate
how
cxf bc provider to use https
[1]https://svn.apache.org/repos/asf/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcProviderHttpsTest.java
Freeman
On 2009-7-10, at 下午7:19, brijesh wrote:
hi there,
following is my xbean config for cxf bc
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed
with
this work for additional information regarding copyright
ownership.
The ASF licenses this file to You under the Apache License,
Version 2.0
(the "License"); you may not use this file except in compliance
with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
See the License for the specific language governing permissions
and
limitations under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
xmlns:imp="http://xmlns.oracle.com/EkaPoImportProcess"
xmlns:bupa="http://TestBupaCreate"
xmlns:nte="http://www.ekaplus.com/NotifyEvent/"
xsi:schemaLocation="http://servicemix.apache.org/cxfbc/1.0
http://servicemix.apache.org/schema/servicemix-cxfbc-3.2.2.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<cxfbc:consumer wsdl="classpath:NotifyEvent.wsdl"
targetService="nte:notifyeventBUPAEIPService"
useJBIWrapper = "false"
useSOAPEnvelope = "false"
/>
<cxfbc:provider
wsdl="classpath:MI_OBA_SOAP_Input_BUPA_Create_new.wsdl"
locationURI="http://xiserver:8000/XISOAPAdapter/MessageServlet?channel=:BS_SOAP_sender_BUPA_Create:CC_SOAP_sender_BUPA_Create&version=3.0&Sender.Service=BS_SOAP_sender_BUPA_Create&Interface=http%3A%2F%2FTestBupaCreate%5EMI_OBS_SOAP_Request_Response_BUPA_Create
"
service="bupa:MI_OBS_SOAP_Request_Response_BUPA_CreateService"
endpoint="MI_OBS_SOAP_Request_Response_BUPA_CreatePort"
useJBIWrapper="false"
interfaceName
="bupa:MI_OBS_SOAP_Request_Response_BUPA_CreateService"/>
</beans>
When I calling provider service
bupa:MI_OBS_SOAP_Request_Response_BUPA_CreateService, I am getting
authentication failure, how do I configure to pass http username and
password in above provider configuration.
following is my MI_OBA_SOAP_Input_BUPA_Create_new.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="MI_OBA_SOAP_Input_BUPA_Create"
targetNamespace="http://SOAP_to_File_BUPA_Create"
xmlns:p2="http:\\Test_BUPA_Create_Update"
xmlns:p1="http://SOAP_to_File_BUPA_Create"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xsd:schema targetNamespace="http:\\Test_BUPA_Create_Update"
xmlns="http:\\Test_BUPA_Create_Update"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element
name="MT_Input_File_Business_Partner_Create"
type="DT_Input_File_Business_Partner_Create" />
<xsd:complexType
name="DT_Input_File_Business_Partner_Create">
<xsd:sequence>
<xsd:element name="ProfileID"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46320567511deb4cc001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="ExtRefID"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46321567511de9d69001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="CompanyLongName1"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46322567511decd7b001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="CompanyLongName2"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46323567511de938b001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="GroupName"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46324567511de9557001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="CompanyType"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46325567511deccbc001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="StandardAddress">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46326567511de8ea9001fd0b69676
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name="Building"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46327567511de9092001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="Location"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46328567511de805d001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="City"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46329567511de8b26001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="PostalCode"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f4632a567511de868f001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="State"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f4632b567511dec1dc001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="Country"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f4632c567511dec3f5001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="Phone"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f4632d567511dea8d2001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="Fax"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f4632e567511dea161001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="EmailID"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f4632f567511dec345001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ShippingAddress">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46330567511de9021001fd0b69676
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name="Building"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46331567511de9de8001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="Location"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46332567511de960f001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="City"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46333567511de9f00001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="PostalCode"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46334567511dec553001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="State"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46335567511de9186001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="Country"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46336567511debeb6001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="Phone"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46337567511dec291001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="Fax"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46338567511deaab8001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="EmailID"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46339567511deb503001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="BankDetails1">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f4633a567511deb3c2001fd0b69676
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name="BankID"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f4633b567511decc61001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="BankCountry"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f4633c567511de9f8c001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="BankKey"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f4633d567511de9526001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="BankAccountNo"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f4633e567511deae74001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="AccountHolderName"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f4633f567511de8700001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="IBAN"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46340567511de8d18001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="BankDetails2">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46341567511de89db001fd0b69676
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name="BankID"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46342567511de9a52001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="BankCountry"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46343567511dec62b001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="BankKey"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46344567511dec8a4001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="BankAccountNo"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46345567511de8b4b001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="AccountHolderName"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46346567511de988e001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element
name="IBAN"
type="xsd:string">
<xsd:annotation>
<xsd:appinfo
source="http://sap.com/xi/TextID">
45f46347567511dec637001fd0b69676
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="p2.MT_Input_File_Business_Partner_Create">
<wsdl:part name="MT_Input_File_Business_Partner_Create"
element="p2:MT_Input_File_Business_Partner_Create"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" />
</wsdl:message>
<wsdl:portType name="MI_OBA_SOAP_Input_BUPA_Create">
<wsdl:operation name="MI_OBA_SOAP_Input_BUPA_Create">
<wsdl:input
message="p1:p2.MT_Input_File_Business_Partner_Create" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MI_OBA_SOAP_Input_BUPA_CreateBinding"
type="p1:MI_OBA_SOAP_Input_BUPA_Create"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
<wsdl:operation name="MI_OBA_SOAP_Input_BUPA_Create">
<soap:operation
soapAction="http://sap.com/xi/WebService/soap1.1"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
/>
<wsdl:input>
<soap:body use="literal"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MI_OBA_SOAP_Input_BUPA_CreateService">
<wsdl:port name="MI_OBA_SOAP_Input_BUPA_CreatePort"
binding="p1:MI_OBA_SOAP_Input_BUPA_CreateBinding"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<soap:address
location="http://xiserver:8000/XISOAPAdapter/MessageServlet?channel=:BS_SOAP_Sender_BUPA_Create:CC_SOAP_Sender_BUPA_Create&version=3.0&Sender.Service=BS_SOAP_Sender_BUPA_Create&Interface=http%3A%2F%2FSOAP_to_File_BUPA_Create%5EMI_OBA_SOAP_Input_BUPA_Create
"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Thanks & regards
Brijesh N K
--
View this message in context:
http://www.nabble.com/http-authentication-in-smx-cxf-provider-tp24425631p24425631.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com
--
View this message in context:
http://www.nabble.com/http-authentication-in-smx-cxf-provider-tp24425631p24427502.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com