WSO2 ESB Proxy service Configuration Issue - wso2-esb

How to configure Proxy service (pass through proxy or WSDL Based Proxy) through Eclipse based ESB Developer tool.
Issues Iam facing
1) Actual endpoint operations are converted into mediate opertations
2) Header part is missing from from the soap-enevlope of proxy service which is actually present in the endpoint service.

Create a ESBConfigProject
Go to src -> main -> synapse-config -> endpoints
Right click on the endpoints folder and choose New -> Endpoint and select Create A New Endpoint radio button in the wizard and click Next
Provide Endpoint Name, Endpoint Type, Address and click Finish. The endpoint will be created in the directory endpoints
Go to src -> main -> synapse-config -> proxy-services
Right click on the proxy-services folder and choose New -> Proxy Service and select Create A New Proxy Service radio button in the wizard and click Next
Provide Proxy Service Name and Proxy Service Type. In the Advanced Configuration part, select Target Endpoint as Predefined Endpoint and select the endpoint in the dropdown list box
Click Finish and the proxy service service will be created.
Thanks

Related

WSO2 ESB: View (ssl) WSDL endpoint carbon console

The WSO2 Server is configured to be accessed via SSL. We have deployed several services on the ESB. When we use the Carbon Admin console the services are shown. The Carbon console is access over SSL. When clicking on the WSDL 1.1 or 2.0 the link is shown as http and not https.
Could this be a configuration mistake in carbon.xml or axis2.xml?
You can access https by giving the required port (8243 , assume not set the offset).
ex:
http://my.hotname:8280/services/TestMyService?wsdl
https://my.hostname:8243/services/TestMyService?wsdl
Also you can see sample service links including http/https on endpoint section, when you click the service name and see the right top corner.

WCF client unit test/integration test

I generated a proxy client to a SOAP web service. I would like to test the request envelop without actually calling the service at the other end (actual endpoint)
for now, i wrap my tests in try/catch block as It will timeout.
is they a way fake the endpoint as I'm only testing the request body?
Use New MockService option from within SoapUI. Here are detailed steps:
Create a new SoapUI project
As a Initial WSDL provide url of you local service (with ?wsdl added) or WSDL of external service
Right click generated endpoint and select Generate MockService option. Select appropriate path and port.
You can edit default response that will be used.

How to Change WCF Service endpoints?

i having more than Three web services,
In that one is master site,and Others are client sites.
In My User Interface One Text box is Available ,In that text box i need to give Destination End Point address
from that Text box Value i need call the Client Service.
for Example:
Client1 end point Service Name:
http://localhost:1524/WebServiceService.svc"
Client2 end point Service Name:
By
Rajagopalk
http://localhost:8085/WebServiceService.svc"
if i give "localhost:1524" in Text box Client1 Service will call,
if i give "localhost:8085" in Text box Client2 Service will call,
Are you hosting your WCF services in IIS ? In that case, your service address is determined by the IIS configuration and the virtual directory where your service's *.svc file exists.
So to change something on the server, you need to check and modify the IIS configuration.
To change on the client side, there's a web.config (for ASP.NET webs) or an (applicationName).exe.config where your endpoint definition should be contained - change the endpoint address there:
<client>
<endpoint name="YourEndpointName"
address="http://localhost:8085/WebServiceService.svc"
binding="......." bindingConfiguration="............."
contract="..................." />
</client>
You need to specify the complete target web service address in the address= attribute of your <endpoint> configuration element.
You can define multiple endpoints for the same service, and pick which one to use when you instantiate the client proxy:
MyServiceProxy client = new MyServiceProxy("name of endpoint configuration");
and with this, you can switch between several definitions of endpoints easily.
UPDATE: If you want to programmatically set your client address from code, you need to do the following when creating your client proxy:
// create custom endpoint address in code - based on input in the textbox
EndpointAddress epa = new EndpointAddress(new Uri(textbox.Text));
// instantiate your cilent proxy using that custom endpoint address
// instead of what is defined in the config file
MyServiceProxy client = new MyServiceProxy("name of endpoint configuration", epa);

WCF proxy: Do I need to create a new and different proxy for each binding?

Let's say that I have created a WCF proxy from a WCF service (which is configured with wsHttpBinding) using Add Service (in Visual Studio 2008).
Later I want to use basicHttpBinding so I'll go and change the WCF service to use basicHttpBinding. But what about the WCF proxy? Can I just change this via Web.config or do I need to create the WCF proxy again from the WCF service via Add Service?
Thanks
It depends :-)
If you already have all the bindings in place when you do the Add Service Reference the first time around, then your client side proxy configuration will include all the bindings, and you can basically switch from using one to the other without any reconfiguration or anything. Each client endpoint (which has one specific binding) should have a name, so you can pick and choose:
MyServiceClient client = new MyServiceClient("endpointname");
However, if you add the second binding to your service after you've added the service reference to your client side code, then yes - you need to upgrade your service reference. To do so, open the Service References node in your solution explorer in the client side project, right click on that service reference you're interested in, and choose Update Service Reference from the context menu.
This will pull down any new information about additional bindings and stuff from the server side and update your client side config accordingly.
Once that's done, you should have multiple client side endpoints in your config and you can create whichever one of those is appropriate for your current needs based on the client endpoint name.

How to create Endpoints from app.config file in WCF?

I have a service which has one endpoint , I have defined this endpoint in app.config file.
I want to know how can I create endpoints if I have app.config in program.
Please give me an idea.
Do you have a generated proxy for your service? If so, just use the proxy client!
MyServiceClient proxy = new MyServiceClient();
Optionally, you can pass in a name for the configuration to use:
MyServiceClient proxy = new MyServiceClient("MyConfigName");
No need to do anything fancy.
If you haven't created a proxy (using "Add Service Reference" in Visual Studio or svcutil.exe on the command line), you'll need to add a reference to your assembly containing the service and data contracts, and then use
ChannelFactory<IMyService> factory = new ChannelFactory<IMyService>();
IMyService proxy = factory.CreateChannel( );
Again, for creating the channel factory, you can pass in a name of a configuration section, if you have multiple, to specify which one to use.
Also, to clarify - a client can only ever have one endpoint at any given time. The service might have multiple - but the client needs to make up its mind and connect to exactly one of those - you cannot have multiple endpoints in a client (as the title of your questions appears to imply).
Marc
If you are using Visual Studio use the WCF Service Configuration Editor (found under tools). Use this to open your config file or hosted service and then you can create your endpoints there. Any new endpoint configuration info will be saved into your app.config/web.config as appropriate