Consume WSDL using SOAP client using dynamic proxy - web-services

I m trying to consume my web service using dynamic proxy where i get my interfaces at compile time and Services get fetched at the run time.
Documentation provides me wscompile command to generate the endpoint interfaces but this command don't exist in my system.
Need Help!!!!!

Well regarding:
Documentation provides me wscompile command to generate the endpoint interfaces but this command don't exist in my system.
Instead of wscompile, you could also use wsimport which is included in the Java JDK.
(if you ask about the difference: What is the difference between wscompile and wsimport?)

Related

Selling Partner API using command line interface or tool

We're new to Amazon Seller Partner-API. Need to invoke certain Amazon SP-APIs for an integration workflow. For some internal reasons, using Amazon SDKs is a secondary option. With our conventional approach, we're able to interact with most APIs, in this case the AWS Request signing & Signature generation is where we're stuck.
As per Amazon using SDK handles it all internally. Is it possible to use a command line utility like - AWS CLI to interact with SP-APIs? Not sure if this is feasible. Found this - amazon-sp-api but not sure if it is stable / reliable.
I believe there should be ways to interact with SP-API from command line. If not, atleast there should be a tool that is able to produce AWS Request signature (given the request info, key etc...).
Kindly share your experience and expertise. We're new to AWS, so if I'm confusing AWS with SP-API (esp for Request signing - I believe both use the same mechanism) pls point it out.
The link you shared to amz.tools does not look like a command line interface. It is just an SDK generated in NodeJS. There is not way to connect to the API via command line. You can use Postman if you want to avoid SDKs.
And yes, AWS is not the same thing as SP API.
You can search github for SDKs generated on other languages; some seem to have a lot of use.
We generated our own SDK in C# because others didn't fit out criteria.

How to best deploy SNMP in existing application?

I have an existing Windows desktop application written in C++ that needs to add support for SNMP so that a few pieces of status information are available on some SNMP OIDs. I found the net-snmp project and have been trying to understand how this can best fit into the existing program.
Questions:
Do I need to run snmpd, or can I just integrate the agent code into my application? I would prefer that starting my application does everything necessary rather than worry about deploying and running multiple processes, but the documentation doesn't speak much about doing this. The net-snmp agent daemon tutorial has an option for running the sample code as the full-agent rather than sub-agent, but I'm not sure about any limitations of doing this.
What would the PROs/CONs be for running a full agent in my application vs using snmpd and putting a subagent in my application? Is there a 3rd option I should also consider?
If I can integrate the full agent into the existing program, how do I pass it a configuration file via the API? Can I avoid the config file all together by passing these parameters in via function call instead?

How to use gcloud commands programmatically via - Java

Is there an option to use gcloud commands programmatically via - Java?
I see not all of the google provided libraries have all the functionalities that are present as part of gcloud command.
Ugh :-(
You're correct but there's a better solution.
Please see this explanation:
https://cloud.google.com/apis/docs/client-libraries-explained
I discourage you from shelling out to calling the gcloud commands from Java to solve your problem and from attempting to make the calls directly.
In summary:
All of Google's services are available for all of the supported languages using the older client libraries called the API Client Libraries. The API Client Libraries are machine-generated and mostly guaranteed to perfectly reflect the underlying services:
https://developers.google.com/api-client-library/
For Google Cloud Platform, a newer (better) set of client libraries is available but, these have required hand-coding. It's not a good excuse but, because of this, these libraries have lagged their underlying services. The lag includes some services not being available in some languages, some methods of some services not being available etc.
https://cloud.google.com/apis/docs/cloud-client-libraries
So, this creates a few challenges but...
If you require one set of libraries for everything, go API Client Libraries
Otherwise:
If the Cloud Client Library is available, use it.
If the Cloud Client Library is not available, use the API Client Library.
url :
cloud.google.com/compute/docs/containers/deploying-containers
I found below description
"You can only use this feature through the Google Cloud Platform Console or the gcloud command-line tool, not the API."
here its not possible using api but only possible use gcloud command line.
so using gcloud command from java is still issue.

WebService Task in Camunda

In Camunda BPM designer, I couldn't find activity and for invoking a REST or SOAP based webservices. Is it only possible to invoke through wiring code? How do I pass payload to the code if it needs to be written using java code.
Regards,
Phani
You can invoke a Webservice inside a bpmn.
You can create a Task of type Service, and choose in Properties/Details/Implementation: Connector.
Next you configure Connector properties, setting:
Connector Id: http-connector (for rest json webservices) and
Input Parameters:
url (e.g. http://localhost:8080/client?id=12
method GET/POST
headers type MAP: Accept application/json...
You receive the webservice response as Process Variables, configuring the Output parameters as follows :
response, type text, value ${response}
returnCode, type text, value ${statusCode}
Hope this helps you
For start: please note that camundas claim is "developer friendly". It's never been the goal of camunda components to just "click together" a working process. If you are looking for such a solution, you should a) have a look at the zero coding myth and b) maybe choose another tool.
That being said, check out the camunda-connect framework, introduced with 7.2, it should do what you need (though it involves xml coding).
For all but the most simple SOAP / REST calls, you'll need to go through java code. This takes a little getting used to when moving from other BPM platforms with extensive built-in webservice support. But trust me, java code is the way to go - import of transform / WSDL in the process definiton becomes such a holy mess.
I've written two CXF-based examples: soap-cxf-service and soap-cxf-server-start which will get you started.
I recommend creating a maven artifact per webservice and just adding the required services as standard maven dependencies for your process project.

Is it possible to run multiple versions of the same webservice?

[RUN DOWN]
I am required to call on a webservice with version information embedded in the webservice name.
EG. webserviceV1
When I generate a proxy class from the wsdl the webservice name is used to as the class name.
I am using the wsdl.exe tool.
I can foresee that a new version of the webservice would result in my code base having to support 2 sets of proxy classes. Or for the code that use the existing proxy classes to be renamed.
[MY QUESTION]
I would like to propose a solution to the provider that would allow them to provide multiple versions of the webservice as it is early on in the project.
I was advised that a possible solution would be to provide the webservice via different ports.
However having tried myself I don't know if that is even possible via IIS.
Is it possible to run multiple versions of a webservice at the same time on the same machine?
Sure it is possible. Instead of appending version numbers to webservice classes, place them in separate virtual directories:
http://host/services/1.0/service.asmx
http://host/services/1.3/service.asmx
http://host/services/2.0/service.asmx
You will then have to devise a versioning scheme (use branches properly; see this for some thoughts on that) to support all versions of service simultaneously.
As for the code, you can try abstracting differences between service versions behind a common interface (think AbstractService) and then use it as a base for version-specific implementations (ServiceV1_3).
Google gives pretty nice results for this exact topic.