Hi,

No, the correct flow is
external client ===> esb consumer endpoint===> esb provider endpoint ==> external service

You need take a look at the CxfBcProviderConsumerTest I mentioned, it's exactly same scenario as your requirement.

Freeman
On 2009-10-27, at 下午8:52, Kumako22 wrote:


Hi Freeman,

I'm now more strict about my problem.
-There is an exterlnal webservice and WSDL definiotion on server.

My problem is how to realize schema: client would like to connect to web
service but the connection goes through ESB

Is this something like this: Client connects to provider and provider
connects to consumer?

How should I do it?

Best regards,
MK


Freeman Fang wrote:

Hi,

My comment in line
On 2009-10-25, at 下午5:09, Kumako22 wrote:


Hello.

I'll be glad if someone could chceck my cxfbc:consumer and
cxfbc:provider
acording to my WSDL

Here is WSDL service.wsdl:

<wsdl:types>
                <xsd:schema
targetNamespace="http://servicemix.apache.org/examples/types
"
                            elementFormDefault="qualified">
                        <xsd:element name="SayHello">
                          <xsd:complexType>
                                        <xsd:sequence>
                                                <xsd:element name="name" 
type="xsd:string"/>
                                        </xsd:sequence>
                                </xsd:complexType>
                        </xsd:element>
                        <xsd:element name="SayHelloResponse">
                          <xsd:complexType>
                                        <xsd:sequence>
                                                <xsd:element name="name" 
type="xsd:string"/>
                                        </xsd:sequence>
                                </xsd:complexType>
                        </xsd:element>
                        <xsd:element name="UnknownWordFault">
                          <xsd:complexType>
                                        <xsd:sequence>
                                            <xsd:element name="word" 
type="xsd:string"/>
                                        </xsd:sequence>
                                </xsd:complexType>
                        </xsd:element>
                </xsd:schema>
</wsdl:types>

        <wsdl:message name="SayHelloRequest">
                <wsdl:part name="payload" element="typens:SayHello"/>
        </wsdl:message>
        <wsdl:message name="SayHelloResponse">
                <wsdl:part name="payload" element="typens:SayHelloResponse"/>
        </wsdl:message>
        <wsdl:message name="UnknownWordFault">
                <wsdl:part name="payload" element="typens:UnknownWordFault"/>
        </wsdl:message>

  <wsdl:portType name="Hello">
                <wsdl:operation name="SayHello">
                        <wsdl:input message="tns:SayHelloRequest"/>
                        <wsdl:output message="tns:SayHelloResponse"/>
                        <wsdl:fault name="UnknownWord" 
message="tns:UnknownWordFault"/>
                </wsdl:operation>
        </wsdl:portType>

<wsdl:binding name="HelloSOAPBinding" type="tns:Hello">
        <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"; />
                <wsdl:operation name="SayHello">
                        <wsdl:input>
                                <soap:body use="literal" />
                        </wsdl:input>
                        <wsdl:output>
                                <soap:body use="literal" />
                        </wsdl:output>
                        <wsdl:fault name="UnknownWord">
                                <soap:fault use="literal" name="UnknownWord" />
                        </wsdl:fault>
     </wsdl:operation>
</wsdl:binding>

<wsdl:service name="HelloService">
        <wsdl:port binding="tns:HelloSOAPBinding" name="soap">
         <soap:address location="http://localhost:8193/
HelloService/" />
     </wsdl:port>
</wsdl:service>
</wsdl:definitions>

And here xbean.xml:

<beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0";
     xmlns:hello="http://servicemix.apache.org/examples";>

  <cxfbc:consumer wsdl="classpath:service.wsdl"
                                        service="hello:HelloService"
                                        endpoint="soap"
                                        targetEndpoint="soap"
                  targetService="hello:HelloService"
                  targetInterface="hello:Hello"
                                        
locationURI="http://localhost:8000/HelloService/"; />
                                        
        <cxfbc:provider wsdl="classpath:service.wsdl"
                                        service="hello:HelloService"
                                        
locationURI="http://localhost:9001/bridgetest";
                                        endpoint="soap"
                                        interfaceName="hello:Hello" />
                                        
        

</beans>

service.wsdl is same in consumer and provider.

And my questions:

In consumer:
1. service refers to name in <wsdl:service name="HelloService">??
yes
2. endpoint refers to name in <wsdl:port
binding="tns:HelloSOAPBinding"
name="soap">??
yes
3. targetEndpoint also refers to name in  <wsdl:port
binding="tns:HelloSOAPBinding" name="soap">??
yes
4. targetService refers to name in <wsdl:service
name="HelloService">??
yes
5. targetInterface refers to name in <wsdl:portType name="Hello">??
yes
6. locationURI will override location in <soap:address
location="http://localhost:8193/HelloService/"; />??
yes
7. Are my tags in consumer correct acording to my wsdl??
it's ok for me

In provider:
1. service refers to targetService in consumer??
yes
2. What does locationURI ??
it will override the soap:address specified in your wsdl
3. endpoint refers to targetEndpoint in consumer??
yes
4. interfaceName refers to targetInterface in consumer??

yes
My xbean.xml is not working when I deploy service assembly.
what's exception you get?

What is correct tags definitions in my xbean.xml acording to my
service.wsdl??

Please help!

You may need take a look at [1] first and we have a test case[2]
exactly same as your scenario
[1]http://servicemix.apache.org/servicemix-cxf-bc.html
[2]https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcProviderConsumerTest.java

Freeman

MK

--
View this message in context:
http://www.nabble.com/CXF-consumer-and-provider-configuration-tp26046214p26046214.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.



--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com




--
View this message in context: 
http://www.nabble.com/CXF-consumer-and-provider-configuration-tp26046214p26077148.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.



--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com

Reply via email to