ibm liberty server. wlp-javaee8-20.0.0.6. How to register callback handler for ws-security - websphere-liberty

The section 3.b on Securing a web service by using a WS-Security policy requires placing the custom callback handler under the following path:
build.image/wlp/usr/extension/lib/SampleCbh.jar
build.image/wlp/usr/extension/lib/features/wsseccbh-1.0.mf
The following is the content of the wlp-javaee8-20.0.0.6\wlp\usr\ path.
.settings\
servers\
shared\
.project
There is no 'extension/lib' directory under that path.
Where the SampleCbh.jar and wsseccbh-1.0.mf files should be placed?

As the workaround I've registered the JAR under the wlp/lib/ and the MF under the wlp/lib/features/ paths.
I am not sure if it is the recommended way to register custom user features as they contains the vendor features.

Related

How do I include a custom inspec resource in multiple profiles?

I have written a custom chef inspec resource to work with a proprietary configuration format that the company I work for uses. I have put the resource in the .\myprofile\libraries folder as the documentation dictates that I should[1]. However, I want to use this resource in multiple profiles without copy/pasting the same resource or symlinking the resource (I'm developing on Windows). Is there a way I can define this resource in a single location and then reference it in multiple profiles?
[1] https://www.inspec.io/docs/reference/dsl_resource/
You can create a profile with your custom resource defined there. I would suggest some profile without any controls, or with minimum amount of controls, which all depend on your custom resource.
Then in the other profiles, where you need your custom resource you can reference your fist profile in inspec.yml:
depends:
- name: my_profile_with_custom_resource
path: ../relative/path
Inplace of path can be an url or a absolute path or git url (with branch and tags). By default all the controls and custom resources defined in my_profile_with_custom_resource will be available in the new profile.

MVC allow an IIS default page in subfolder without breaking parent route

I need to bypass an MVC route for an application where the developer left - we're going to fully replace it, but for now if I can bypass this one route, it'll save us a ton of time.
The route is (e.g.) www.this.site/path/subpath
Since it's on IIS, I can take advantage of the default document and create the following folder / file structure: /path/subpath/index.htm
However if I do this, I'll "break" the parent www.this.site/path route (it throws a 403 - Forbidden: Access is denied) because I now have an actual file folder where the /path/ route was.
Is there a way to get around this / have IIS defer to MVC on /path/ but still handle the child html file?
thanks. Again, this is not intended as a long term solution but a work-around until we can replace the app entirely.
Perhaps a better workaround would be to use the IIS AAR module and it's reverse proxy functionality out the app.
To do so:
a) stand up the app at it's own site the proper path -- so it should work at something like http://localhost:1234/path/subpath/index.htm
b) install IIS AAR module and enable the reverse proxy functions using the WebPI and the IIS management tools
c) Ignore the /path/subpath route in your app
d) Add a virtual directory for /path/subpath to IIS
e) Configure that to reverse back to localhost:1234 or whatever port you configured the site
This will keep the legacy app completely separate while keeping the public facing URLs looking correct for the rest of the world.

Magento API not working with wsdl.exe but works with Soap UI

I'm trying to integrate Magento 1.7 with a C# application.
When I tried to use the "Add Service Reference" function in Visual Studio, it finds the service and all the operations but when I click OK, it doesn't generate anything. i.e. the Reference.cs file is almost empty (only has one line with namespace).
I tried using wsdl.exe to generate the proxy in command prompt and I got the following error:
R2718: A wsdl:binding in a DESCRIPTION MUST have the same set of wsdl:operations as the wsdl:portType to which it refers.
- Operation 'catalogProductAttributeRemove' on portType 'Mage_Api_Model_Server_Wsi_HandlerPortType' from namespace 'urn:Magento' has no matching binding.
For more details on the WS-I Basic Profile v1.1, see the specification
at http://www.ws-i.org/Profiles/BasicProfile-1.1.html.
Error: Unable to import binding 'Mage_Api_Model_Server_Wsi_HandlerBinding' from namespace 'urn:Magento'.
- The operation 'catalogProductAttributeRemove' on portType 'Mage_Api_Model_Server_Wsi_HandlerPortType' from namespace 'urn:Magento' had the following syntax
error: The operation has no matching binding. Check if the operation, input and output names in the Binding section match with the corresponding names in the PortType section.
I then tried using Soap UI to load the same wsdl and it works fine. The proxy was generated and I can make calls without any problems.
The original wsdl file is here: https://gist.github.com/4514723
except I have replaced line 6297 with an example url.
So my questsion is why was Soap UI able to generate the proxies and making calls without any problems but Visual Studio can't? How can I fix it?
See Generate a Web Service Client in WS-I compliance mode .
You will need to modify your Magento code to correct the WS-I compliant WSDL definition in app\code\core\Mage\Catalog\etc\wsi.xml.
The SOAP UI is probably more tolerant of mistakes in WSDLs compared to other .NET/Java tooling.

FASM using custom resource files

How do I include my custom resource files and be able to access them with the windows api?
You can find some info about resources here.

How can I get started using a WSDL file with Visual Studio it's in the root of the project instead of being hosted on the internet somewhere

I've been tasked when integrating a web form into Oracle CRM on Demand (Siebel) using web services. I've been given the WSDL, and some high level documentation from Oracle.
Well, I knew I was in trouble when I tried to add the WSDL as Web Reference and I was asked to enter an URL. I have the WSDL file in the root of the project, but I have no idea how to link to it.
So, I guess that means I need to learn up on web services using C# and Visual Studio. I have a Safari Books Online account, so I can look up most anything.
It's been a while, but I'm OK at the form part. I just need help connecting and using the web service.
Edit #1: Ok, to clarify my question: I am well aware on how to use web services in general. My specific question is how take this WSDL file and do something with it. If the WSDL was hosted somewhere else, I could just add it as a Web Reference. But, I have the file in the project itself and that is what I am having problems with.
The web reference asks for a URL but you can point it to a local file. Just paste the local file path of your WSDL in and it should work.
Further Clarification of Web Reference URL vs URL to access Web Service
Web Reference URL is used to generate and update wrapper classes for WSDL/Web Service. It is not the URL used at runtime to access Web Service.
URL property on generated wrapper classes is used to access actual web service at runtime.
Update:
It should add a path in the web.config or app.config/settings file (Depending on your project type) similiar to the following:
<setting name="Namespace_WebReferenceName" serializeAs="String">
<value>XXX</value>
</setting>
Which should map to a URL property in the generated web reference wrapper classes. You can modify the URL property programmatically to point wherever you want:
Dim shipService As ShipService = New ShipService() 'Initialize the service - where ShipService is the Generated WebReference Wrapper CLass
shipService.Url = ConfigurationSettings.AppSettings("FedExOnlineURL")

Resources