How to use Grails WebService Stub? - grails

I have a wsdl file with me and i generated stubs using IntelliJ idea which uses axis2 to generate Java classes from WSDL.
I am using Grails-Ws-Client plugin to use the wsdl file. The plugin works fine and i can run the temperature conversion program using www.w3schools.com/webservices/tempconvert.asmx?WSDL.
Now the Client says that he won't be able to directly expose his wsdl and i have to use stubs. He has replaced the location URL in wsdl with some dummy url ....
Can you please provide me some reference to understand this concept ? How can i call any method exposed by this webservice ?
Any help in this direction will be highly appreciated.
PS: Here is the location tag specified in wsdl file.
soap:address location="https://somePortal/portal.asmx"

Make the WSDL local. The stubs you crated can be pointed to the local WSDL instead the remote WSDL.

Related

Hyperledger Composer: Where is the Open API Specification generated by composer-rest-server stored?

I want to use the specification in to generate a Java client using swagger codegen in order to consume the REST API from a Java application. Where do I find the Open API spec after I start the composer-rest-server? I've tried looking it up but I can't figure out where that file is stored after it is generated.
By default, the docs are at your localhost:3000/explorer
This is generated automatically by the LoopBack framework.
You should carefully follow: https://hyperledger.github.io/composer/integrating/getting-started-rest-api.html

Force weblogic to exclude IncludeTimestamp from generated wsdl

I have an EJB that plays the role of my web service class too. I use Oracle Weblogic 12.1.2 as JavaEE container.
Here is the code of that class:
#Stateless
#WebService(serviceName="MyService")
#Policy(uri = "Wssp1.2-2007-Https-UsernameToken-Plain.xml", attachToWsdl=true)
#XmlAccessorType(XmlAccessType.FIELD)
public class MyWebServiceBean{
// some web methods ...
}
The attached policy and its corresponding wsse tags is properly can be seen in generated WSDL file. However, there is a IncludeTimestamp tag in the generated file that forces clients to send Timestamp in their request. As in my environment clients may have different times, I perefer not to force them to send the time! Then I simply omit the IncludeTimestamp Tag from the server wsdl and everything goes well after that! But I do not want to handle it by hand. Is there any setting in weblogic 12.1.2 to configure existence of mentioned tag?
After a lot reading and searching for this matter i found that we should create Custom Policy. Firstly we should find the xml file of the desired policy. Flow this post to do so. Then we should edit it and copy the edited version in our classpath and for #Policy annotation we should use new address of our xml file! That's it.

obtain WSDL from Oracle Service Bus for a proxy service

I need to find the WSDL of a proxy service that I have defined in the Oracle Service Bus.
Export WSDL option in the console gives me jar file which contains the .WSDL file but in a different format,
<WL5G3N0:definitions name="PollAddressFromDB-concrete" targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/DBPoll_Adapter/PollAddressFromDB/PollAddressFromDB" xmlns:WL5G3N0="http://schemas.xmlsoap.org/wsdl/" xmlns:WL5G3N1="http://xmlns.oracle.com/pcbpel/adapter/db/DBPoll_Adapter/PollAddressFromDB/PollAddressFromDB" xmlns:WL5G3N2="http://schemas.xmlsoap.org/wsdl/soap/">
I want to run a test on my web service using Soap UI but Sap UI would not accept this WSDL format.
How and Where can I retrieve the actual WSDL file.
Thanks!
As SiKing mentioned, if it's a http proxy, just go to the endpoint URL and append ?wsdl to the end. SoapUI can create a project from that.
Please refer to my following answer How to access the WSDL URL of a OSB proxy service in web browser
Reproducing it here:
There are three ways to access an effective WSDL:
In a Web browser, enter the URL for an HTTP-based proxy service,
appended with ?WSDL. This works only for HTTP-transport-based services for which Oracle Service Bus can generate effective WSDLs.)
In a Web browser, enter the fixed HTTP URL, for example:
[http://host:port/sbresource?PROXY/project_path/proxy_service_name]
or
[http://host:port/sbresource?BIZ/project_path/business_service_name]
This works for all services for which Oracle Service Bus can generate effective WSDLs.
Export the WSDL from the console

F# web service data provider with local wsdl file

I am trying to write F# client for our web services. The example here looks very good except it uses the server url in the code.
type TerraService = WsdlService<"http://msrmaps.com/TerraService2.asmx?WSDL">
This prevents me from reading service url from configuration file at run time, and make deployment from dev server to production server difficult.
I am wondering if there is any WSDL provider that works similar to Dbml Provider
I'm not sure I understand exactly what you're looking for, but note that the URL provided as a static parameter is used to generate types, but if desired a different URL can be provided at runtime by using a different overload of the Get...Soap method. This URL can come from wherever you want (e.g. you can read it from a config file if that's your scenario). E.g.:
type TerraService = WsdlService<"http://msrmaps.com/TerraService2.asmx?WSDL">
let terraClient = TerraService.GetTerraServiceSoap(EndpointAddress(myRuntimeUrl))
Nothing currently exists that does that but the code is open source so you could make a version of it that work's in the mode that you desire:1 2.

Can org.apache.cxf.service.factory.ReflectionServiceFactoryBean be configured to cache WSDLs?

I am using JBoss 7.1.1 but everytime my EAR makes a SOAP request, it takes about 2 minutes while JBoss creates each service required:
14:30:14,822 INFO [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (http--0.0.0.0-8081-3) Creating Service {http://services.discretewireless.com/v2009_1/}AuthenticationManagerV1Port from WSDL: http://services.discretewireless.com/v2009_1/AuthenticationManagerV1.wsdl
Instead of creating the services at runtime, once each time they are used, can I configure something somewhere so that it doesn't have to download the WSDLs and ...Creating Service...from WSDL:... each time one of my beans makes a SOAP request?
You can download the wsdl before running your client and make it available in two different ways: First, CXF's wsdl2java generator lets you fix the location of the wsdl (wsdlLocation) on your classpath, and the wsdl can even be archived in the same jar as your stubs. Or, second, you can instead pass an url (referencing the local file) to the service's constructor, where the url is something like 'file://path...'

Resources