Use custom Soap Header in cics web service(requester) - cobol

Can I add custom soap header in cics requester?
I have a soap web service A1 which running on mainframe(cics project), and it use a custom soap header like this:
<Header>
<username></username>
<password></password>
</Header>
Now I want to invoke this web service from a cobol program(requester) using exec cics invoke web service command.
How can I add this custom header to request?
Thanks in advance for any idea ))

Related

how to call a soap webservice made in delphi (on apache) from curl

In Delphi 11 Alexandria, I created a simple SOAP webservice using File->New->Soap Server. I asked to create the demo interfaces, I have built the project, corrected Apache conf, and I have copied the DLL inside Apache's module directory.
So, if I request:
http://127.0.0.1:81/xyz/mod_webbroker.dll
I get into the page where I see the interfaces, and I can view the WSDL.
Now, I would like to try to call the demo function (echoDouble) from PHP using curl.
How do I know what address I should use?
I tried:
http://127.0.0.1:81/xyz/wsdl/IMyService/echoDouble/
But it's not working.
Any help?
I understand my doubts now. I have always used "Datasnap rest application" but now I am trying "SOAP server application", that is why I cannot find the correct URL, because they work different. When using "Datasnap rest application" you need to go to a specific URL to get the function but SOAP works different, the base URL is always this (in my case):
http://127.0.0.1:81/xyz/wsdl/IMyService/
Sorry for that, I will switch back to "Datasnap rest application"

Can i change the targetnamapce in WSDL ( In client side)

I am generating the client side classes for invoking a
WebService. When i invoked the webservice it is not working and I came to know that the server side is not accepting the namespace in the soap body. ( if i didn't pass the namespace in soap body it is working) Is there a way i can override the targetnamespace in the client side WSDL.
Thanks
Sam
First and easy way is updating client side wsdl with proper ones. If you generate your client automatically on runtime it will fix your problem.
If you already generate java classes using that WSDL, and you are using that client to connect services, you can still re-create java classes and update your class path.
And if you do not want to regenerate java classes, you can update each jax-ws and jaxb annotation with new targetnamespace.

Best way to use Orbeon as a REST service

I have a set of XForms already running within eXist-db that are automatically generated by an XQuery. Is there any way form me to call a REST service, supplied by Orbeon, running on a separate tomcat server, that will convert the XForms files into HTML that I can display in a web browser?
In other words I would like to do something like:
xquery version "1.0";
...
let $my-xforms-file := local:my-generate-xforms($spec-file)
let $orbeon-rendered-xforms := httpclient:post('http://localhost/tomcat/orbeon/getpost', $my-xforms-file)
return $html-file
What I want is really just a render conversion service for XForms that gets an HTTP POST with the XForms in the document body and it returns something that I can render with a web browser.
Is there a component to do this already built into Orbeon? I am glad to document this, provide an XQuery module to support it and share with others.
There is a REST service for using the Orbeon forms runner, but it uses HTTP GET, not HTTP POST.
The service is offered as part of the forms runner "Sandbox" Here is a sample:
If you have Tomcat running on port 8081 (not the default) and eXist running on port 8080 then the following will work:
http://localhost:8081/orbeon/xforms-sandbox/run?url=http://localhost:8080/exist/apps/grants/orbeon-tests/01-min.xml
The sandbox also has a way to get the data from a file system
You can't get to form runner standbox from the menus. To get there you have to manually put the following URL into your browser:
http://localhost:8081/orbeon/xforms-sandbox/

ASP.net mvc - Consuming php web service

I am trying to consume a PHP web service from my ASP.net MVC 3 project, I add a service reference, build ok, but when using it error:
The content type text/xml; charset=ISO-8859-1 of the response message
does not match the content type of the binding (text/xml;
charset=utf-8). If using a custom encoder, be sure that the
IsContentTypeSupported method is implemented properly
It has to do something with the content type format binding I guess, How would I do it ?
Thanks
Solution -> Import the WebService as 'Add Web Reference' instead of 'Add Service Reference', VS does automatically the job.
I believe this question has already been answered, I believe the same concept applies to any type of web service: WCF Exception: Text Message Encoding and ISO-8859-1 Encoding

Create web service using external WSDL through Add Service Reference

I have an ASP.NET MVC3 project in .NET 4 which needs to act as a SOAP server to receive notifications from another website.
I have created web services before, but I don't know how to set up a way to receive these notifications where the WSDL is provided by the external website.
I know I can create a service and get that to produce its own WSDL, but I'm assuming there must be an easy way to add a service reference, and then create a service that uses the objects/methods generated by it.
How do I do this?
Thanks
You can use the svcutil tool from visual studio commands line, to create the required configuration and proxy files

Resources