SAG Web Methods - Soap Web Service - URL Alias - webmethods

We have SAG Webmethods implementation being used as an API Gateway in our project. We do not have much expertise in WebMethods. Based on a document received from the team which was maintaining this gateway implementation we are trying to build a custom gateway solution using open source software.
There is a soap web service which is being accessed by clients using /soap URL but based on looking at the web service implementation with WebMethods, we can see that the soap web service end point is of the pattern /ws/**.
Any idea where can we check to find how the mapping is happening from incoming url /soap to actual soap webservice end point /ws/**? We checked under "Settings > URL Aliases" of Web Methods Integration Server but there is no url alias set for this mapping.
Could you please help provide some pointers on where such a configuration could be set up for this redirection?
Regards,
Jacob

if i understood the issue the right way, this configuration is done as a part of webMethods code only. you need to open the wM packages in SoftwareAG Designer and in the Service Development perspective of Designer ,Connect to the Integration Server with those packages and have a look at the contents. You need to find something called WSD. if you right click and say property you will see the Element Type as :Web Service Descriptor.Open the WSD and on the right side you can see properties window which can have properties like WSDL URL /Source URI. this is where this /ws/ Config is done. Any requests hitting this URL will be handled by the associated WSD defined.
There is also an option to add an alias here in
admin Console--->Settings-->WebService--->Create provider /Web Service
endpoint Alias
.

Related

APIM ARM based customization of OpenApi 'front-end' with REST to SOAP deployment

I have a WCF backend service which is a SOAP/XML service and I need to expose it to my consumers.
Importing the WSDL is not a problem, but I don't like the naming/url of the operations which is based on the SoapAction in the WSDL.
Manually I can change the display name, URL and HTTP verb to make it more 'restful' on the outside, but is there a way to automate this?
I like to add this to my ARM template somehow.
You can't change how WSDL import works, but it's only a batch operation of sorts. If you generate ARM template after you imported WSDL you will be able to use it to recreate your API without source WSDL. And you will be able to change that template however you see fit.

Access-Control-Allow-Origin error when accessing Northwind OData service from SAPUI5?

I have created a sample SAPUI5 application in online editor
Check this link to view my code
I am getting this below error -
> XMLHttpRequest cannot load
> http://services.odata.org/V2/Northwind/Northwind.svc/Products?$format=json.
> No 'Access-Control-Allow-Origin' header is present on the requested
> resource.
Can someone help me in solving this issue - I understand that it is CORS issue which can be solved by disabling the security in chrome.
However - I don't to disable the security feature of chrome. So, is there any other way (probably by passing some headers) to solve this issue.
Appreciate your help in advance.
P.S.: I have already looked in these links -
http://scn.sap.com/community/developer-center/front-end/blog/2013/06/29/solving-same-origin-policy-issue-in-different-ways
http://scn.sap.com/community/gateway/blog/2014/09/23/solve-cors-with-gateway-and-chrome
add the northwind odata service as a destination under the DESTINATIONS tab of your hcp account. Then make an ajax call to the northwind services using relative path i.e. /destination/.....
Or make your own java application that works as proxy which allows source as and re-routes the payload to the correct destination.
basically destination is also a proxy supplied for out of the box usage by sap
If this is just for the purpose of testing, the following solution should be the easiest.
Use a proxy service which adds the needed headers, for example the following: https://github.com/Rob--W/cors-anywhere
Usage is really simple, just add the URL of the proxy service before your OData URL:
var uri = "https://cors-anywhere.herokuapp.com/https://services.odata.org/V2/Northwind/Northwind.svc/Products?$format=json";

call json web api nopcommerce

Hi I am new for nopcommerce 3.5. I need to write a restful web service api to third party(for eg mobile) access the service. I know that we can access through Nop.Plugin.Misc.WebServices . I had enable the service from administrator site.
But now is my question. How can i call the web service for eg GetPaymentMethod , product list and etc
And if I want to write my custom web service by using web api. what is step to create? I cant find any documentation about the web service. Please guide me some example
Thanks
If you want a really quick start in writing a web service in NopCommerce, you can follow the MVC architecture and:
Create an Action method inside a Controller that you find appropriate for your purpose. For example, if you want access to a product list, you might create an Action inside CatalogController that follows the logic of the existing ProductList action.
Set up a Route in RouteProvider.cs to point to the Action you created. Based on this route you can deduce the URL of your service.
Do the processing that you need inside the Action. If this Action/service is to be called with parameters (in query string format: param=value&param2=value2), you can just put these parameters in the Action's header:
public ActionResult QuickService(int param, string param2) { ... and .NET will take care of having them initialized.
Store results in an object (can also be an anonymous object) and at the end of your action, return it as Json: return Json(resultsObject); Again, ASP.NET takes care of the JSON serialization and automatically sets the Content-Type HTTP response header to "application/json".
You can consume the service calling the URL that corresponds to the route of your Action.
If you want users to be able to log in, by using the above method, it gets a little bit trickier. You need the webservice client to be able to accept and send cookies, as well as make appropriate services for Login, Logout, Register,...
However, in this case, you might be better off with a mobile version of the site.
Final note: If you don't want to alter base NopCommerce code, you can apply the steps above to a plugin. The majority of NopCommerce plugins follow the MVC architecture, so you can apply the steps above.

How to set ServerCredential in Backgrounduploader in WinJS app

I called attached code below in WinJS app and keep getting this error 405 Method Not Allowed. I have changed the method property to "POST" , still the same thing. Some of the guys saying it is to do with the permission so I am trying to set the credential in the uploader. This is an internal app so we assume this should carry the Windows Authentication. But at the moment, I could not find how. Can anybody help?
uploader.createUpload(endpoint, file)
.startAsync()
You haven't narrowed down the problem to the point where you should be worrying about how to express what you need with BackgroundTransfer APIs yet - you need to figure out what you need to express, first.
If you have access to good documentation or a knowledgeable owner of this internal service you're connecting to, your first step should be consulting that to figure out what exactly the HTTP request (and the associated credential headers) should look like.
If you don't have access to that, the second best starting point is to take an existing, working client of this service you're uploading to and use a networking capture software (Fiddler, for example) to take a look at what the request it's sending looks like.
Once you've figured out the specific HTTP method and server credentials you need to use, you can tell BackgroundTransfer to use them by setting the method and serverCredential properties of your uploader object before creating your uploads.

How to control access to HTML pages in Tomcat 5.5 using tokens

I have a Tomcat 5.5 server that hosts some HTML pages. I want to control the access to these pages. The incoming users' HTTP requests are supposed to have special authentication values.
What I need is to write a function that returns true/false based on the authentication value for each user request. Based on this true/false value, the user should be granted the access or not.
Any idea about how to do that?
Thanks
A pragmatic solution would be to create a ServletFilter and map it to all resources (/*). Reading your question, I guess your authentication method will not be based on sessions (JSESSIONID cookie), but on tokens part of the URL itself.
You have to write your own Authenticator in Tomcat.
Edit:
Subclass the AuthencatorBase class and implement the the abstract method authenticate
Place your jar in the lib folder of tomcat, not your webapp
specify in your web.xml which resources your want to protect.
Declare your authenticator in your context.xml => this technically a Valve
deploy your application and be happy!
With Tomcat, you'll need to use a Realm to protect your pages.
http://tomcat.apache.org/tomcat-4.1-doc/realm-howto.html