connect to https Web service from CICS thru COBOL program - web-services

I am trying to connect to an HTTPS web service through a COBOL-written CICS module. Below is the screenshot. I am getting the error as:
INVOKE COMMAND IS NOT VALID AND IS NOT TRANSLATED.
I have moved the webservice name and URI endpoint below before invoking it. Please let me know how to connect properly?

It doesn't look like you've got the full INVOKE SERVICE command supplied. The full syntax (at CICS TS 5.5) is:
>>-INVOKE-SERVICE(data-value)--CHANNEL(data-value)-------------->
>--OPERATION(data-value)--+--------------------+---------------->
+-URI(data-value)----+
'-URIMAP(data-value)-'
>--+---------------------------------------------+-------------><
'-SCOPE(data-value)--+----------------------+-'
'-SCOPELEN(data-value)-'
You've supplied the service name with WEBSERVICE/SERVICE, and URI, but are lacking the CHANNEL to hold the data, and the OPERATION to be called on the target webservice's WSDL.

Related

HTTP Failure , An error occured during URL invocation. ORA-12535: TNS:operation timed out

There is a REST web service that I can successfully call from POSTMAN (just as a side note, I have to include a bearer token for it to work.)
I was doing research on how to call a rest web service from Oracle APEX, and found I can do that by creating a WEB SOURCE MODULE. This is the first screen where I add the URL of the endpoint
However when I click on NEXT, it takes a while before giving me this error:
Again, on POSTMAN I can successfully make the GET request, but I haven't figured out how to do it in Oracle APEX
Note that for Oracle APEX the database is actually doing the HTTP request. A "TNS Timeout" error typically indicates that the database cannot reach the internet.
Did you specify a proxy server for your application (Shared Components > Application Definition Attributes > Proxy Server)?

SOAP Webservice call from Java gives "Object reference not set to an instance of an object"

I have a requirement where I call a SOAP based web service from Java using Axis2 from eclipse. The web service code is in C#, with a BasicHttpBinding.
But when I call the method from the client stub I get this error.
org.apache.axis2.AxisFault: Object reference not set to an instance of an object.
Could anyone help me figure out this one? Is this on the service side or on the client side? Previously I got 'Internal Server error' and then they had to add something so that I can see this error in the logs.
The message is from the C# web service side ("Object reference not set to an instance of an object" is basically a Java equivalent of NullPointerException) but it might be because of something you send from your Java client or maybe you don't send.
The error usually means that you didn't send a required parameter and that the web service didn't do a proper job of validating it's input and missing parameter got to a point when caused the NullReferenceException.
But there is only one way to be sure, and that is to troubleshoot the call.
I suggest you use something like SoapUI to create a message and send that to the service. Once you get a succesfull call in SoapUI, make a call with the same parameters from your Java client and see what happens. When you do that, using a proxy for logging is very useful to see if the sent message is actually the expected one.

Connecting to SQL Server database via Web service

1.) I can create a simple application which has one routine called
function ConnectToDB: Boolean
and run it from my virtual directory (wwwroot/cgi-bin) and it connects and reports back connected .
2.) I can create a simple web service helloWorld
function helloWorld: String;stdcall;
I can create a client and call my web service call "helloWorld "and get my "HELLO WORLD" string reported back to me - everything works great.
3.) NOW, if i take my connection code from step one (1) and put it into a web service, i can not connect to the DB. It always reports back false.
Note: I am Using Delphi 7 to create my web service. I am using DBXpress as the conduit to the MS SQL Server DB, and the two INI files (dbxconnections.ini, dbxdrivers.ini) and two DLL's required for the connection reside in the same folder as the executables (wwwroot/cgi-bin).
Any help would ge greatly appreciated! Again, please be aware of steps 1 & 2, before responding.
Thanx!
How does the connection connect - does it use integrated windows authentication, or do use sql authentication - could it be that integrated auth doesn't work because iis is running as another user.
Also, when you connect, are you ensuring you disable the username/password prompt?

what is the use of creating proxy for an webservice

i have an webserivce written where i do an insertion opertion to DB.
path :http://localhost:1838/Ajax/WebService.asmx?wsdl.name of the webservice is localhost
i have added webservice for the project
now on button click event i try to call this webserice like this
localhost obj= new localhost();
obj.insert();
now i am able to do the insertion operation fine.
but i wanted to create an proxy for the webservice so wat is the use of it doing like tat?
when i run this command in my command prompt in vs
wsdl /out:myProxyClass.cs http://localhost:1838/Ajax/WebService.asmx?WSDL
i get an error
unable to connect the remote server.
no connection would be made because
the target machine actively refused
it
looking forward for an solution any help would great
thank you
It looks like you are using the built in develoment webserver (Cassini). Are you sure it was running when you issued the wsdl command ? The tool needs to connect to the service and download metadata, in order to generate your proxy.

BizTalk web-service call: unable to connect to remote server

I am trying to call a web service from a BizTalk (2006) orchestration.
Having got the hang of the basics, I have been following this tutorial (page 74 onwards) in which i have a web reference to an external web service (I am using this web service instead of the one in the tutorial), I have my web message in a Send component, and have set up the request / response ports for the web service call.
I'm fairly sure that eveything is set up correctly, but my orchestration fails to call the web service with the following error:
The adapter failed to transmit the message going to send port
"My_Order_Processor.Orchestration-CurrencyConvertPort-36c122f41c5596ae"
with URL "http://www.webservicex/net/CurrencyConvertor.asmx.
WebException: Unable to connect to the remote server.
SocketException: An existing connection was forcibly
closed by the remote host 209.162.186.60:80
The IP 209.162.186.60 is the address for the web service I am trying to connect to. I am trying to narrow down the reasons for the error, e.g.:
Firewall issues
Proxy server issues (I don't know how to configure BizTalk to use a proxy server)
Something else
The BizTalk server can ping the web service, I can access the internet (through IE), I can add the WebReference to the project successfully (meaning at least the orchestration designer can access the web service okay). I have also tried a different web service, with the same result.
Any ideas on finding out why this is happening or how to find out more info? (I'm new to BizTalk)
I've seen this veru vague error before for many different reasons. Two suggestions.
Download something like NetMon and watch what is going on on the wire.
Turn off chunked encoding. For some reason, many web services don't handle this well.
Let us know what you find out.
Could this not be an authentication issue? Check that you can connect to the webservice using the Bts credentials.
This turned out to be a proxy issue.
By navigating to Biz Talk Group -> Platform Settings -> Adapters -> SOAP, I was able to configure the BizTalk server host's SOAP adapter (which is what the web service call uses to make the call) to use our company proxy server correctly. Double click the 'send' SOAP adapter, go to Properties under adapter name.