Hi,

error "Could not find service '{http://example.org/ soapLogger}SoapLoggerService' in wsdl". generally means that the service name specified for your endpoint mismatch it in your wsdl.

In your wsdl, you have
<wsdl:service name="soapLogger:SoapLoggerService">
this is incorrect, it should be
<wsdl:service name="SoapLoggerService">
You need only specify local part of your service here, though it's a QName, the namespace prefix could be added automatically.

Some quick notes
1. If you want to handle soap request, cxf bc consumer endpoint is a better choice here, it's for better soap support. 2. If you start a totally new project, you should use SMX4 and use camel but not JBI component, it's more powerful now.

Freeman


On 2011-9-12, at 下午6:22, Stefan Essl wrote:

Hi there!

I'm quite new to ServiceMix and am currently experiencing problems with my first steps. I'm trying to build a simple service that takes SOAP requests and writes them into a file on disk. I've named it SoapLogger.

I've got a http-soap-consumer service unit along with a wsdl file. Any time I'm trying to deploy this service assembly, I get an error "Could not find service '{http://example.org/ soapLogger}SoapLoggerService' in wsdl".

This is my xbean.xml of http-soap-consumer:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0";
   xmlns:soapLogger="http://example.org/soapLogger";>

<http:soap-consumer service="soapLogger:SoapLoggerService" endpoint="soap"
       targetService="soapLogger:fileSender"
            targetEndpoint="soapLogger:fileSender"
       wsdl="classpath:service.wsdl"
       locationURI="http://0.0.0.0:8192/soapLogger/"; />
</beans>

And this is my service.wsdl residing in the same directory as the xbean.xml:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="wsdl-first"
   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
   xmlns:xsd="http://www.w3.org/2001/XMLSchema";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xmlns:tns="http://example.org/soapLogger";
   xmlns:typens="http://example.org/soapLogger/types";
   xmlns:soapLogger="http://example.org/soapLogger";
   targetNamespace="http://example.org/soapLogger";>

   <wsdl:types>
<xsd:schema targetNamespace="http://example.org/soapLogger/types "
                   elementFormDefault="qualified">
           <xsd:element name="LogSoap">
             <xsd:complexType>
                   <xsd:sequence>
<xsd:element name="requestContent" type="xsd:string"/>
                   </xsd:sequence>
               </xsd:complexType>
           </xsd:element>
       </xsd:schema>
 </wsdl:types>

   <wsdl:message name="LogSoapRequest">
       <wsdl:part name="payload" element="typens:LogSoap"/>
   </wsdl:message>

   <wsdl:portType name="Soap">
       <wsdl:operation name="LogSoap">
           <wsdl:input message="tns:LogSoapRequest"/>
       </wsdl:operation>
   </wsdl:portType>

   <wsdl:binding name="SoapLoggerBinding" type="tns:Soap">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http " />
       <wsdl:operation name="LogSoap">
           <wsdl:input>
               <soap:body use="literal" />
           </wsdl:input>
      </wsdl:operation>
  </wsdl:binding>

   <wsdl:service name="soapLogger:SoapLoggerService">
       <wsdl:port binding="tns:SoapLoggerBinding" name="soap">
          <soap:address location="http://0.0.0.0:8092/soapLogger/"; />
      </wsdl:port>
  </wsdl:service>

</wsdl:definitions>

Could you please help me in finding my error and correcting it?

Thanks,
Stefan

---------------------------------------------
Freeman Fang

FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com









Reply via email to