angeloNZ wrote:
Hi,

I'm trying to do this for now:

client -> http bc consumer -> http bc provider -> external web service

basically, this would just be a pass-through call from the client to the
external web service as a simple test.

I have my xbean.xml as such:

<beans xmlns:http="http://servicemix.apache.org/http/1.0";
       xmlns:tn="http://com.fujitsu.nz";
       xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance";
       xsi:schemaLocation="http://servicemix.apache.org/http/1.0
http://servicemix.apache.org/schema/servicemix-http-3.2.2.xsd
       http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";>
<http:endpoint service="tn:EchoService"
                 endpoint="soap"
role="consumer" targetService="tn:EchoService" targetEndpoint="echo" locationURI="http://localhost:8192/EchoService/"; soap="true"/> <http:endpoint service="tn:EchoService"
                 endpoint="echo"
role="provider" locationURI="http://localhost/MockWebService/services/EchoService"; wsdlResource="http://localhost/MockWebService/services/EchoService?wsdl"/>
</beans>

and here is the wsdl file that is being referenced by the provider endpoint:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://com.fujitsu.nz";
xmlns:apachesoap="http://xml.apache.org/xml-soap";
xmlns:impl="http://com.fujitsu.nz"; xmlns:intf="http://com.fujitsu.nz";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
 <wsdl:types>
  <schema elementFormDefault="qualified"
targetNamespace="http://com.fujitsu.nz";
xmlns="http://www.w3.org/2001/XMLSchema";>
   <element name="sayHello">
    <complexType/>
   </element>
   <element name="sayHelloResponse">
    <complexType>

     <sequence>
      <element name="sayHelloReturn" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
  </schema>
 </wsdl:types>

   <wsdl:message name="sayHelloRequest">

      <wsdl:part element="impl:sayHello" name="parameters">

      </wsdl:part>

   </wsdl:message>

   <wsdl:message name="sayHelloResponse">

      <wsdl:part element="impl:sayHelloResponse" name="parameters">

      </wsdl:part>

   </wsdl:message>

   <wsdl:portType name="EchoService">

      <wsdl:operation name="sayHello">

         <wsdl:input message="impl:sayHelloRequest" name="sayHelloRequest">

       </wsdl:input>

         <wsdl:output message="impl:sayHelloResponse"
name="sayHelloResponse">

       </wsdl:output>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="EchoServiceSoapBinding" type="impl:EchoService">

      <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="sayHello">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="sayHelloRequest">

            <wsdlsoap:body use="literal"/>

         </wsdl:input>

         <wsdl:output name="sayHelloResponse">

            <wsdlsoap:body use="literal"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="EchoServiceService">

      <wsdl:port binding="impl:EchoServiceSoapBinding" name="EchoService">

         <wsdlsoap:address
location="http://localhost/MockWebService/services/EchoService"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>


The problem I'm having is I couldn't get the WSDL to display whenever I
access http://localhost:8192/EchoService?wsdl.  All I'm getting is a 404
page saying it's unable to find the requested resource.  My SA has been
deployed OK since I can see EchoService when I go to http://localhost:8192.

Was there anything that I missed out doing?  Am I right to think that I
should be able to see the WSDL via http://localhost:8192/EchoService?wsdl ?
You should use http://localhost:8192/EchoService/main.wsdl for http bc consumer. http://localhost:8192/EchoService?wsdl is correct when you use cxf bc consumer

Also, later on I'll be putting a camel component in between the http BC's to
add routing logic:

client -> http bc consumer -> servicemix-camel -> http bc provider ->
external web service

Is my understanding correct that the camel component should be able to
"intercept" any request coming from the http consumer as long as I've got my
from("...") value correct?

Yes
Freeman
Thanks for future clarifications.

Reply via email to