Hi Matthew, on first sight that import in WSDL looks fishy to me, perhaps you can try embedding the XSD in the WSDL? I'm sure you have seen it but if you haven't there is an example with Camel and CXF in OSGI[1] that you can try to play with,
zoran [1] https://github.com/apache/camel/tree/master/examples/camel-example-cxf-osgi On Thu, Jul 27, 2017 at 3:14 AM, Matthew Shaw <matthew.s...@ambulance.qld.gov.au> wrote: > Hi, > > I'm configuring a camel route with a cxf web service endpoint and deploying > into osgi/karaf via declarative services. Service starts up ok and I can > browse the wsdl. However invoking from soapui with a valid request I am > getting the following error: > > org.apache.cxf.interceptor.Fault: Message part > {http://services.ambulance.qld.gov.au/data/messaging/legacywrapper/etimesheet}eTimesheetRequest > was not recognized. (Does it exist in service WSDL?) > > I definitely does exist in the schema imported by the wsdl. See the wsdl and > appropriate xsd definitions below. Also, here is my route setup. I'm > generating SEI and other classes using the cxf codegen plugin with maven. > > CxfEndpoint endpoint = new CxfEndpoint(); > endpoint.setCamelContext(getContext()); > endpoint.setWsdlURL("wsdl/eTimesheetWrapper.wsdl"); > endpoint.setAddress("http://localhost:8182/services/legacywrapper/etimesheet"); > endpoint.setDataFormat(DataFormat.POJO); > endpoint.setServiceClass( > au.gov.qld.ambulance.services.legacywrapper.etimesheet.ETimesheetWrapperService.class); > QName serviceName = new > QName("http://services.ambulance.qld.gov.au/legacywrapper/etimesheet", > "eTimesheetWrapperService"); > QName portName = new > QName("http://services.ambulance.qld.gov.au/legacywrapper/etimesheet", > "eTimesheetWrapper"); > endpoint.setPortName(portName); > > from(endpoint) > .log("I received your soap message.") > .inputType(ETimesheetRequest.class) > .to("direct:extractTimesheetId"); > > > WSDL > > This XML file does not appear to have any style information associated with > it. The document tree is shown below. > <wsdl:definitions xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:tns="http://services.ambulance.qld.gov.au/legacywrapper/etimesheet"xmlns:ta="http://services.ambulance.qld.gov.au/data/services/corporate/hri/timeandattendance" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"xmlns:et="http://services.ambulance.qld.gov.au/data/messaging/legacywrapper/etimesheet" > name="eTimesheetWrapper" > targetNamespace="http://services.ambulance.qld.gov.au/legacywrapper/etimesheet"> > <wsdl:import > location="http://localhost:8182/services/legacywrapper/etimesheet?wsdl=../xsd/eTimesheetWrapper.xsd" > > namespace="http://services.ambulance.qld.gov.au/data/messaging/legacywrapper/etimesheet"></wsdl:import> > <wsdl:types></wsdl:types> > <wsdl:message name="getPayPeriodRequest"> > <wsdl:part element="et:eTimesheetRequest" name="request"></wsdl:part> > </wsdl:message> > <wsdl:message name="getTimesheetsByStatusAndPayPeriodResponse"> > <wsdl:part element="et:eTimesheetResponse" name="return"></wsdl:part> > </wsdl:message> > <wsdl:message name="getTimesheetResponse"> > <wsdl:part element="et:eTimesheetResponse" name="return"></wsdl:part> > </wsdl:message> > <wsdl:message name="getApprovedTimesheetsForPayPeriodResponse"> > <wsdl:part element="et:eTimesheetResponse" name="return"></wsdl:part> > </wsdl:message> > <wsdl:message name="getCurrentPayPeriodResponse"> > <wsdl:part element="et:eTimesheetResponse" name="return"></wsdl:part> > </wsdl:message> > <wsdl:message name="getTimesheetsByStatusAndPayPeriodRequest"> > <wsdl:part element="et:eTimesheetStatusPayPeriodRequest" > name="request"></wsdl:part> > </wsdl:message> > <wsdl:message name="getTimesheetRequest"> > <wsdl:part element="et:eTimesheetRequest" name="request"></wsdl:part> > </wsdl:message> > <wsdl:message name="getApprovedTimesheetsForPayPeriodRequest"></wsdl:message> > <wsdl:message name="getCurrentPayPeriodRequest"> > <wsdl:part element="et:eTimesheetRequest" name="request"></wsdl:part> > </wsdl:message> > <wsdl:message name="getPayPeriodResponse"> > <wsdl:part element="et:eTimesheetResponse" name="return"></wsdl:part> > </wsdl:message> > <wsdl:portType name="eTimesheetWrapperPort"> > <wsdl:documentation>Exposes the eTimesheet session EJBs</wsdl:documentation> > <wsdl:operation name="getApprovedTimesheetsForPayPeriod"> > <wsdl:input message="tns:getApprovedTimesheetsForPayPeriodRequest" > name="getApprovedTimesheetsForPayPeriodRequestRequest"></wsdl:input> > <wsdl:output message="tns:getApprovedTimesheetsForPayPeriodResponse" > name="getApprovedTimesheetsForPayPeriodRequestResponse"></wsdl:output> > </wsdl:operation> > <wsdl:operation name="getTimesheet"> > <wsdl:input message="tns:getTimesheetRequest" > name="getTimesheetRequestRequest"></wsdl:input> > <wsdl:output message="tns:getTimesheetResponse" > name="getTimesheetRequestResponse"></wsdl:output> > </wsdl:operation> > <wsdl:operation name="getTimesheetsByStatusAndPayPeriod"> > <wsdl:input message="tns:getTimesheetsByStatusAndPayPeriodRequest" > name="getTimesheetsByStatusAndPayPeriodRequestRequest"></wsdl:input> > <wsdl:output message="tns:getTimesheetsByStatusAndPayPeriodResponse" > name="getTimesheetsByStatusAndPayPeriodRequestResponse"></wsdl:output> > </wsdl:operation> > <wsdl:operation name="getCurrentPayPeriod"> > <wsdl:input message="tns:getCurrentPayPeriodRequest" > name="getCurrentPayPeriodRequestRequest"></wsdl:input> > <wsdl:output message="tns:getCurrentPayPeriodResponse" > name="getCurrentPayPeriodRequestResponse"></wsdl:output> > </wsdl:operation> > <wsdl:operation name="getPayPeriod"> > <wsdl:input message="tns:getPayPeriodRequest" > name="getPayPeriodRequestRequest"></wsdl:input> > <wsdl:output message="tns:getPayPeriodResponse" > name="getPayPeriodRequestResponse"></wsdl:output> > </wsdl:operation> > </wsdl:portType> > <wsdl:binding name="eTimesheetWrapperBinding" > type="tns:eTimesheetWrapperPort"> > <wsdl:documentation>Exposes the eTimesheet session EJBs</wsdl:documentation> > <soap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http"/> > <wsdl:operation name="getApprovedTimesheetsForPayPeriod"> > <soap:operation soapAction="getApprovedTimesheetsForPayPeriod" > style="document"/> > <wsdl:input name="getApprovedTimesheetsForPayPeriodRequestRequest"> > <soap:body use="literal"/> > </wsdl:input> > <wsdl:output name="getApprovedTimesheetsForPayPeriodRequestResponse"> > <soap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getTimesheet"> > <soap:operation soapAction="getTimesheet" style="document"/> > <wsdl:input name="getTimesheetRequestRequest"> > <soap:body use="literal"/> > </wsdl:input> > <wsdl:output name="getTimesheetRequestResponse"> > <soap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getTimesheetsByStatusAndPayPeriod"> > <soap:operation soapAction="getTimesheetsByStatusAndPayPeriod" > style="document"/> > <wsdl:input name="getTimesheetsByStatusAndPayPeriodRequestRequest"> > <soap:body use="literal"/> > </wsdl:input> > <wsdl:output name="getTimesheetsByStatusAndPayPeriodRequestResponse"> > <soap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getCurrentPayPeriod"> > <soap:operation soapAction="getCurrentPayPeriod" style="document"/> > <wsdl:input name="getCurrentPayPeriodRequestRequest"> > <soap:body use="literal"/> > </wsdl:input> > <wsdl:output name="getCurrentPayPeriodRequestResponse"> > <soap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getPayPeriod"> > <soap:operation soapAction="getPayPeriod" style="document"/> > <wsdl:input name="getPayPeriodRequestRequest"> > <soap:body use="literal"/> > </wsdl:input> > <wsdl:output name="getPayPeriodRequestResponse"> > <soap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > <wsdl:service name="eTimesheetWrapperService"> > <wsdl:port binding="tns:eTimesheetWrapperBinding" name="eTimesheetWrapper"> > <soap:address > location="http://localhost:8182/services/legacywrapper/etimesheet"/> > </wsdl:port> > </wsdl:service> > </wsdl:definitions> > > > Relevant XSD > > This XML file does not appear to have any style information associated with > it. The document tree is shown below. > <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> > <wsdl:types> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:ta="http://services.ambulance.qld.gov.au/data/services/corporate/hri/timeandattendance" > > xmlns:eTimesheetWrapper="http://services.ambulance.qld.gov.au/data/messaging/legacywrapper/etimesheet"xmlns:cmm="http://services.ambulance.qld.gov.au/data/messaging/common" > > xmlns="http://services.ambulance.qld.gov.au/data/messaging/legacywrapper/etimesheet" > > targetNamespace="http://services.ambulance.qld.gov.au/data/messaging/legacywrapper/etimesheet"> > <xs:import > namespace="http://services.ambulance.qld.gov.au/data/services/corporate/hri/timeandattendance" > > schemaLocation="http://localhost:8182/services/legacywrapper/etimesheet?xsd=../xsd/TimeAndAttendance.xsd"/> > <xs:import > namespace="http://services.ambulance.qld.gov.au/data/messaging/common" > schemaLocation="http://localhost:8182/services/legacywrapper/etimesheet?xsd=../xsd/Common.xsd"/> > <xs:complexType name="PayPeriodPayload"> > <xs:complexContent> > <xs:extension base="cmm:BusinessPayload"> > <xs:sequence> > <xs:element maxOccurs="1" minOccurs="0" name="payPeriodId" type="xs:int"/> > <xs:element maxOccurs="1" minOccurs="0" name="payPeriodDate" > type="xs:string"/> > </xs:sequence> > </xs:extension> > </xs:complexContent> > </xs:complexType> > <xs:complexType name="eTimesheetRequest"> > <xs:complexContent> > <xs:extension base="cmm:QASMessage"> > <xs:sequence> > <xs:element maxOccurs="1" minOccurs="1" name="timesheetId" type="xs:int"/> > </xs:sequence> > </xs:extension> > </xs:complexContent> > </xs:complexType> > <xs:complexType name="eTimesheetResponse"> > <xs:complexContent> > <xs:extension base="cmm:QASMessage"> > <xs:sequence/> > </xs:extension> > </xs:complexContent> > </xs:complexType> > <xs:complexType name="eTimesheetStatusPayPeriodRequest"> > <xs:complexContent> > <xs:extension base="cmm:QASMessage"> > <xs:sequence> > <xs:element maxOccurs="1" minOccurs="0" name="status" type="xs:string"/> > <xs:element maxOccurs="1" minOccurs="0" name="payPeriod" type="xs:int"/> > <xs:element maxOccurs="1" minOccurs="0" name="payPeriodDate" > type="xs:string"/> > </xs:sequence> > </xs:extension> > </xs:complexContent> > </xs:complexType> > <xs:complexType name="TimesheetPayload"> > <xs:complexContent> > <xs:extension base="cmm:BusinessPayload"> > <xs:sequence> > <xs:element maxOccurs="unbounded" minOccurs="0" ref="ta:Timesheet"/> > </xs:sequence> > </xs:extension> > </xs:complexContent> > </xs:complexType> > <xs:element name="eTimesheetRequest" > type="eTimesheetWrapper:eTimesheetRequest"/> > <xs:element name="eTimesheetResponse" > type="eTimesheetWrapper:eTimesheetResponse"/> > <xs:element name="eTimesheetStatusPayPeriodRequest" > type="eTimesheetWrapper:eTimesheetStatusPayPeriodRequest"/> > <xs:element name="TimesheetPayload" > type="eTimesheetWrapper:TimesheetPayload"/> > </xs:schema> > </wsdl:types> > </wsdl:definitions> > > > I've seen on a previous user thread here: > http://camel.465427.n5.nabble.com/Operations-are-unavailable-when-defining-for-a-CXF-endpoint-td2644645.html > that someone was having the same issue and could get the same config to work > outside and osgi container, ie. Servlet container. > > I need this to work in osgi. I've tried placing the xsd directly in the types > declaration of the wsdl, but no fix. Any ideas? > > > > This email, including any attachments sent with it, is confidential and for > the sole use of the intended recipient(s). This confidentiality is not waived > or lost, if you receive it and you are not the intended recipient(s), or if > it is transmitted/received in error. > > Any unauthorised use, alteration, disclosure, distribution or review of this > email is strictly prohibited. The information contained in this email, > including any attachment sent with it, may be subject to a statutory duty of > confidentiality if it relates to health service matters. > > If you are not the intended recipient(s), or if you have received this email > in error, you are asked to immediately notify the sender. You should also > delete this email, and any copies, from your computer system network and > destroy any hard copies produced. > > If not an intended recipient of this email, you must not copy, distribute or > take any action(s) that relies on it; any form of disclosure, modification, > distribution and/or publication of this email is also prohibited. > > Although the Queensland Ambulance Service takes all reasonable steps to > ensure this email does not contain malicious software, the Queensland > Ambulance Service does not accept responsibility for the consequences if any > person's computer inadvertently suffers any disruption to services, loss of > information, harm or is infected with a virus, other malicious computer > programme or code that may occur as a consequence of receiving this email. > > Unless stated otherwise, this email represents only the views of the sender > and not the views of the Queensland Government. > > ******************************************************************************** > > The content presented in this publication is distributed by the Queensland > Government as an information source only. The State of Queensland makes no > statements, representations or warranties about the accuracy, completeness or > reliability of any information contained in this publication. The State of > Queensland disclaims all responsibility and all liability (including without > limitation for liability in negligence) for all expenses, losses, damages and > costs you might incur as a result of the information being inaccurate or > incomplete in any way, and for any reason reliance was placed on such > information. -- Zoran Regvart