Apache Camel CXF找不到CXFEndpoint

时间:2016-05-24 02:17:51

标签: java spring soap apache-camel cxf

概述

我在spring启动程序中创建了一个camel路由类。此路由器从队列中获取数据,对其进行转换,然后将转换后的数据提交到外部SOAP Web服务。

RouteClass如下:

Public Class Success
    Public Property success As Boolean
    <JsonProperty(ItemConverterType := GetType(SingleOrArrayConverter(Of String)))> _   
    Public Property successes As List(Of List(Of String))
End Class

Public Class Record
    Public Property id As Integer
End Class

Public Class Result
    Public Property records As Record()
    Public Property success As Boolean

    <JsonIgnore> _
    Public Property successes as Dictionary(Of string, Success)

    <JsonExtensionData> _
    Private _additionalData as Dictionary(Of string, JToken)

    <System.Runtime.Serialization.OnSerializing> _
    Sub OnSerializing(ByVal context as System.Runtime.Serialization.StreamingContext)
        If successes IsNot Nothing
            _additionalData = successes.ToDictionary(Function(p) p.Key, Function(p) JToken.FromObject(p.Value))
        Else
            _additionalData = Nothing
        End If
    End Sub

    <System.Runtime.Serialization.OnSerialized> _
    Sub OnSerialized(ByVal context as System.Runtime.Serialization.StreamingContext)
        _additionalData = Nothing
    End Sub

    <System.Runtime.Serialization.OnDeserializing> _
    Sub OnDeserializing(ByVal context as System.Runtime.Serialization.StreamingContext)
        _additionalData = Nothing
    End Sub

    <System.Runtime.Serialization.OnDeserialized>
    Sub OnDeserialized(ByVal context as System.Runtime.Serialization.StreamingContext)

        If _additionalData IsNot Nothing
            successes = _additionalData.ToDictionary(Function(p) p.Key, Function(p) p.Value.ToObject(Of Success)())
        End If
        _additionalData = Nothing

    End Sub
End Class

Public Class Response
    Public Property type As String
    Public Property tid As Integer
    Public Property action As String
    Public Property method As String
    Public Property result As Result
End Class

Public Class SingleOrArrayConverter(Of T)
    Inherits JsonConverter

    Public Overrides ReadOnly Property CanWrite() As Boolean
        Get
            Return false
        End Get
    End Property

    Public Overrides Sub WriteJson(writer As JsonWriter, value As Object, serializer As JsonSerializer)
        Throw New NotImplementedException()
    End Sub

    Public Overrides Function ReadJson(reader As JsonReader, objectType As Type, existingValue As Object, serializer As JsonSerializer) As Object
        Dim retVal As Object = New List(Of T)()
        If reader.TokenType = JsonToken.StartArray Then
            serializer.Populate(reader, retVal)
        Else
            Dim instance As T = DirectCast(serializer.Deserialize(reader, GetType(T)), T)
            retVal.Add(instance)
        End If
        Return retVal
    End Function

    Public Overrides Function CanConvert(objectType As Type) As Boolean
        Return objectType = GetType(List(Of T))
    End Function

End Class

cxf.xml配置文件如下:

@Component
public class SaleTransactionRoutes extends RouteBuilder {

    @Override
    public void configure() throws Exception {        
        JacksonDataFormat saleTransactionFormat = new JacksonDataFormat(SaleTransaction.class);

        from(QueueNames.SALETRANSACTION_REQUESTS_QUEUE)
                .routeId("SaleTransactionRoute")
                .unmarshal(saleTransactionFormat)
                .beanRef("saleTransactionTransformer", "prepareSaleTransactionRequest")
                .to(ServiceEndpoints.TMR_WS);            
    }
}

WSDL文件如下:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:cxf="http://camel.apache.org/schema/cxf"
       xsi:schemaLocation="
 http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
 http://camel.apache.org/schema/cxf
 http://camel.apache.org/schema/cxf/camel-cxf.xsd">

    <cxf:cxfEndpoint id="tmrSaleTransactionService" address="{{tmr.saletransaction.uri}}"
                     wsdlURL="META-INF/wsdl/TmrSaleTransaction.wsdl"
                     serviceClass="com.sap.xi.WebService.Create_Sales_Order_OB_SI">
        <cxf:inInterceptors>
            <ref bean="loggingInInterceptor"/>
        </cxf:inInterceptors>
        <cxf:outInterceptors>
            <ref bean="loggingOutInterceptor"/>
        </cxf:outInterceptors>
        <cxf:outFaultInterceptors>
            <ref bean="faultOutInterceptor"/>
        </cxf:outFaultInterceptors>
    </cxf:cxfEndpoint>
</beans>

问题

当我运行应用程序时,抛出以下异常:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="Create_Sales_Order_OB_SI" targetNamespace="urn:qss.qld.gov.au:TMR_APPL:Albert"
                  xmlns:p1="urn:qss.qld.gov.au:TMR_APPL:Albert" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
                  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:documentation/>
    <wsp:UsingPolicy wsdl:required="true"/>
    <wsp:Policy wsu:Id="OP_Create_Sales_Order_OB_SI"/>
    <wsdl:types>
        <xsd:schema targetNamespace="urn:qss.qld.gov.au:TMR_APPL:IDOC" xmlns="urn:qss.qld.gov.au:TMR_APPL:IDOC"
                    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <xsd:complexType name="E1EDKA1_Partner_Information_Header_DT">
                <xsd:annotation>
                    <xsd:documentation xml:lang="EN">E1EDKA1 : IDoc: Document Header Partner Information.
                    </xsd:documentation>
                    <xsd:appinfo source="http://sap.com/xi/VersionID">2fbeb44e0b4b11e68629000021be3e6e</xsd:appinfo>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="Customer_Number" type="xsd:string">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">2cdf048ed8f011e5a2620050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>PARTN : Partner number</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Title" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">d979f388ea5211e5a39c0050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>LIFNR : Vendor number at customer location</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Name_1" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">2cdf048fd8f011e59c4d0050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>NAME1 : Name 1</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Name_2" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">afd60b97d91b11e5cd270050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>NAME2 : Name 2</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Name_3" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">afd60b98d91b11e5aa2b0050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>NAME3 : Name 3</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Name_4" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">afd60b99d91b11e5bf260050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>NAME4 : Name 4</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Street_and_House_Number_1" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">afd60b9ad91b11e5a7c20050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>STRAS : Street and house number 1</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Street_and_House_Number_2" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">afd60b9bd91b11e5c23b0050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>STRS2 : Street and house number 2</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="PO_Box" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">afd60b9cd91b11e59f230050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>PFACH : PO Box</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="City" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">afd60b9dd91b11e5908d0050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>ORT01 : City</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Postal_Code" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">afd60b9ed91b11e5ad580050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>PSTLZ : Postal code</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="PO_Box_Postal_Code" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">afd60b9fd91b11e5cdb50050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>PSTL2 : P.O. Box postal code</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="PO_Box_City" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">afd60ba0d91b11e5a2210050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>PFORT : PO Box city</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Country_Key" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">afd60ba1d91b11e5be1f0050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>LAND1 : Country Key</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Contact_Phone_Number_1" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">afd60ba2d91b11e5c1290050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>TELF1 : 1st telephone number of contact person</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Language_Key" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">afd60ba3d91b11e5b9d80050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>SPRAS : Language key</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Form_of_Address" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">afd60ba4d91b11e5ab5f0050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>ANRED : Form of Address</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="District" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">afd60ba5d91b11e5988a0050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>ORT02 : District</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="House_Number" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">afd60ba6d91b11e5a4a70050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>HAUSN : House number</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Floor" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">afd60ba7d91b11e589d40050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>STOCK : Floor</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Region" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">afd60ba8d91b11e5932c0050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>REGIO : Region</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Email_Address" type="xsd:string">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">c9ab18e3ea5311e58a070050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>ILNNR : Character field up to 70 chars</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="ORDER05_Line_item_DT">
                <xsd:annotation>
                    <xsd:documentation xml:lang="EN">IDoc: Document Item General Data.</xsd:documentation>
                    <xsd:appinfo source="http://sap.com/xi/VersionID">0b00fb060dc211e69316000021be3e6e</xsd:appinfo>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="Item_Number" type="xsd:string">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">646bba06020011e6cd5c0050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>POSEX : Item number</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Price_Net" type="xsd:string">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">8845562ad6b811e58a170050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>VPREI : Price (net)</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Currency" type="xsd:string" default="AUD">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">db2ecd6801fe11e6ba870050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>CURCY : Currency</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Price_Unit" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">8845562bd6b811e592b90050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>PEINH : Price unit</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="IDOC_Material_ID" type="xsd:string">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">3e0dd6f8d92311e5c9c40050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>MATNR : IDOC material ID</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Quantity" type="xsd:string">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">3e0dd6f9d92311e5892f0050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>MENGE : Quantity</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Unit_Of_Measure" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">3e0dd6fad92311e5c79e0050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>MENEE : Unit of measure</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="GST_Amount" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">3e0b9603d92311e596f90050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>GST amount of line</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Quantity_in_Price_Unit" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">91130ff7029611e6b0ef0050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>BMNG2 : Quantity in price unit</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Price_Unit_of_Measure" type="xsd:string" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">91130ff8029611e6caf90050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>PMENE : Price Unit of Measure</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:schema>
        <xsd:schema targetNamespace="urn:qss.qld.gov.au:TMR_APPL:Albert" xmlns:p5="urn:qss.qld.gov.au:TMR_APPL:IDOC"
                    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:qss.qld.gov.au:TMR_APPL:Albert">
            <xsd:import namespace="urn:qss.qld.gov.au:TMR_APPL:IDOC"/>
            <xsd:element name="ORDER05_Albert_SOAP_MT" type="ORDER05_Albert_SOAP_DT"/>
            <xsd:complexType name="ORDER05_Albert_SOAP_DT">
                <xsd:annotation>
                    <xsd:documentation xml:lang="EN">Albert Commbiz specific ORDER05 creation SOAP message
                    </xsd:documentation>
                    <xsd:appinfo source="http://sap.com/xi/VersionID">f8c2aec80cf111e6ac2b000021be3e6e</xsd:appinfo>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="Header" type="ORDER05_Albert_Header_DT">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">9bad370b020011e6bc700050560106d2
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Line_Item" type="p5:ORDER05_Line_item_DT" maxOccurs="unbounded">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">9bad370c020011e697aa0050560106d2
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="ORDER05_Albert_Header_DT">
                <xsd:annotation>
                    <xsd:documentation xml:lang="EN">ORDER05 : IDoc: Document header segment</xsd:documentation>
                    <xsd:appinfo source="http://sap.com/xi/VersionID">73947f000dc211e69b8e000021be3e6e</xsd:appinfo>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="Invoice_Or_Cash_Sale" type="xsd:string" default="Invoice">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">e8961992e9d511e5c3140050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>&quot;Invoice&quot; type Sales Order or &quot;Cash Sale&quot; type Sales
                                Order?
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Transaction_Number" type="xsd:string">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">7395c8a20dc211e6b9be0050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>IDoc document transaction number</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Albert_Site" type="xsd:string" default="0200">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">3beda748e9d711e5b5940050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>Albert site reference</xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="Delivery_Date">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">d0e06de1d91c11e5c7080050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>DATUM : IDOC: Date</xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                            <xsd:restriction base="xsd:date">
                                <xsd:pattern value="CCYY-MM-DD"/>
                            </xsd:restriction>
                        </xsd:simpleType>
                    </xsd:element>
                    <xsd:element name="Date_of_Creation" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">d0e06de2d91c11e5c9480050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>DATUM : IDOC: Date</xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                            <xsd:restriction base="xsd:date">
                                <xsd:pattern value="CCYY-MM-DD"/>
                            </xsd:restriction>
                        </xsd:simpleType>
                    </xsd:element>
                    <xsd:element name="Invoice_Date" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">d0e06de3d91c11e5ae260050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>DATUM : IDOC: Date</xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                            <xsd:restriction base="xsd:date">
                                <xsd:pattern value="CCYY-MM-DD"/>
                            </xsd:restriction>
                        </xsd:simpleType>
                    </xsd:element>
                    <xsd:element name="Sales_Order_Date" minOccurs="0">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">d0e06de4d91c11e587bf0050560106d2
                            </xsd:appinfo>
                            <xsd:documentation>DATUM : IDOC: Date</xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                            <xsd:restriction base="xsd:date">
                                <xsd:pattern value="CCYY-MM-DD"/>
                            </xsd:restriction>
                        </xsd:simpleType>
                    </xsd:element>
                    <xsd:element name="Custom_Definition" type="p5:E1EDKA1_Partner_Information_Header_DT">
                        <xsd:annotation>
                            <xsd:appinfo source="http://sap.com/xi/TextID">dde650eee9d611e58f1f0050560106d2
                            </xsd:appinfo>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:schema>
    </wsdl:types>
    <wsdl:message name="ORDER05_Albert_SOAP_MT">
        <wsdl:documentation/>
        <wsdl:part name="ORDER05_Albert_SOAP_MT" element="p1:ORDER05_Albert_SOAP_MT"/>
    </wsdl:message>
    <wsdl:portType name="Create_Sales_Order_OB_SI">
        <wsdl:documentation/>
        <wsdl:operation name="Create_Sales_Order_OB_SI">
            <wsdl:documentation/>
            <wsp:Policy>
                <wsp:PolicyReference URI="#OP_Create_Sales_Order_OB_SI"/>
            </wsp:Policy>
            <wsdl:input message="p1:ORDER05_Albert_SOAP_MT"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="Create_Sales_Order_OB_SIBinding" type="p1:Create_Sales_Order_OB_SI">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"
                      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
        <wsdl:operation name="Create_Sales_Order_OB_SI">
            <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="Create_Sales_Order_OB_SIService">
        <wsdl:port name="HTTP_Port" binding="p1:Create_Sales_Order_OB_SIBinding">
            <soap:address
                    location="http://txkci.tmrsap.qgs.qld.gov.au:57600/XISOAPAdapter/MessageServlet?senderParty=&amp;senderService=Albert_BC&amp;receiverParty=&amp;receiverService=&amp;interface=Create_Sales_Order_OB_SI&amp;interfaceNamespace=urn%3Aqss.qld.gov.au%3ATMR_APPL%3AAlbert"
                    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
        </wsdl:port>
        <wsdl:port name="HTTPS_Port" binding="p1:Create_Sales_Order_OB_SIBinding">
            <soap:address
                    location="https://txkci.tmrsap.qgs.qld.gov.au:57601/XISOAPAdapter/MessageServlet?senderParty=&amp;senderService=Albert_BC&amp;receiverParty=&amp;receiverService=&amp;interface=Create_Sales_Order_OB_SI&amp;interfaceNamespace=urn%3Aqss.qld.gov.au%3ATMR_APPL%3AAlbert"
                    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

我还没有找到如何处理这个例外。所以,如果有人能帮我找到解决方案,我将不胜感激。

1 个答案:

答案 0 :(得分:1)

我找到了错过的戒指。在处理混合XML和注释的情况下,应该通知Spring有关XML bean的信息,以便将它们放入注册表中,并在Spring引导应用程序开始运行时最终找到它们。就我而言,我将@ImportResource添加到Spring启动应用程序类中,如下所示,问题已经解决:

@SpringBootApplication
@EnableAutoConfiguration(exclude = {VelocityAutoConfiguration.class})
@ImportResource("classpath:/META-INF/cxf/cxf.xml")
public class TmrServicesApplication {
    public static void main(String[] args) {
        SpringApplication.run(TmrServicesApplication.class, args);
    }
}