In OSB can you change the proxy service or business service WSDL using a Customisation File? - osb

In OSB can you change the proxy service or business service WSDL using a Customisation File?
if so how?

I think I worked it out myself:
<cus:externalReferenceMap>
<xt:oldRef>
<xt:type>WSDL</xt:type>
<xt:path>ProjectName/wsdl/MyWsdlNameOld</xt:path>
</xt:oldRef>
<xt:newRef>
<xt:type>WSDL</xt:type>
<xt:path>ProjectName/wsdl/MyWsdlNameNew</xt:path>
</xt:newRef>
</cus:externalReferenceMap>

Related

How to configure Apache Camel's serviceCall to look for services in Eureka service discovery?

I am working on a project and I am forced to not using Spring Boot. I have a Eureka server running on localhost:8090 and some services already registered on it.
How can I force Apache Camel's serviceCall to look for services on the Eureka server?
I know that to make it work for Consul as the service discovery you should do something like following:
ConsulConfiguration config = new ConsulConfiguration();
config.setUrl("http://ip:port");
ConsulServiceDiscovery discovery = new ConsulServiceDiscovery(config);
// configure camel service call
ServiceCallConfigurationDefinition config = new ServiceCallConfigurationDefinition();
//config.setServiceDiscovery(servers);
// register configuration
camelContext.setServiceCallConfiguration(config);
How to make it work for Eureka server on localhost:8090??
there’s no direct support for eureka in camel so if you can’t use spring-boot, you need to build your own ServiceDiscovery implementation
As #Luca suggested and after some research I came to this conclusion that you should implement a custom service discovery to read from Eureka. In order to do that I did the following:
Extending my EurekaServiceDiscovery class from DefaultServiceDiscovery class of camel-core module
Overriding the method public List getServices(String name) of
DefaultServiceDiscovery class which is responsible to retrieve services from Eureka
Using Eureka REST API to get all the services in the overrided method. In order to do this you should convert the recieved JSON data from Eureka REST API to appropriate java classes. You need to define Application and InstanceInfo classes based on those JSON data.
For example after running Eureka on localhost:8090 and after registering a service named account-service on it, you can git information of account-service by sending a Http.GET request to localhost:8090/eureka/apps/account-service
For more info look at this Github repo: https://github.com/hamedmirzaei/service-gateway-bootless

OSB - Get endpoint from business services to log this endpoint

How can i get in a proxy flow the business service endpoint?. I want to log this endpoint in my log file.
I use OSB 11.1.1.7.
Thanks
Try with $outbound/ctx:transport/ctx:uri from proxy.
This can be achieved with use of "Message Tracing" functionality. Look under "Operational Settings" tab. Make sure to set the detail level to "Full".
Unfortunately there is no OOTB functionality to access service endpoint value inside OSB pipeline. Context variable $outbound/ctx:transport/ctx:uri mentioned before is only used to override default endpoint URI. ctx:uri is never initialized on the outbound variable. This information can be found in chapter "39.4.1.2 transport" of "Fusion Middleware Administrator's Guide for Oracle Service Bus"(https://docs.oracle.com/cd/E28280_01/admin.1111/e15867/context.htm#OSBAG326) .

How to access a remote web service by Camel CXF endpoint?

I was looking up online how to create a Camel's CXF producer (i.e. create a CXF endpoint that would produce a request to some local/remote web service). Generally, all the examples I could find would list the following steps:
First define the cxfEndpoint attributes:
<cxf:cxfEndpoint
id="orderEndpoint"
address="http://localhost:9000/order/"
serviceClass="camelinaction.order.OrderEndpoint"/>
Then send the request to that endpoint:
...to("cxf:bean:orderEndpoint");
Hmmm. I don't understand the concept. If this is a remote web service, all I usually have is the URL of the WSDL. I can get from it the address of the service... but I don't know what the serviceClass is and I don't have it on my classpath.
So how do I define that cxfEndpoint in case I only have the URL of the WSDL?
Or is there another type of endpoint I should use in that case?
I would suggest looking into WSDL first for cxf. Below are two links that I think should help you out quite a lot and has helped me in the past as well.
http://code.notsoclever.cc/camel-cxf-component-wsdl-first-example/
https://access.redhat.com/documentation/en-US/Fuse_ESB_Enterprise/7.0/html-single/Web_Services_and_Routing_with_Camel_CXF/index.html#ImplWs-WsdlFirst
On the Red Hat site you will need to start at chapter 3.
Hope this helps.

CXF Corba and Namingservice

I'm trying to build a service that also (beside of SOAP) uses CORBA/IIOP for communication. I followed the (CXF) CORBA Bank Demo and manged it to get it running. But despite of what is written in the README-File it needs no corba naming service.
What I need is, that the server registers it's service at a corba nameing service and the client looks up the server through the nameing service. Is there any way to achieve this goal ?
The bank demo uses a file to store the reference. The "corba/hello_world" sample uses a "corbaname" url in the wsdl to force the use of a naming service. Check that one or the "bank_ws_addressing" sample which also uses the corbaname urls.

Salesforce .Enterprise WSDL in .net integration (Generate .Net stub code from salesforce enterprise WSDL)

I created Enterprise WSDL from SFDC and saved it on local machine.
When I add a web reference in VS 2008 it just add a reference to wsdl it does not generate a stub code ( code class) I also tried by using 'Add Service Reference' and 'Add Service Reference'--> Advanced --> Add Web Reference.
Can you please comment on this, what I am missing and How I can generate a C# code from Enterprise WSDL.
Thanks.
Your question are not clear enought. After adding a web reference, u should be abe to call it just by typing the namespace/reference. Something like var service = new EnterpriseWSDL.SforceService(); If u are having trouble to add the web reference to the project, try to put the .wsdl on c:\inetpub\wwwroot besides the project folder.
please put your local wsdl service physical path
like as
Add Service Reference'--> Advanced --> Add Web Reference-->C:\ramki\test.wsdl

Resources