|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
SOAP remote request target service errorHello,
I am trying to run a report via Jaspersoft's [including should anyone else need specific assistance] web services api. The docs sample request XML is: <request operationName="runReport" locale="en"> <argument name="RUN_OUTPUT_FORMAT">JRPRINT</argument> <resourceDescriptor name="" wsType="" uriString="/reports/samples/EmployeeAccounts" isNew="false"> <label>null</label> <parameter name="EmployeeID">emil_id</parameter> <parameter name="TEST_LIST" isListItem="true">A & L Powers Engineering, Inc</parameter> <parameter name="TEST_LIST" isListItem="true">A & U Jaramillo Telecom, Inc</parameter> <parameter name="TEST_LIST" isListItem="true">A & U Stalker Telecom, Inc</parameter> </resourceDescriptor> </request> I have tried: [var: 'WSDL' = Include_Url('http://xxx.xxx.xxx.xxx:8080/jasperserver-pro/services/repository?wsdl', -username='xxxx', -password='xxxx')] (As requires authentication to access the WSDL) [var: 'SOAP_Envelope' = '<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <request operationName="list" locale="en"> <resourceDescriptor name="" wsType="folder" uriString="/ContentFiles" isNew="false"> <label>null</label> </resourceDescriptor> </request> </soapenv:Body> </soapenv:Envelope> '] [var: 'Result' = (Include_Url: 'http://xxx.xxx.xxx.xxx:8080/jasperserver-pro/services', -PostParams=$SOAP_Envelope, -SendMIMEHeaders=(Array: 'content-type' = 'text/xml', 'SOAPAction' = ''), -username='xxxx', -password='xxxx')] [Variable: 'XMLResult' = (XML: $Result)] [Protect] [Variable: 'FaultCode' = $XMLResult->(Extract: '//faultcode')->(Get:1)->Contents] [Variable: 'FaultString' = $XMLResult->(Extract: '//faultstring')->(Get:1)->Contents] [/Protect] [Encode_HTML: $FaultString + ' (' + $FaultCode ')'] Result is: no SOAPAction header! (ns1:Client.NoSOAPAction) If I change 'SOAPAction' = 'runReport' I get: The AXIS engine could not find a target service to invoke! targetService is null (ns1:Server.NoService) I have also tried: var: 'myparams' = map; $myparams->(insert: 'username' = 'xxxx'); $myparams->(insert: 'password' = 'xxxx'); $myparams->(insert: 'operationName' = 'runReport'); var: 'WSDL' = XML(Include_Url('http://xxx.xxx.xxx.xxx:8080/jasperserver-pro/services/repository?wsdl', -username='xxxx', -password='xxxx')); SOAP_DefineTag( -LocalTagName='runJSReport', -WSDL=XML($WSDL), -Namespace='Ex_', -OperationName='runReport', -RUN_OUTPUT_FORMAT='HTML', -uriString='/reports/Samples/EmployeeAccounts', -name='EmployeeID', -Defaults='$myparams', -Procs=Proc_Lasso); Protect; Ex_runJSReport; Handle_Error; Error_Msg; /Handle_Error; /Protect; '<hr>'; Soap_LastRequest; and get: (some cleanup done) libxml2 error: Opening and ending tag mismatch: HR line 1 and body Opening and ending tag mismatch: HR line 1 and html Premature end of data in tag body line 1 Premature end of data in tag html line 1 at: onCreate with params: HTTP Status 401 - Full authentication is required to access this resource <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Header /> <SOAP-ENV:Body> <targns:runReport xmlns:targns="http://xxx.xxx.xxx.xxx:8080/jasperserver-pro/services/repository"> <requestXmlString xsi:type="xsd:string" /> </targns:runReport> </SOAP-ENV:Body></SOAP-ENV:Envelope> Any help/pointers greatly appreciated. Thanks Peter -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: SOAP remote request target service errorPeter Brown wrote on 7/8/2009 11:31 AM:
> -SendMIMEHeaders=(Array: 'content-type' = 'text/xml', 'SOAPAction' = ''), ... > no SOAPAction header! (ns1:Client.NoSOAPAction) If the SOAPAction is suppose to be empty, then know that there's a bug with include_url where it will strip a header with an empty value. Here are the only options that I'm aware of: http://www.nabble.com/trouble-creating-a-blank-SOAPAction-td22710451.html#nabble.i22710876 - Bil -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
| Free embeddable forum powered by Nabble | Forum Help |