WebService call using WSDL2RPG.sh throwing EXCCODE 72

380 pts.
Tags:
AS/400
AS/400 WebServices
soapUI
WSDL
I have generated code for my WebService as explained in this link http://www.mcpressonline.com/rpg/cool-things-ile-rpg-as-a-web-services-client.html This is my program:
 /copy EntitlementWebService.rpgleinc                                     
 /copy EntitlementWebService_util.rpgleinc                                
d ws_ds           ds                  likeds(This_t) inz                  
                                                                          
d wsrequest...                                                            
d                 ds                  qualified                           
d isNil_request...                                                        
d                                1n                                       
d requestB                            likeds(entitlementWSRequestBody_t)  
d requestH                            likeds(serviceRequestHeader_t)      
                                                                          
d wsresponse...                                                           
d                 ds                  qualified                           
d isNil_response...                                                       
d                                1n                                       
d responseB                           likeds(entitlementWSResponseBody_t) 
d responseH                           likeds(serviceResponseHeader_t)     
                                                                          
d rtnInd          s              1n                                       

 /free                                                 
  wsrequest.requestB.custId.value   = 'VN11001358787'; 
  wsrequest.requestB.funcAccessCode.value = '123';     
  wsrequest.requestH.userId.value = 'USER001';         
  wsrequest.requestH.siteId.value = 'VN';              
  wsrequest.requestH.operationId.value = 'NA';         
  wsrequest.requestH.consumerId.value = 'NA';          
  wsrequest.requestH.consumerTS.value = 'NA';          
  //Create connection                                  
  stub_create_EntitlementWebService(ws_ds);            
  //Call the web service                               
  rtnInd = stub_op_queryUserEntitlementForAccessCode0( 
                                         ws_ds         
                                       : wsrequest     
                                       : wsresponse);  
  stub_destroy_EntitlementWebService(ws_ds);           
  *inlr = *on;                                         
  return;       
I get following error when I am running stub_op_
WS_DS.HANDLE = SPP:00008000470BE8E0                                       
WS_DS.EXCOCCURRED = '1'                                                   
WS_DS.EXCCODE = 72                                                        
WS_DS.EXCSTRING =                                                         
          ....5...10...15...20...25...30...35...40...45...50...55...60    
     1   'AxisSoapException: SOAP fault occurred: faultcode  : axis2n'   
    61   's1:Serverfaultstring: Internal Errorfaultactor :         '
Can anyone give fix for this? If I execute webservice wit same data using SoapUI tool, I get correct response. EntitlementWebService.rpgleinc  
      * ********************************************************************
      * This file was auto-generated by the WSDL2RPG Web Service
      * Generator.
      * 
      * This file contains Client Stub procedure prototypes for a
      * remote web service.
      * 
      * Timestamp: 06:35:49 PM 2016/11/01
      * ********************************************************************
 
      /copy EntitlementWebService_xsdtypes.rpgleinc
 
      * ********************************************************************
      * ********************************************************************
      * C O N S T A N T S
      * ********************************************************************
      * ********************************************************************
 
 
      * ********************************************************************
      * ********************************************************************
      * D A T A   T Y P E S  
      * ********************************************************************
      * ********************************************************************
 
      * **************************************************************
      * RPG type : queryUserEntitlementForAccessCode_t
      * **************************************************************
     D queryUserEntitlementForAccessCode_t...
     D                 DS                  qualified template
     D isNil_queryUserEntitlementForAccessCode_t...
     D                                1n
     D EntitlementWSRequest...
     D                                     likeds(entitlementWSRequest_t)
  
      * **************************************************************
      * RPG type : queryUserEntitlementForAccessCodeResponse_t
      * **************************************************************
     D queryUserEntitlementForAccessCodeResponse_t...
     D                 DS                  qualified template
     D isNil_queryUserEntitlementForAccessCodeResponse_t...
     D                                1n
     D EntitlementWSResponse...
     D                                     likeds(entitlementWSResponse_t)
  
      * **************************************************************
      * RPG type : serviceResponseHeader_t
      * **************************************************************
     D serviceResponseHeader_t...
     D                 DS                  qualified template
     D isNil_serviceResponseHeader_t...
     D                                1n
     D transactionId                       likeds(xsd_string)
     D userId                              likeds(xsd_string)
     D siteId                              likeds(xsd_string)
     D operationId                         likeds(xsd_string)
     D consumerId                          likeds(xsd_string)
     D consumerTS                          likeds(xsd_string)
     D primaryRC                           likeds(xsd_string)
     D secondaryRC                         likeds(xsd_string)
     D respMessage                         likeds(xsd_string)
  
      * **************************************************************
      * RPG type : entitlementWSRequest_t
      * **************************************************************
     D entitlementWSRequest_t...
     D                 DS                  qualified template
     D isNil_entitlementWSRequest_t...
     D                                1n
     D requestBody                         likeds(entitlementWSRequestBody_t)
     D requestHeader                       likeds(serviceRequestHeader_t)
  
      * **************************************************************
      * RPG type : serviceRequestHeader_t
      * **************************************************************
     D serviceRequestHeader_t...
     D                 DS                  qualified template
     D isNil_serviceRequestHeader_t...
     D                                1n
     D userId                              likeds(xsd_string)
     D siteId                              likeds(xsd_string)
     D operationId                         likeds(xsd_string)
     D consumerId                          likeds(xsd_string)
     D consumerTS                          likeds(xsd_string)
  
      * **************************************************************
      * RPG type : entitlementWSRequestBody_t
      * **************************************************************
     D entitlementWSRequestBody_t...
     D                 DS                  qualified template
     D isNil_entitlementWSRequestBody_t...
     D                                1n
     D custId                              likeds(xsd_string)
     D funcAccessCode                      likeds(xsd_string)
  
      * **************************************************************
      * RPG type : entitlementWSResponse_t
      * **************************************************************
     D entitlementWSResponse_t...
     D                 DS                  qualified template
     D isNil_entitlementWSResponse_t...
     D                                1n
     D responseBody                        likeds(entitlementWSResponseBody_t)
     D responseHeader                      likeds(serviceResponseHeader_t)
  
      * **************************************************************
      * RPG type : entitlementWSResponseBody_t
      * **************************************************************
     D entitlementWSResponseBody_t...
     D                 DS                  qualified template
     D isNil_entitlementWSResponseBody_t...
     D                                1n
     D privilegeCode                       likeds(xsd_string)
  
 
      * ********************************************************************
      * ********************************************************************
      * P R O T O T Y P E S 
      * ********************************************************************
      * ********************************************************************
 
 
      * ********************************************************************
      * WEB SERVICE CLIENT STUB PROTOTYPES
      * ********************************************************************
 
      * **************************************************************
      * RPG Call : stub_create_EntitlementWebService
      *  parm in : This_t this
      *  return  : *ON = connected
      *          : *OFF = connect failed
      * **************************************************************
     D stub_create_EntitlementWebService...
     D                 PR             1N   extproc('stub_create_EntitlementWe+
     D                                     bService_')
     D this                                likeds(This_t)
  
      * **************************************************************
      * RPG Call : stub_destroy_EntitlementWebService
      *  parm in : This_t this
      *  return  : *ON = destroyed
      *          : *OFF = destroy failed
      * **************************************************************
     D stub_destroy_EntitlementWebService...
     D                 PR             1N   extproc('stub_destroy_EntitlementW+
     D                                     ebService_')
     D this                                likeds(This_t)
 
      * ********************************************************************
      * WEB SERVICE OPERATION PROTOTYPES
      * ********************************************************************
 
  
      * **************************************************************
      * RPG call : stub_op_queryUserEntitlementForAccessCode0
      *  parm in : This_t this
      *  parm in : entitlementWSRequest Value0
      *  parm out: entitlementWSResponse out
      *  return  : *ON = success
      *          : *OFF = failure
      * **************************************************************
     D stub_op_queryUserEntitlementForAccessCode0...
     D                 PR             1N   extproc('stub_op_queryUserEntitlem+
     D                                     entForAccessCode0_')
     D this                                likeds(This_t)
     D Value0                              likeds(entitlementWSRequest_t)
     D out                                 likeds(entitlementWSResponse_t)
WSDL File
  <?xml version="1.0" encoding="UTF-8" ?> 
- <definitions name="entitlementService" targetNamespace="http://www.xxxx.com/carm/carmiws/websrvc/soap" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:tns="http://www.xxxx.com/carm/carmiws/websrvc/soap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
- <types>
- <xsd:schema>
  <xsd:import namespace="http://www.xxxx.com/carm/carmiws/websrvc/soap" schemaLocation="EntitlementService_schema1.xsd" /> 
  </xsd:schema>
  </types>
- <message name="queryUserEntitlementForAccessCodeResponse">
  <part name="parameters" element="tns:queryUserEntitlementForAccessCodeResponse" /> 
  </message>
- <message name="queryUserEntitlementForAccessCode">
  <part name="parameters" element="tns:queryUserEntitlementForAccessCode" /> 
  </message>
- <portType name="EntitlementWebService">
- <operation name="queryUserEntitlementForAccessCode">
  <input message="tns:queryUserEntitlementForAccessCode" wsam:Action="http://www.xxxx.com/carm/carmiws/websrvc/soap/EntitlementWebService/queryUserEntitlementForAccessCodeRequest" /> 
  <output message="tns:queryUserEntitlementForAccessCodeResponse" wsam:Action="http://www.xxxx.com/carm/carmiws/websrvc/soap/EntitlementWebService/queryUserEntitlementForAccessCodeResponse" /> 
  </operation>
  </portType>
- <binding name="entitlementPortBinding" type="tns:EntitlementWebService">
  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> 
- <operation name="queryUserEntitlementForAccessCode">
  <soap:operation soapAction="" /> 
- <input>
  <soap:body use="literal" /> 
  </input>
- <output>
  <soap:body use="literal" /> 
  </output>
  </operation>
  </binding>
- <service name="entitlementService">
- <port name="entitlementPort" binding="tns:entitlementPortBinding">
  <soap:address location="http://xxxxx.xx.xxxxx:30200/CarmIWS/entitlementService" /> 
  </port>
  </service>
  </definitions>
XSD File
  <?xml version="1.0" encoding="UTF-8" ?> 
- <!-- 
Generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, (build IBM 2.2.10-02/12/2016 11:10:24 PM foreman-) 
See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>

  --> 
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.xxxx.com/carm/carmiws/websrvc/soap" version="1.0" targetNamespace="http://www.xxxx.com/carm/carmiws/websrvc/soap">
  <xs:element name="entitlementReq" type="tns:entitlementWSRequest" /> 
  <xs:element name="entitlementReqBody" type="tns:entitlementWSRequestBody" /> 
  <xs:element name="entitlementResp" type="tns:entitlementWSResponse" /> 
  <xs:element name="entitlementRespBody" type="tns:entitlementWSResponseBody" /> 
  <xs:element name="queryUserEntitlementForAccessCode" type="tns:queryUserEntitlementForAccessCode" /> 
  <xs:element name="queryUserEntitlementForAccessCodeResponse" type="tns:queryUserEntitlementForAccessCodeResponse" /> 
  <xs:element name="reqHeader" type="tns:serviceRequestHeader" /> 
  <xs:element name="respHeader" type="tns:serviceResponseHeader" /> 
- <xs:complexType name="queryUserEntitlementForAccessCode">
- <xs:sequence>
  <xs:element name="EntitlementWSRequest" type="tns:entitlementWSRequest" minOccurs="0" /> 
  </xs:sequence>
  </xs:complexType>
- <xs:complexType name="entitlementWSRequest">
- <xs:sequence>
  <xs:element name="requestBody" type="tns:entitlementWSRequestBody" minOccurs="0" /> 
  <xs:element name="requestHeader" type="tns:serviceRequestHeader" minOccurs="0" /> 
  </xs:sequence>
  </xs:complexType>
- <xs:complexType name="entitlementWSRequestBody">
- <xs:sequence>
  <xs:element name="custId" type="xs:string" /> 
  <xs:element name="funcAccessCode" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>
- <xs:complexType name="serviceRequestHeader">
- <xs:sequence>
  <xs:element name="userId" type="xs:string" /> 
  <xs:element name="siteId" type="xs:string" /> 
  <xs:element name="operationId" type="xs:string" minOccurs="0" /> 
  <xs:element name="consumerId" type="xs:string" /> 
  <xs:element name="consumerTS" type="xs:string" minOccurs="0" /> 
  </xs:sequence>
  </xs:complexType>
- <xs:complexType name="queryUserEntitlementForAccessCodeResponse">
- <xs:sequence>
  <xs:element name="EntitlementWSResponse" type="tns:entitlementWSResponse" minOccurs="0" /> 
  </xs:sequence>
  </xs:complexType>
- <xs:complexType name="entitlementWSResponse">
- <xs:sequence>
  <xs:element name="responseBody" type="tns:entitlementWSResponseBody" minOccurs="0" /> 
  <xs:element name="responseHeader" type="tns:serviceResponseHeader" minOccurs="0" /> 
  </xs:sequence>
  </xs:complexType>
- <xs:complexType name="entitlementWSResponseBody">
- <xs:sequence>
  <xs:element name="privilegeCode" type="xs:string" minOccurs="0" /> 
  </xs:sequence>
  </xs:complexType>
- <xs:complexType name="serviceResponseHeader">
- <xs:sequence>
  <xs:element name="transactionId" type="xs:string" /> 
  <xs:element name="userId" type="xs:string" /> 
  <xs:element name="siteId" type="xs:string" /> 
  <xs:element name="operationId" type="xs:string" minOccurs="0" /> 
  <xs:element name="consumerId" type="xs:string" /> 
  <xs:element name="consumerTS" type="xs:string" minOccurs="0" /> 
  <xs:element name="primaryRC" type="xs:string" /> 
  <xs:element name="secondaryRC" type="xs:string" /> 
  <xs:element name="respMessage" type="xs:string" minOccurs="0" /> 
  </xs:sequence>
  </xs:complexType>
  </xs:schema>
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: