I have problems trying to generate a report using a "XML File" Data adapter (remote SOAP WS) that uses some external parameters as input data.
I have defined the external parameters "NOMBRE" and "APELLIDO" but when I try to add them to the POST message body (free text) with "$P{NOMBRE}" and "$P{APELLIDO}" it doesn't replace the placeholders with the actual values of the parameters.
This is the XML Source of the "XML File" data adapter:
<?xml version="1.0" encoding="UTF-8" ?>
<xmlDataAdapter class="net.sf.jasperreports.data.xml.XmlDataAdapterImpl"><name>prueba_imagenes</name><dataFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="httpDataLocation"><method>POST</method><url>http://myendpoint.com/myendpoint.php</url><username></username><password></password><body><soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ecr="urn:http://myendpoint.com/myendpoint.php">
<soapenv:Header/>
<soapenv:Body>
<ecr:peticion_JD3 soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<nombre xsi:type="xsd:string">$P{NOMBRE}</nombre>
<apellidos xsi:type="xsd:string">$P{APELLIDOS}</apellidos>
<edad xsi:type="xsd:string">3</edad>
</ecr:peticion_JD3>
</soapenv:Body>
</soapenv:Envelope>
</body><header><name>SOAPAction</name><value>"urn:http://myendpoint.com/myendpoint.php#peticion_JD3"</value></header><header><name>Content-Type</name><value>text/xml;charset=UTF-8</value></header></dataFile><useConnection>true</useConnection><namespaceAware>false</namespaceAware><selectExpression></selectExpression><locale xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:java="http://java.sun.com" xsi:type="java:java.lang.String">es_ES</locale><timeZone xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:java="http://java.sun.com" xsi:type="java:java.lang.String">Europe/Paris</timeZone></xmlDataAdapter>
Exactly the same WORKS if I use the WebService Data Adapter plugin but doesn't work with the native "XML File" Data Adapter.
What am I doing wrong?
Related
I have a web service consumer in a flow and simply want to extract the XML contained in the soap envelope to be put on the outbound vm queue. How can I accomplish that in a flow, I have shown a sample of the soap message;
<ws:consumer-config name="WS_Connector"
connector-ref="HTTP_HTTPS" wsdlLocation="orderService.wsdl"
service="OrderService" port="OrderServiceWS"
serviceAddress="http://ws-orders.com?responseTimeout=60000"
doc:name="Web Service Consumer" />
<flow name="mainFlow">
<vm:inbound-endpoint path="request.queue"/>
<ws:consumer config-ref="WS_Connector"
operation="orderTShirts" doc:name="TShirt Service Consumer">
</ws:consumer>
<!-- Get Just the XML Payload without the Soap Envelope
for the vm outbound queue
<tshirt xmlns="http://www.webservice.order-service">
<size>17</size>
<color>red</color>
</tshirt>
-->
<vm:outbound-endpoint path="response.queue"/>
</flow>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<tshirt xmlns="http://www.webservice.order-service">
<size>17</size>
<color>red</color>
</tshirt>
</soap:Body>
</soap:Envelope>
The web-service-consumer is designed to only accept the body/operation part of the XML document and will produce body/operation in response.
Pls go through the dataweave document :- https://docs.mulesoft.com/mule-user-guide/v/3.7/web-service-consumer
What you can do here use XSLT transforer or DataWeave to add your soap envelope after your <ws:consumer/> in the response something like following example :-
<!-- your code above -->
<ws:consumer config-ref="WS_Connector" operation="orderTShirts" doc:name="TShirt Service Consumer"/>
<dw:transform-message doc:name="XML to JSON" >
<dw:input-payload doc:sample="ListInventoryResponse.xml"/>
<dw:set-payload><![CDATA[%dw 1.0
%output application/xml
%namespace ns0 http://mulesoft.org/tshirt-service
%namespace soap http://schemas.xmlsoap.org/soap/envelope/
---
soap#Envelope : {
soap#Body:payload
}]]></dw:set-payload>
</dw:transform-message>
The solution I found is quite simple
<mulexml:dom-to-xml-transformer doc:name="SOAP Response to XML" encoding="UTF-8" mimeType="application/xml" outputEncoding="UTF-8"/>
Using PowerShell I can easily get know "BookInPolicy" state in the room by executing command Get-CalendarProcessing -Identity "ROOM_NAME" | Format-List
But question is perfoming something like that by using EWS manage api.
I spent a lot of time exploring this issue in the internet and unfortunately i found nothing. Is it realy posible to do? I hope you gave me some useful advices or solution.
By using the GetUserConfiguration EWS request you can obtain some of the BookInPolicy information.
E.g. by sending the following request for a meeting room's calendar
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010_SP2"/>
</soap:Header>
<soap:Body>
<m:GetUserConfiguration>
<m:UserConfigurationName Name="Calendar">
<t:DistinguishedFolderId Id="calendar">
<t:Mailbox>
<t:EmailAddress>room#company.com</t:EmailAddress>
</t:Mailbox>
</t:DistinguishedFolderId>
</m:UserConfigurationName>
<m:UserConfigurationProperties>All</m:UserConfigurationProperties>
</m:GetUserConfiguration>
</soap:Body>
</soap:Envelope>
you will obtain a dictionary of information containing (among others) the following two fields
<t:DictionaryEntry>
<t:DictionaryKey>
<t:Type>String</t:Type>
<t:Value>AllBookInPolicy</t:Value>
</t:DictionaryKey>
<t:DictionaryValue>
<t:Type>Boolean</t:Type>
<t:Value>false</t:Value>
</t:DictionaryValue>
</t:DictionaryEntry>
<t:DictionaryEntry>
<t:DictionaryKey>
<t:Type>String</t:Type>
<t:Value>BookInPolicy</t:Value>
</t:DictionaryKey>
<t:DictionaryValue>
<t:Type>StringArray</t:Type>
<t:Value>75480a35-de48-46ad-8378-7c66137de736</t:Value>
<t:Value>498e21e9-1d88-4254-bea0-8d976c3e451d</t:Value>
<t:Value>08ffb1dd-64b8-438f-a924-ac3782975abf</t:Value>
</t:DictionaryValue>
</t:DictionaryEntry>
The downside is that I don't know how to query the IDs received for BookInPolicy.
You can obtain some permission information by using a GetFolder request
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010_SP2"/>
</soap:Header>
<soap:Body>
<m:GetFolder>
<m:FolderShape>
<t:BaseShape>AllProperties</t:BaseShape>
</m:FolderShape>
<m:FolderIds>
<t:DistinguishedFolderId Id="calendar">
<t:Mailbox>
<t:EmailAddress>room#company.com</t:EmailAddress>
</t:Mailbox>
</t:DistinguishedFolderId>
</m:FolderIds>
</m:GetFolder>
</soap:Body>
</soap:Envelope>
and reviewing the returned permission set but I didn't find any way to connect the permission information to the BookInPolicy IDs. (sample permission below)
<t:CalendarPermission>
<t:UserId>
<t:SID>S-1-5-21-799214634-780288877-1039276024-11759</t:SID>
<t:PrimarySmtpAddress>group#company.com</t:PrimarySmtpAddress>
<t:DisplayName>group</t:DisplayName>
</t:UserId>
<t:CanCreateItems>false</t:CanCreateItems>
<t:CanCreateSubFolders>false</t:CanCreateSubFolders>
<t:IsFolderOwner>false</t:IsFolderOwner>
<t:IsFolderVisible>true</t:IsFolderVisible>
<t:IsFolderContact>false</t:IsFolderContact>
<t:EditItems>None</t:EditItems>
<t:DeleteItems>None</t:DeleteItems>
<t:ReadItems>FullDetails</t:ReadItems>
<t:CalendarPermissionLevel>Reviewer</t:CalendarPermissionLevel>
</t:CalendarPermission>
I'm trying to use Cisco WebDialer API but have a few issues with it:
When I try to send the following SOAP request
<?xml version="1.0" encoding="utf-8" ?>
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:WD70">
<soapenv:Header/>
<soapenv:Body>
<urn:makeCallSoap soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<in0 xsi:type="urn:Credential">
<userID xsi:type="xsd:string">user******</userID>
<password xsi:type="xsd:string">pass*****</password>
</in0>
<in1 xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">1234</in1>
<in2 xsi:type="urn:UserProfile">
<user xsi:type="xsd:string">wd</user>
<deviceName xsi:type="xsd:string">SEP001558C8970F</deviceName>
<lineNumber xsi:type="xsd:string">901234565</lineNumber>
<supportEM xsi:type="xsd:boolean">false</supportEM>
<locale xsi:type="xsd:string">English</locale>
<dontAutoClose xsi:type="xsd:boolean">false</dontAutoClose>
<dontShowCallConf xsi:type="xsd:boolean">true</dontShowCallConf>
</in2>
</urn:makeCallSoap>
</soapenv:Body>
</soapenv:Envelope>
to https://SERVER:PORT/webdialer/services/WebdialerSoapService70 I got the following error:
The AXIS engine could not find a target service to invoke! targetService is WebdialerSoapService70
When I try to access directly https:///webdialer/services/WebdialerSoapService70 via browser I get the following message:
AXIS error
No service is available at this URL
My question is what is wrong? Do I miss something in my request or required service isn't running?
Thank you.
Ok, thanks to my colleague I've got the answer. You need to go to the following link:
https://SERVER:PORT/webdialer/services
And you'll see list of all working services and links to them. In my case right link was:
https://SERVER:PORT/webdialer/services/WebdialerSoapService
After I've changed it everything begin to work. And yes, when you open right link in browser you have to get the following message:
WebdialerSoapService
Hi there, this is an AXIS service!
Perhaps there will be a form for invoking the service here...
I'm having a heck of a time calling SetPolicies() (API ref) using the 2010 SSRS WSDL (on SQL Server 2008R2 SSRS Server). When I POST with the following payload, I get a 200 response, a well formed SOAP response with an empty body, but no policy actually created for the given folder.
I'm making other calls successfully, so I'm not worried about auth problems. Additionally, I've made the same calls via Powershell with success.
I'm trying to use the raw SOAP API (called from Ruby actually)...anybody have any suggestions on what to try next?
Here's my XML:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tns="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Body>
<tns:SetPolicies>
<tns:ItemPath>/mydir</tns:ItemPath>
<tns:Policies>
<tns:groupUserName>mydomain\someuser</tns:groupUserName>
<tns:roles>
<tns:role>
<tns:name>Content Manager</tns:name>
<tns:description>stuff</tns:description>
</tns:role>
<tns:role>
<tns:name>Browser</tns:name>
<tns:description>stuff here too</tns:description>
</tns:role>
</tns:roles>
</tns:Policies>
</tns:SetPolicies>
</env:Body>
</env:Envelope>
Solved. I was able to catch the POST powershell is using (via wireshark) and look at the XML...the tags are identical, except for casing...
Looks like the reportServer API is sensitive to the case of the XML tags...when POSTing this, I get a 200, and the policies are actually set:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tns="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Body>
<tns:SetPolicies>
<tns:ItemPath>/mydir</tns:ItemPath>
<tns:Policies>
<tns:GroupUserName>mydomain\someuser</tns:groupUserName>
<tns:Roles>
<tns:Role>
<tns:Name>Content Manager</tns:name>
<tns:Description>stuff</tns:description>
</tns:Role>
<tns:Role>
<tns:Name>Browser</tns:name>
<tns:Description>stuff here too</tns:description>
</tns:Role>
</tns:Roles>
</tns:Policies>
</tns:SetPolicies>
</env:Body>
</env:Envelope>
I am trying to use SyncStatusParam to retrieve Status of an object. Instead it returned all objects that were even sent to QuickBooks cloud. If I go back to use the NgIdSet which has been deprecated, then it worked fine.
The XML I sent was:
<?xml version="1.0" encoding="UTF-8"?>
<SyncStatusRequest xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OfferingId>ipp</OfferingId>
<SyncStatusParam>
<IdSet><Id idDomain="NG">11019504</Id></IdSet>
<SyncToken>1</SyncToken>
<ObjectType>Bill</ObjectType>
</SyncStatusParam>
</SyncStatusRequest>