Troubleshooting Creating Web Service job
I am new to both wsdl and web service job type and would appreciate some guidance.
I have installed webservice.pak and I am using WA AE 11.3.5.
I currently have a CMD job that executes the following
command on an AIX server:
/client.sh “HOSTMarkerJob”
On the agent side the client.sh sets up the PATH and then
executes java –jar client.jar “$@”. We do not have the source code for the client.jar file and was given limited WSDL information. So I need to set up a WSDL
job.
I have tested a job_type WBSVC using the sample CA provided,
stock quote and it executed successfully so using the defaults in the
agentparm.txt, at least the stock quote WBSCV job type ran without error and I
got back the day’s stock quote for ‘CA’.
Question 1. What is
the difference between WSDOC and WBSVC and how do I know which one to use based
on the below WSDL information?
Here is the WSDL information:
<wsdl:definitions name="HOSTJobPortImplService" targetNamespace="http://endpoint.HOSTjobws.a.igen.com/" xmlns:ns1="http://igen.com/a/HOSTjobws"
mlns:ns2="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://endpoint.HOSTjobws.a.igen.com/"
mlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:import location="http://ENVNAME/a-admin/services/HOSTJobService?wsdl=HOSTJobPort.wsdl" namespace="http://igen.com/a/HOSTjobws"/>
<wsdl:binding name="HOSTJobPortImplServiceSoapBinding" type="ns1:HOSTJobPort">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="startJobGroup">
<soap:operation soapAction="http://igen.com/a/startJobGroup" style="document"/>
<wsdl:input name="startJobGroup">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="startJobGroupResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getJobGroupStatus">
<soap:operation soapAction="http://igen.com/a/getJobGroupStatus" style="document"/>
<wsdl:input name="getJobGroupStatus">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getJobGroupStatusResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="HOSTJobPortImplService">
<wsdl:port binding="tns:HOSTJobPortImplServiceSoapBinding" name="HOSTJobPortImplPort">
<soap:address location="http://igen.tent.trt.csaa.pri/a-admin/services/HOSTJobService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
There are to different request, one to start a job and the
other to get a status. From what I
understand, the start job request does not wait for a reply and the get status
would get the status of the job that was started.
Here is the WSDL for the starting of a batch job:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bat="http://igen.com/a/HOSTjobws">
<soapenv:Header/>
<soapenv:Body>
<bat:JobGroupStartRequest>
<bat:jobGroupName>groupaHOSTMarkerJob</bat:jobGroupName>
<bat:requestID>?</bat:requestID>
</bat:JobGroupStartRequest>
</soapenv:Body>
</soapenv:Envelope>
Here is the WSDL for requesting job status:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bat="http://igen.com/a/HOSTjobws">
<soapenv:Header/>
<soapenv:Body>
<bat:JobGroupStatusRequest>
<bat:jobGroupName>groupaHOSTMarkerJob</bat:jobGroupName>
</bat:JobGroupStatusRequest>
</soapenv:Body>
</soapenv:Envelope>
If I run using job_type WSDOC, I keep getting several
different error: Error submitting request.
The Agent log indicates variable name is invalid. I am not able to find anywhere what variable
name is invalid. I believe the issue is
with the ws_parameter which is: ws_parameter:
param_name="JobGroupStatusRequest",param_value="groupaHOSTMarkerJob"
Here is the information from the plugin_log_webservice.log
06/23/2015 11:39:23.993 MST-0700 1 WebservicePlugin.webservice Internal Thread.CybWOBWebserviceRundoclitHandler.processWob[:990] -
java.lang.IllegalArgumentException: Variable name is invalid
at cybermation.commonservice.webservice.schema.data.CybStringsArrayDataFeederParseEntry.<init>(CybStringsArrayDataFeederParseEntry.java:86)
at cybermation.commonservice.webservice.schema.data.CybStringsArrayDataFeeder.read(CybStringsArrayDataFeeder.java:127)
at cybermation.plugins.webservice.handler.CybWSDocLitHandler.prepare(CybWSDocLitHandler.java:273)
at cybermation.plugins.webservice.wobhandler.CybWOBWebserviceRundoclitHandler.processWob(CybWOBWebserviceRundoclitHandler.java:976)
at cybermation.plugins.library.base.CybRMIExternalPluginBaseManager.processWob(CybRMIExternalPluginBaseManager.java:605)
at cybermation.plugins.library.base.CybRMIExternalPluginBaseManager.run(CybRMIExternalPluginBaseManager.java:438)
at java.lang.Thread.run(Unknown Source)
If I remove the entire web_parameter, it appears to go to
the WSDL URL and returns an error.
06/17/2015 20:28:23.167 GMT-07:00-0700 1WebservicePlugin.WS DocLit pool thread
<DocLit:2>.CybWSDocLitHandler.call[:513]
- javax.xml.ws.soap.SOAPFaultException: null while
invoking public com.igen.a.HOSTjobws.JobGroupStatusResponse
com.
igen.a.HOSTjobws.endpoint.HOSTJobPortImpl.getJobGroupStatus(com.igen.a.HOSTjobws.JobGroupStatusRequest)
with params null.
at cybermation.commonservice.webservice.ws.binding.CybHttpSoapBinding.invoke(CybHttpSoapBinding.java:490)
at cybermation.commonservice.webservice.ws.CybDocumentLiteralInvocator.invokeWS(CybDocumentLiteralInvocator.java:337)
at cybermation.plugins.webservice.handler.CybWSDocLitHandler.call(CybWSDocLitHandler.java:416)
at cybermation.plugins.webservice.handler.CybWSDocLitHandler.call(CybWSDocLitHandler.java:84)
at java.util.concurrent.FutureTask.run(FutureTask.java:273)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:626)
at java.lang.Thread.run(Thread.java:804)
I also created a job_type WBSVC and I also was getting:
WS102: Unknown parameter type. The Web
Service guide was no help in troubleshooting; Check
if your parameter types and your return class name are correct.
I then changed the parameter to: web_parameter: xsd\:string=getJobGroupStatus and this time I
got: Invocation error. The
plugin_log_webservice.log shows ‘Fault occurred while processing. No indication that it ever got to the WSDL
URL.
This is the
last JIL that I tested with:
/*----------------- ASA_WEB_SERVICE_PAS_WBSVC_470 ----------------- */
insert_job: ASA_WEB_SERVICE_WBSVC_470 job_type: WBSVC
machine: N470WS
owner: SVCACCT
permission:
date_conditions: 0
description: "Test WSDL using job type WBSVC"
alarm_if_fail: 0
destination_file: "/tmp/$AUTO_JOB_NAME_$AUTORUN.txt"
wsdl_operation: getJobGroupStatus
port_name: HOSTJobPortImplPort
target_namespace:http\://endpoint.HOSTjobws.a.igen.com/
return_namespace: http\://igen.com/a/HOSTjobws
return_xml_name: string
service_name: HOSTJobPortImplService
endpoint_url: http\:// igen/a-admin/services/HOSTJobService
wsdl_url: "http://igen/a-admin/services/HOSTJobService?wsdl"
one_way: 0
return_class_name:
java.lang.String
web_parameter: xsd\:string="groupaHOSTMarkerJob"
last error:
06/23/2015 22:58:40.643
MST-0700 1 WebservicePlugin.7434.131897_1/WAAE_WF0.1/MAIN[WS_RPC].CybWSRPCHandler.run[:391]
- org.apache.axis.AxisFault: Fault occurred while processing. at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:598) at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:673) at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1645) at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324) at
org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:875) at
org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:798) at
org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108) at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1198) at
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:564) at
org.apache.xerces.jaxp.SAXParserImpl.parse(SAXParserImpl.java:298) at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)at
org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at
org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at
org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at
org.apache.axis.client.Call.invokeEngine(Call.java:2784) at
org.apache.axis.client.Call.invoke(Call.java:2767)at
org.apache.axis.client.Call.invoke(Call.java:2443) at
org.apache.axis.client.Call.invoke(Call.java:2366) at
org.apache.axis.client.Call.invoke(Call.java:1812) at
cybermation.plugins.webservice.handler.CybWSRPCHandler.run(CybWSRPCHandler.java:338)
at java.lang.Thread.run(Unknown Source)