Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Getting an error from EZASOKET while passing SOAP XML

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
vaibhav gs

New User


Joined: 05 Apr 2018
Posts: 14
Location: INDIA

PostPosted: Thu May 17, 2018 9:21 pm    Post subject: Getting an error from EZASOKET while passing SOAP XML
Reply with quote

I have written a COBOL code that can access a webservice from mainframes. The input that is sent from COBOL code is SOAP XML [through variables holding XML is bits and parts].

The data is being sent without any truncation and is being received without any issue with truncation. But I am always receiving a XML that states as below

"HTTP/1.1 400 Bad Request Content-Type: text/html; charset=us-ascii Server: Microsoft-HTTPAPI/2.0 Dat
e: Wed, 16 May 2018 *********** Connection: close Content-Length: 326 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
//EN""http://www.w3.org/TR/html4/strict.dtd"> <HTML><HEAD><TITLE>Bad Request</TITLE> <META HTTP-EQUIV="Content-Type" C
ontent="text/html; charset=us-ascii"></HEAD> <BODY><h2>Bad Request - Invalid Verb</h2> <hr><p>HTTP Error 400. The requ
est verb is invalid.</p> </BODY></HTML>"

I do understand that the server is not able to understand the XML request that I have sent. If my understanding is correct, then can you please let me know if there is anyway to get out of it.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8317
Location: Dubuque, Iowa, USA

PostPosted: Thu May 17, 2018 9:59 pm    Post subject: Reply to: Getting an error from EZASOKET while passing SOAP XML
Reply with quote

Quote:
can you please let me know if there is anyway to get out of it.
Yes - find and fix the invalid code. Start by displaying in your code EXACTLY what is being sent. Take that text, put it in a browser, and see what the server shows you when you manually try it. Validate that you don't have things in the text to cause issues (such as an ampersand). Talk to your network support group and verify you're not having a gateway timeout (which sometimes gets reported as an error 400). The message indicates an invalid verb -- are you attempting to do a GET or PUT?
Quote:
The data is being sent without any truncation and is being received without any issue with truncation.
There is no indication in the message of truncation, so why do you think this is an issue?
Back to top
View user's profile Send private message
vaibhav gs

New User


Joined: 05 Apr 2018
Posts: 14
Location: INDIA

PostPosted: Fri May 18, 2018 11:41 am    Post subject: Re: Reply to: Getting an error from EZASOKET while passing SOAP XML
Reply with quote

Robert Sample wrote:
Quote:
can you please let me know if there is anyway to get out of it.
Yes - find and fix the invalid code. Start by displaying in your code EXACTLY what is being sent. Take that text, put it in a browser, and see what the server shows you when you manually try it. Validate that you don't have things in the text to cause issues (such as an ampersand). Talk to your network support group and verify you're not having a gateway timeout (which sometimes gets reported as an error 400). The message indicates an invalid verb -- are you attempting to do a GET or PUT?
Quote:
The data is being sent without any truncation and is being received without any issue with truncation.
There is no indication in the message of truncation, so why do you think this is an issue?


Sure Robert. I have already tried displaying the message being sent from our end and what is received and then translated.

But no clue of what is going wrong. Will check on the same once again.
Back to top
View user's profile Send private message
vaibhav gs

New User


Joined: 05 Apr 2018
Posts: 14
Location: INDIA

PostPosted: Fri May 18, 2018 11:53 am    Post subject: Re: Reply to: Getting an error from EZASOKET while passing SOAP XML
Reply with quote

Robert Sample wrote:
The message indicates an invalid verb -- are you attempting to do a GET or PUT?


I am trying to POST and then listen the socket for response.
Do we need to use GET or PUT keyword in the SOAP XML that we send via EZASOKET?
Can you please help me understand.
Back to top
View user's profile Send private message
vaibhav gs

New User


Joined: 05 Apr 2018
Posts: 14
Location: INDIA

PostPosted: Fri May 18, 2018 12:05 pm    Post subject: Need help to understand accessing the URL
Reply with quote

I wonder that my REXX is able to hit the web service and get the right output using the same SOAP envelope that i have used in the COBOL program, but COBOL program is not able to fetch the output from webservice.

Only difference that i can find from my REXX and COBOL is that, in REXX and COBOL i am trying to use the IP address to connect to the server but later while posting the SOAP evvelope, in my REXX i am POSTing it to the exact path as in URL but in COBOL EZASOKET I could not find option on how to do the same.

Let me explain with an example as in what i meant above,

https://xyxz.globally.com/dummy.otg.garage.web.services/myservice.asmx is the complete webservice URL.

I tried to connect to the IP address of this webservice in both REXX and COBOL.
But in REXX while writing the socket with SOAP ENVELOPE, i am using POST /dummy.otg.garage.web.services/myservice.asmx
But in COBOL after getting the connection established with the socket, i am trying to write the SOAP envelope with the same content but it s not giving the response.
What I suspect from this is, since in COBOL i am not able to point out to the exact service that i am looking for, instead i am passing my query to https://xyxz.globally.com [IP address of this URL] and it is not able to understand my query?

Is my suspection correct?
Underlying point is that IP address will not change based on the path but remains same for a base DNS.

If yes then how can i point to the complete URL to access the service. So is this something that i need to worry about.

PS: If i had poured in my thoughts and confused you, then please feel free to raise it so i can clarify to seek your support.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2 Sql Error code -204 rohit_naidu DB2 5 Fri May 18, 2018 4:40 pm
No new posts Trap the jcl error message or maxcc i... ankita agarwal CLIST & REXX 4 Fri May 18, 2018 2:08 pm
No new posts Error executing Java program in OSGI ... danik56 CICS 0 Thu Apr 26, 2018 12:16 am
No new posts 3270 Data stream error Benchwarmer CICS 6 Tue Apr 17, 2018 12:06 am
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us