This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

How to call OSB Proxy from Java and C#

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need examples for both situation: how invoke OSB Proxy from Java Client and how invoke from C# Client. I am looking for simple examples and advanced best practices as well.
 
Ranch Hand
Posts: 426
Eclipse IDE Fedora Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Deme Carva wrote:I need examples for both situation: how invoke OSB Proxy from Java Client and how invoke from C# Client. I am looking for simple examples and advanced best practices as well.



You write your Web Service client just as you would for any other application. You define your proxy thusly :

http://docs.oracle.com/cd/E21764_01/doc.1111/e15867/configuringandusingservices.htm#i1148910

36.5.1.4 Examples of Proxy Services Based on a Port and on a Binding

Example 36-12 shows fragments of port and binding definitions in a WSDL resource.

Example 36-12 WSDL resource

<portType name="StockQuotePortType">
...
</portType>
<binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
...
</binding>
<service name="StockQuoteService">
<port name="StockQuotePort" binding="tns:StockQuoteSoapBinding">
<soap:address location="http://example.com:9999/stockquote"/>
</port>
<port name="StockQuotePortUK" binding="tns:StockQuoteSoapBinding">
<soap:address location="http://example.uk:9999/stockquote"/>
</port>
</service>
36.5.1.4.1 Basing the Service on a Port
If you create a proxy service based on the StockQuotePort port in Example 36-12, the effective WSDL will look something like the fragment in Example 36-13.

Example 36-13 Effective WSDL for a Proxy Service Based on a Port

<binding name="StockQuoteSoapBinding" type="ns:StockQuotePortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
...
</binding>
<service name="StockQuoteService">
<port name="StockQuotePort" binding="ns:StockQuoteSoapBinding">
<soap:address location="http://host:port/project/proxyname"/>
</port>
</service>
Notice the following about the above example:

The service name, StockQuoteService, is the same in both the template and the effective WSDL.

The binding is the same in both the template and the effective WSDL. In this example, it specifies that the service will use the HTTP transport protocol for SOAP document style messages. (The binding also specifies the same binding operation in both the template and the effective WSDL, but that is not shown in this example.)

The second port defined in the WSDL resource, StockQuotePortUK, is not defined in the effective WSDL.

The transport address (URI) defined in the WSDL resource's port, http://example.com:9999/stockquote, is different from the address generated in the effective WSDL's port, http://host:port/project_path/proxy_service_name. The effective WSDL uses the address specified for the transport configuration in the Oracle Service Bus Administration Console or Eclipse with Oracle Service Bus plug-ins.

36.5.1.4.2 Basing the Service on a Binding
If you create a proxy service based on the StockQuoteBinding binding in Example 36-12, the effective WSDL will look something like the fragment in Example 36-14.

Example 36-14 Effective WSDL for a Proxy Service Based on a Binding

<binding name="StockQuoteSoapBinding" type="ns:StockQuotePortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
...
</binding>
<wsdl:service name="StockQuoteSoapBindingQSService"
<wsdl:port name="StockQuoteSoapBindingQSPort"
binding="ns:StockQuoteSoapBinding">
<soap:address location="http:/host:port/project/proxyname"/>
</wsdl:port>
</wsdl:service>
Notice the following about the above example:

The service and the port in the WSDL resource are different from the service and the port generated in the effective WSDL.

The service name in the WSDL resource and the effective WSDL are different: StockQuoteService in the template and StockQuoteSoapBindingQSService in the effective WSDL.

The binding is the same in both the WSDL resource and effective WSDL. In this example, it specifies that the service will use the HTTP transport protocol for SOAP document style messages.

The binding also specifies the same binding operation in both the template and the effective WSDL, but that is not shown in this example.

The transport address (URI) defined in the WSDL resource's port, http://example.com:9999/stockquote, is different from the address generated in the effective WSDL's port, http://host:port/project/stockquote.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic