Click here to Skip to main content
15,891,473 members

How to call OSB Proxy from Java and C#

DemeCarv asked:

Open original thread
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>
Tags: Proxy

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900