I strictly followed chapter 2 of "Oracle SOA Suite 11g R1
Developer's Guide" from author "Antony Reynolds".
Basically the chapter guided me to this steps:
I created BPEL Process in JDevelop and I tested succesfully using JDevelop.
I created Proxy and Business Service in OSB and I tested succesfully using OSB Console.
Unfortunately I am trying to test from C# and from Java without success.
Basically I doing this steps to call from client application:
Java (Eclipse)
I used wsimport with WSDL collected from Oracle Service Bus to generate the class clients. I collected from Resource Browser>Proxy Services>Under Column called Actions, clicked Icon "Export WSDL".
C# (Visual Studio 2010 .Net4.5)
I try 3 diferent ways:
1) I used SVCUTIL with WSDL collected from OSB Console to generate the class clients.
2) I right-clicked my project, Add Service Reference, type the WSDL on Address box, clicked GO button and follow the wizard
3) I right-clicked my project, Add Service Reference, Add Web Reference, type the URL on Address box and follow the wizard
After one of these first step to have the reference, I coded
EchoProcessClient x = new EchoProcessClient();
But I couldn't set the string value or call the web method.
The code are:
ServiceReference_namespace.EchoProcessClient x = new ServiceReference_namespace.EchoProcessClient();
Console.WriteLine(x.process(... Here I was expecting typed a string, but I can't because C# is ordering to write a ServiceReference_namespace.process variable.
I am sure that I am losing a simple step or concept. I tried hard on the internet but I didn't find.
Some points I think that can be the origin of my mistakes are:
- Should I use a diferent WSDL instead of I copy from OSB Console? Maybe, other WSDL comming form OSB? If so, where can I find it?
- Should I created some thing else in the OSB beyond the Proxy to exposure the Proxy?
My WSDL from OSB is:
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:client="http://xmlns.oracle.com/SoaSuiteBook11gChapter2/EchoComposite/EchoProcess" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" name="EchoProcess" targetNamespace="http://xmlns.oracle.com/SoaSuiteBook11gChapter2/EchoComposite/EchoProcess">
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://xmlns.oracle.com/SoaSuiteBook11gChapter2/EchoComposite/EchoProcess" schemaLocation="xsd/EchoProcess.xsd"/>
</schema>
</wsdl:types>
<wsdl:message name="EchoProcessRequestMessage">
<wsdl:part name="payload" element="client:process"/>
</wsdl:message>
<wsdl:message name="EchoProcessResponseMessage">
<wsdl:part name="payload" element="client:processResponse"/>
</wsdl:message>
<wsdl:portType name="EchoProcess">
<wsdl:operation name="process">
<wsdl:input message="client:EchoProcessRequestMessage"/>
<wsdl:output message="client:EchoProcessResponseMessage"/>
</wsdl:operation>
</wsdl:portType>
<plnk:partnerLinkType name="EchoProcess">
<plnk:role name="EchoProcessProvider">
<plnk:portType name="client:EchoProcess"/>
</plnk:role>
</plnk:partnerLinkType>
</wsdl:definitions>
And my WSDL from JDevelop is:
<wsdl:definitions xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:client="http://xmlns.oracle.com/SoaSuiteBook11gChapter2/EchoComposite/EchoProcess" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="EchoProcess" targetNamespace="http://xmlns.oracle.com/SoaSuiteBook11gChapter2/EchoComposite/EchoProcess">
<wsdl:documentation>
<abstractWSDL>
http://SISTEMA026.br-lihi.libertyinternational.com:7001/soa-infra/services/default/EchoComposite!1.0/EchoProcess.wsdl
</abstractWSDL>
</wsdl:documentation>
<plnk:partnerLinkType name="EchoProcess">
<plnk:role name="EchoProcessProvider">
<plnk:portType name="client:EchoProcess"/>
</plnk:role>
</plnk:partnerLinkType>
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://xmlns.oracle.com/SoaSuiteBook11gChapter2/EchoComposite/EchoProcess" schemaLocation="http://sistema026.br-lihi.libertyinternational.com:7001/soa-infra/services/default/EchoComposite/echoprocess_client_ep?XSD=xsd/EchoProcess.xsd"/>
</schema>
</wsdl:types>
<wsdl:message name="EchoProcessRequestMessage">
<wsdl:part name="payload" element="client:process"/>
</wsdl:message>
<wsdl:message name="EchoProcessResponseMessage">
<wsdl:part name="payload" element="client:processResponse"/>
</wsdl:message>
<wsdl:portType name="EchoProcess">
<wsdl:operation name="process">
<wsdl:input message="client:EchoProcessRequestMessage"/>
<wsdl:output message="client:EchoProcessResponseMessage"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="EchoProcessBinding" type="client:EchoProcess">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="process">
<soap:operation style="document" soapAction="process"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="echoprocess_client_ep">
<wsdl:port name="EchoProcess_pt" binding="client:EchoProcessBinding">
<soap:address location="http://sistema026.br-lihi.libertyinternational.com:7001/soa-infra/services/default/EchoComposite/echoprocess_client_ep"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>