camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramana <polaka...@gmail.com>
Subject Caused by: java.lang.IllegalStateException: ServiceConfiguration must provide a value!
Date Wed, 16 Apr 2014 06:50:03 GMT
I'm new to camel,,  when i call webservice through camel i'm getting this
exception
pls help me anyone ,i'm very thankful to help me....

Caused by: java.lang.IllegalStateException: ServiceConfiguration must
provide a value!
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getInterfaceName(ReflectionServiceFactoryBean.java:1941)
	at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:126)
	at
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:91)
	at
org.apache.camel.component.cxf.CxfEndpoint.createClient(CxfEndpoint.java:569)
	at org.apache.camel.component.cxf.CxfProducer.doStart(CxfProducer.java:76)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)
	at
org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:407)

my wsdl file     employeeInsert.wsdl

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="EmployeePortTypeImplService"
targetNamespace="http://employee.contract.example.org/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://employee.contract.example.org/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
  <wsdl:types>
    <xs:schema targetNamespace="http://employee.contract.example.org/"
version="1.0" xmlns:tns="http://employee.contract.example.org/"
xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:element name="addEmployee" type="tns:addEmployee"/>

  <xs:element name="addEmployeeResponse" type="tns:addEmployeeResponse"/>

  <xs:complexType name="addEmployee">
    <xs:sequence>
      <xs:element minOccurs="0" name="arg0" type="tns:EmployeeRecordType"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EmployeeRecordType">
    <xs:sequence>
      <xs:element minOccurs="0" name="EmployeeId" type="xs:int"/>
      <xs:element name="LastName" type="xs:string"/>
      <xs:element name="FirstName" type="xs:string"/>
      <xs:element name="Gender" type="tns:GenderType"/>
      <xs:element name="DepartmentId" type="xs:int"/>
      <xs:element name="Hiredate" type="xs:date"/>
      <xs:element minOccurs="0" name="Salary" type="xs:float"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="addEmployeeResponse">
    <xs:sequence>
      <xs:element minOccurs="0" name="return" type="tns:EmployeeIdType"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EmployeeIdType">
    <xs:sequence>
      <xs:element name="EmployeeId" type="xs:int"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="GenderType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="M"/>
      <xs:enumeration value="F"/>
    </xs:restriction>
  </xs:simpleType>

</xs:schema>
  </wsdl:types>
  <wsdl:message name="addEmployeeResponse">
    <wsdl:part name="parameters" element="tns:addEmployeeResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="addEmployee">
    <wsdl:part name="parameters" element="tns:addEmployee">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="EmployeePortType">
    <wsdl:operation name="addEmployee">
      <wsdl:input name="addEmployee" message="tns:addEmployee">
    </wsdl:input>
      <wsdl:output name="addEmployeeResponse"
message="tns:addEmployeeResponse">
    </wsdl:output>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="EmployeePortTypeImplServiceSoapBinding"
type="tns:EmployeePortType">
    <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="addEmployee">
      <soap:operation soapAction="" style="document"/>
      <wsdl:input name="addEmployee">
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="addEmployeeResponse">
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="EmployeePortTypeImplService">
    <wsdl:port name="EmployeePortTypeImplPort"
binding="tns:EmployeePortTypeImplServiceSoapBinding">
      <soap:address
location="http://sp11024:8095/EmloyeeDBService/services/EmployeePortTypeImplPort"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

mycamel config file  camel-context.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:camel="http://camel.apache.org/schema/spring"
       xmlns:cxf="http://camel.apache.org/schema/cxf"
       xsi:schemaLocation="
         http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
         http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
         http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd">
         <import resource="classpath:META-INF/cxf/cxf.xml"/>
        <import resource="classpath:META-INF/cxf/cxf-extension-xml.xml"/>
        <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
  <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
     <route id="employeeDBServiceCall">
        <from uri="file:src/data?noop=true"/>
        <log loggingLevel="INFO" message="&gt;&gt;&gt; ${body}"/>
        <to
uri="cxf://http://localhost:8095/EmloyeeDBService/services/EmployeePortTypeImplPort?wsdlURL=wsdl/employeeInsert.wsdl&amp;serviceName={http://employee.contract.example.org/}EmployeePortTypeImplService&amp;portName={http://http://employee.contract.example.org/}EmployeePortTypeImplPort&amp;dataFormat=MESSAGE"/>
        <log loggingLevel="INFO" message="&gt;&gt;&gt; ${body}"/>
    </route>
  </camelContext>
</beans>





--
View this message in context: http://camel.465427.n5.nabble.com/Caused-by-java-lang-IllegalStateException-ServiceConfiguration-must-provide-a-value-tp5750274.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message