IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

CICS Web Services configuration question


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
SickPup404

New User


Joined: 04 Nov 2019
Posts: 22
Location: USA

PostPosted: Tue Nov 19, 2019 1:51 am
Reply with quote

A little more background for later when you have time:

- I have authority to make changes where needed in the Unix libraries.
- I can view just about all the CICS configurations needed in our development region.
- Our CICS support group can take a bit of time to make configuration changes.
- I am the one running the DFHLS2WS job and the pipeline scans.
- Two firewalls are in the mix: mainframe side and inter/intranet. Both are maintained by other groups. Mainframe side is quick responding, but inter/intranet side can take a week or more. (I think everything is good to go on the firewalls.)

So pretty much the only thing we rely on someone else doing on the mainframe is the initial setup of the service/pipe/port/etc.
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 180
Location: United States

PostPosted: Tue Nov 19, 2019 8:42 pm
Reply with quote

You are (or should be) attempting to get the web service functioning on your desktop. All that requires is SOAPUI installed on your desktop PC and a valid address into your mainframe. There should be little security to deal with at this point. OK. Lets start with some basics:

1. I would remove the 88 levels from your response copybook.
2. You need to define a CICS transaction in your LS2WS parms if you use DB2. (TRANSACTION=PREQ)
3. Just specify the transaction and web service name in the uri parm
(URI=PREQ/PostREQ) It makes things much easier to keep track of.
4. Run your LS2WS job and check the log. Report back.
Back to top
View user's profile Send private message
SickPup404

New User


Joined: 04 Nov 2019
Posts: 22
Location: USA

PostPosted: Mon Nov 25, 2019 9:32 pm
Reply with quote

OK,

Yes, this is from my desktop to the mainframe (connections verified to pass firewalls on both ends).

Did #1-4, and pipeline scan, then SoapUI. Results below. (DFHLS2WS completed successfully.)

(Sorry for the delay in responding. Other priorities and vacation time. I'm sure there will be more this week as well. Hope you have a great holiday!)

Thanks!
Steve

SoapUI error window when trying to connect:
Code:
WSDLException (at /SOAP-ENV:Envelope): faultCode=INVALID_WSDL: Expected element '{http://schemas.xmlsoap.org/wsdl/}definitions'.


SoapUI-errors:
Code:
2019-11-25 10:22:36,862 ERROR [errorlog] com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException
com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException
   at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlInterfaceDefinition.load(WsdlInterfaceDefinition.java:52)
   at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext.loadDefinition(WsdlContext.java:62)
   at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext.loadDefinition(WsdlContext.java:34)
   at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.cacheDefinition(AbstractDefinitionContext.java:245)
   at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext.access$400(AbstractDefinitionContext.java:47)
   at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:218)
   at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46)
   at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:131)
   at java.lang.Thread.run(Unknown Source)


Input to DFHLS2WS (PCT has PCHL0900 defined to PHRI.):
Code:
PGMNAME=PCHL0900                                               
TRANSACTION=PHRI
LANG=COBOL                                                     
PGMINT=CHANNEL                                                 
PDSLIB=//(removed).COPYLIB                             
REQMEM=PHCWWSI1                                                 
RESPMEM=PHCWWSO1                                               
LOGFILE=/(removed)/PostREQ.ls2ws.log     
MAPPING-LEVEL=4.0                                               
WSBIND=/(removed)/PostREQ.wsbind
WSDL=/(removed)/PostREQ.wsdl             
URI=PHRI/PostREQ


Outbound data area (inbound had no change):
Code:
01  WS-WEB-SERVICE-AREA-OUTBOUND.                         
    05  WS-OUTBOUND-DATA-PAYLOAD.                         
        10  WS-RETURN-MESSAGE            PIC X(07).       
        10  WS-ERROR-CODE                PIC X(04).       
        10  WS-ERROR-MESSAGE             PIC X(25).


Newly generated WSDL (passed the analyzer at Use [URL] BBCode for External Links even though the port binding at the end does NOT have a valid serverIP/port):
Code:
<?xml version="1.0" ?>                                                         
<!--This document was generated using 'DFHLS2WS' at mapping level '4.0'. -->   
<definitions targetNamespace="http://www.PCHL0900.PHCWWSI1.com" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:reqns="http://www.PCHL0900.PHCWWSI1.Request.com" xmlns:resns="http://www.PCHL0900.PHCWWSO1.Response.com" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.PCHL0900.PHCWWSI1.com">
   <types>                                                                     
      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://www.PCHL0900.PHCWWSI1.Request.com" xmlns:tns="http://www.PCHL0900.PHCWWSI1.Request.com">
         <xsd:annotation>                                                       
            <xsd:documentation source="http://www.ibm.com/software/htp/cics/annotations">This schema was generated by the CICS Web services assistant.</xsd:documentation>
         </xsd:annotation>                                                     
         <xsd:annotation>                                                       
            <xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">
com.ibm.cics.wsdl.properties.mappingLevel=4.0</xsd:appinfo>                     
         </xsd:annotation>                                                     
         <xsd:complexType abstract="false" block="#all" final="#all" mixed="false" name="ProgramInterface">
            <xsd:sequence>                                                     
               <xsd:element name="ws_web_service_area_inbound" nillable="false">
                  <xsd:complexType mixed="false">                               
                     <xsd:sequence>                                             
                        <xsd:element name="ws_inbound_data_payload" nillable="false">
                           <xsd:complexType mixed="false">                     
                              <xsd:sequence>                                   
                                 <xsd:element name="ws_doc_type" nillable="false">
                                    <xsd:simpleType>                           
                                       <xsd:annotation>                         
                                          <xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">
com.ibm.cics.wsdl.properties.charlength=fixed                                   
com.ibm.cics.wsdl.properties.synchronized=false                                 
com.ibm.cics.wsdl.properties.utf16be=false</xsd:appinfo>                       
                                       </xsd:annotation>                       
                                       <xsd:restriction base="xsd:string">     
                                          <xsd:maxLength value="3"/>           
                                          <xsd:whiteSpace value="collapse"/>   
                                       </xsd:restriction>                       
                                    </xsd:simpleType>                           
                                 </xsd:element>                                 
                                 <xsd:element name="ws_field_1" nillable="false">
                                    <xsd:simpleType>                           
                                       <xsd:annotation>                         
                                          <xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">
com.ibm.cics.wsdl.properties.charlength=fixed                                   
com.ibm.cics.wsdl.properties.synchronized=false                                 
com.ibm.cics.wsdl.properties.utf16be=false</xsd:appinfo>                       
                                       </xsd:annotation>                       
                                       <xsd:restriction base="xsd:string">     
                                          <xsd:maxLength value="50"/>           
                                          <xsd:whiteSpace value="collapse"/>   
                                       </xsd:restriction>                       
                                    </xsd:simpleType>                           
                                 </xsd:element>                                 
                                 <xsd:element name="ws_field_2" nillable="false">
                                    <xsd:simpleType>                           
                                       <xsd:annotation>                         
                                          <xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">
com.ibm.cics.wsdl.properties.charlength=fixed                                   
com.ibm.cics.wsdl.properties.synchronized=false                                 
com.ibm.cics.wsdl.properties.utf16be=false</xsd:appinfo>                       
                                       </xsd:annotation>                       
                                       <xsd:restriction base="xsd:string">     
                                          <xsd:maxLength value="50"/>           
                                          <xsd:whiteSpace value="collapse"/>   
                                       </xsd:restriction>                       
                                    </xsd:simpleType>                           
                                 </xsd:element>                                 
                              </xsd:sequence>                                   
                           </xsd:complexType>                                   
                        </xsd:element>                                         
                     </xsd:sequence>                                           
                  </xsd:complexType>                                           
               </xsd:element>                                                   
            </xsd:sequence>                                                     
         </xsd:complexType>                                                     
         <xsd:element name="PCHL0900Operation" nillable="false" type="tns:ProgramInterface"/>
      </xsd:schema>                                                             
      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://www.PCHL0900.PHCWWSO1.Response.com" xmlns:tns="http://www.PCHL0900.PHCWWSO1.Response.com">
         <xsd:annotation>                                                       
            <xsd:documentation source="http://www.ibm.com/software/htp/cics/annotations">This schema was generated by the CICS Web services assistant.</xsd:documentation>
         </xsd:annotation>                                                     
         <xsd:annotation>                                                       
            <xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">
com.ibm.cics.wsdl.properties.mappingLevel=4.0</xsd:appinfo>                     
         </xsd:annotation>                                                     
         <xsd:complexType abstract="false" block="#all" final="#all" mixed="false" name="ProgramInterface">
            <xsd:sequence>                                                     
               <xsd:element name="ws_web_service_area_outbound" nillable="false">
                  <xsd:complexType mixed="false">                               
                     <xsd:sequence>                                             
                        <xsd:element name="ws_outbound_data_payload" nillable="false">
                           <xsd:complexType mixed="false">                     
                              <xsd:sequence>                                   
                                 <xsd:element name="ws_return_message" nillable="false">
                                    <xsd:simpleType>                           
                                       <xsd:annotation>                         
                                          <xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">
com.ibm.cics.wsdl.properties.charlength=fixed                                   
com.ibm.cics.wsdl.properties.synchronized=false                                 
com.ibm.cics.wsdl.properties.utf16be=false</xsd:appinfo>                       
                                       </xsd:annotation>                       
                                       <xsd:restriction base="xsd:string">     
                                          <xsd:maxLength value="7"/>           
                                          <xsd:whiteSpace value="collapse"/>   
                                       </xsd:restriction>                       
                                    </xsd:simpleType>                           
                                 </xsd:element>                                 
                                 <xsd:element name="ws_error_code" nillable="false">
                                    <xsd:simpleType>                           
                                       <xsd:annotation>                         
                                          <xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">
com.ibm.cics.wsdl.properties.charlength=fixed                                   
com.ibm.cics.wsdl.properties.synchronized=false                                 
com.ibm.cics.wsdl.properties.utf16be=false</xsd:appinfo>                       
                                       </xsd:annotation>                       
                                       <xsd:restriction base="xsd:string">     
                                          <xsd:maxLength value="4"/>           
                                          <xsd:whiteSpace value="collapse"/>   
                                       </xsd:restriction>                       
                                    </xsd:simpleType>                           
                                 </xsd:element>                                 
                                 <xsd:element name="ws_error_message" nillable="false">
                                    <xsd:simpleType>                           
                                       <xsd:annotation>                         
                                          <xsd:appinfo source="http://www.ibm.com/software/htp/cics/annotations">
com.ibm.cics.wsdl.properties.charlength=fixed                                   
com.ibm.cics.wsdl.properties.synchronized=false                                 
com.ibm.cics.wsdl.properties.utf16be=false</xsd:appinfo>                       
                                       </xsd:annotation>                       
                                       <xsd:restriction base="xsd:string">     
                                          <xsd:maxLength value="25"/>           
                                          <xsd:whiteSpace value="collapse"/>   
                                       </xsd:restriction>                       
                                    </xsd:simpleType>                           
                                 </xsd:element>                                 
                              </xsd:sequence>                                   
                           </xsd:complexType>                                   
                        </xsd:element>                                         
                     </xsd:sequence>                                           
                  </xsd:complexType>                                           
               </xsd:element>                                                   
            </xsd:sequence>                                                     
         </xsd:complexType>                                                     
         <xsd:element name="PCHL0900OperationResponse" nillable="false" type="tns:ProgramInterface"/>
      </xsd:schema>                                                             
   </types>                                                                     
   <message name="PCHL0900OperationResponse">                                   
      <part element="resns:PCHL0900OperationResponse" name="ResponsePart"/>     
   </message>                                                                   
   <message name="PCHL0900OperationRequest">                                   
      <part element="reqns:PCHL0900Operation" name="RequestPart"/>             
   </message>                                                                   
   <portType name="PCHL0900Port">                                               
      <operation name="PCHL0900Operation">                                     
         <input message="tns:PCHL0900OperationRequest" name="PCHL0900OperationRequest"/>
         <output message="tns:PCHL0900OperationResponse" name="PCHL0900OperationResponse"/>
      </operation>                                                             
   </portType>                                                                 
   <binding name="PCHL0900HTTPSoapBinding" type="tns:PCHL0900Port">             
      <!-- This soap:binding indicates the use of SOAP 1.1 -->                 
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
      <operation name="PCHL0900Operation">                                     
         <soap:operation soapAction="" style="document"/>                       
         <input name="PCHL0900OperationRequest">                               
            <soap:body parts="RequestPart" use="literal"/>                     
         </input>                                                               
         <output name="PCHL0900OperationResponse">                             
            <soap:body parts="ResponsePart" use="literal"/>                     
         </output>                                                             
      </operation>                                                             
   </binding>                                                                   
   <service name="PCHL0900Service">                                             
      <port binding="tns:PCHL0900HTTPSoapBinding" name="PCHL0900Port">         
         <!-- This soap:address indicates the location of the Web service over HTTP.
              Please replace "my-server" with the TCPIP host name of your CICS region.
              Please replace "my-port" with the port number of your CICS TCPIPSERVICE. -->
         <soap:address location="http://my-server:my-port/PHRI/PostREQ"/>       
         <!-- This soap:address indicates the location of the Web service over HTTPS. -->
         <!-- <soap:address location="https://my-server:my-port/PHRI/PostREQ"/> -->
         <!-- This soap:address indicates the location of the Web service over WebSphere MQSeries.
              Please replace "my-queue" with the appropriate queue name. -->   
         <!-- <soap:address location="jms:/queue?destination=my-queue&amp;connectionFactory=()&amp;targetService=/PHRI/PostREQ&amp;initialContextFactory=com.ibm.mq.jms.Nojndi" /> -->
      </port>                                                                   
   </service>                                                                   
</definitions>
Back to top
View user's profile Send private message
SickPup404

New User


Joined: 04 Nov 2019
Posts: 22
Location: USA

PostPosted: Mon Nov 25, 2019 11:46 pm
Reply with quote

Some success finally!!!!

I was thinking back on what I had done before and remembered my post from Mon Nov 18, 2019 @ 2:05 pm.

I copied the newly generated WSDL from the WSDL unix folder to the BIND folder, then SoapUI successfully pulled the full WSDL!!!!

I even tried Chrome and it worked too!

As time permits, I might go back and change things back to see what breaks it (the 88's, the missing TRANSACTION in the LS2WS, or the URI parm, whatever).
Back to top
View user's profile Send private message
SickPup404

New User


Joined: 04 Nov 2019
Posts: 22
Location: USA

PostPosted: Tue Dec 10, 2019 1:09 am
Reply with quote

Good afternoon,

I was able to successfully GET the inbound SOAP document from the DFHWS-DATA container and return messages to the SoapUI test.

I've now made changes to the inbound & outbound copybooks (added fields and changed names).

Now when I test in SoapUI, I get:
Code:
DFHPI1007 12/09/2019 14:24:50 CICST5 PHRI 00159 XML to data transformation failed because of incorrect input (UNDEFINED_ELEMENT wsreq_area_inbound) for WEBSERVICE PostREQ.


However, if I manually change the names in the WSDL elements to the names that worked before, it works again.

Is there a step I'm missing when I change the copybooks/program? Steps I took:
- Changed copybooks
- Changed program
- Compiled
- Promoted changes to the development region
- Newcopy in CICS
- Ran DFHLS2WS
- Copied WSDL to the BIND folder
- Did a Pipeline SCAN
- Test with SoapUI

I even deleted the existing members in the BIND and WSDL folders prior to re-running the LS2WS job.

Must be something simple again... Should be my middle name!
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 180
Location: United States

PostPosted: Tue Dec 10, 2019 2:24 am
Reply with quote

Delete the old project from SOAPUI and create a new project with the changed wsdl.

Unless you bury a version ID in your wsdl (MyTestProviderV1, MyTestProviderV2, etc.) do not rely on discover to find the current version. You will also need to have your code support more than one version if the possibility exists that a client won't have the latest version of wsdl. One of the containers will give you the name being invoked.

Why are you putting wsdl in the bind folder?
Back to top
View user's profile Send private message
SickPup404

New User


Joined: 04 Nov 2019
Posts: 22
Location: USA

PostPosted: Tue Dec 10, 2019 6:30 pm
Reply with quote

Good morning John,

Thanks for the reply, I hadn't considered the client not having the correct WSDL version. I'll give that a shot.

I ran across this post while researching not being able to discover the WSDL last month (see my post from Nov 18, 2019 2:05 pm). After I copied the WSDL to the Bind folder, LS2WS succeeded in making two URIMs for the transaction (PHRI/PostREQ) as well as the WSDL (PHRI/PostREQ?wsdl).

Thanks again for all your assistance through this!
Steve
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 180
Location: United States

PostPosted: Tue Dec 10, 2019 11:02 pm
Reply with quote

That makes some sense.
Tell me, how are you getting the wsdl from the unix folder to your desktop to add it to SOAPUI?
Back to top
View user's profile Send private message
SickPup404

New User


Joined: 04 Nov 2019
Posts: 22
Location: USA

PostPosted: Tue Dec 10, 2019 11:21 pm
Reply with quote

Via discovery. I browse to the web service address in SoapUI:
http:1.2.3.4:5/PHRI/PostREQ?wsdl

and SoapUI populates the XML window. I can then fill in the document (SoapUI puts "?" in the fields) and then do the POST.
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 180
Location: United States

PostPosted: Wed Dec 11, 2019 12:25 am
Reply with quote

The resources I have available with this client require me to do a lot manually. It's more cumbersome, as I have to manually extract wsdl from unix folder and create a SOAP project. But, that would explain why there are some differences in what you are doing.
Back to top
View user's profile Send private message
SickPup404

New User


Joined: 04 Nov 2019
Posts: 22
Location: USA

PostPosted: Wed Dec 11, 2019 6:47 pm
Reply with quote

OK, after beating my head on the wall all day yesterday, I made no further changes to the copybooks so the WSDL was stable at the end of the day (and SoapUI was still failing with the DFHPI1007 message).

CICS bounce of the test region over night picked up the changes and everything is back in business. I think CICS must have been caching the old version. Looks like in our environment a bounce is needed (in addition to the Pipeline SCAN) to pick it up. Good to know.

Over the next few weeks I'll be building out the complexity (adding occurs, making some fields optional/required, etc.). I'll post back if I run into additional speed bumps.

I really appreciate everything you did to help John!
Steve
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 180
Location: United States

PostPosted: Thu Dec 12, 2019 1:45 am
Reply with quote

A pipeline scan and newcopy of the program, in addition to making sure the wsdl is being used by SOAPUI, is all that should be needed to invoke changes, assuming the web service was already functioning. Otherwise, you have issues that need to be addressed.

Arrays require special handling and nested containers. If you don't know how to do them, it can be endlessly frustrating. In addition, you need to cap the amount of data you can return to a web client. A decent mainframe can bury a server in a matter of seconds. I can provide some samples if needed.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts DFHLS2WS WSDL com.ibm.cics.wsdl.prope... CICS 0
No new posts How to get RBA value from CICS EVENT CICS 5
This topic is locked: you cannot edit posts or make replies. Sample CICS Webservices Program CICS 1
No new posts parmeter existence bit for URIMAP in ... CICS 1
No new posts How to use CICS command CEBR on sdsf ... CICS 1
Search our Forums:

Back to Top