Mulesoft Salesforce to CSV - file

I am revising the question for more clarity. I am trying to import Salesforce contact data to a CSV File.
my Config XML is as below:
<sfdc:connection-pooling-profile initialisationPolicy="INITIALISE_ONE" exhaustedAction="WHEN_EXHAUSTED_GROW"/>
</sfdc:config>
<file:connector name="File" writeToDirectory="C:\Users\anataraj\Desktop\Mulesoft Fileconversion\Files" autoDelete="true" streaming="true" validateConnections="true" doc:name="File"/>
<file:connector name="File1" writeToDirectory="C:\Users\anataraj\Desktop\Mulesoft Fileconversion\Files" autoDelete="true" streaming="true" validateConnections="true" doc:name="File"/>
<file:connector name="File2" writeToDirectory="C:\Users\anataraj\Desktop\Mulesoft Fileconversion" autoDelete="true" streaming="true" validateConnections="true" doc:name="File"/>
<data-mapper:config name="XML_To_CSV" transformationGraphPath="xml_to_csv.grf" doc:name="XML_To_CSV"/>
<flow name="testapp2Flow1" doc:name="testapp2Flow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP"/>
<sfdc:query config-ref="Salesforce1" query="SELECT FirstName,LastName from Contact limit 5" doc:name="Salesforce"/>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
<mulexml:object-to-xml-transformer doc:name="Object to XML"/>
<data-mapper:transform config-ref="XML_To_CSV" doc:name="XML To CSV"/>
<file:outbound-endpoint path="C:\Users\anataraj\Desktop\Mulesoft Fileconversion" connector-ref="File2" responseTimeout="10000" doc:name="File"/>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
</flow>
The Output get in my file & Logger is of format:
"[FirstName, Kyle]",""
"[Id]",""
"[LastName, Swenson]",""
"[type, Contact]",""
What I need is in the format:
Kyle,Swenson
Antony,Barker
Rich,Gilbertson
AM i doing wrong in the way i am mapping. Please advise. Thanks!

you could have also used Transform message with below config set.
%output application/csv separator=";", header=false

Related

Position Outlook Add-In button on the `AppointmentOrganizerCommandSurface`

I am trying to add a button to the AppointmentOrganizerCommandSurface in Outlook just like Giphy is added in this image, but instead, my My Office Add-in is added to the menu.
I would like to add an action button with my custom icon next to the Giphy action.
I tried manipulating manifest.xml. I went through the documentation and followed the steps, but I was unable to figure out what is going on.
Here is the manifest:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp">
<Id>61262617-dad8-4e84-a9e4-89b1bab3e6e7</Id>
<Version>1.0.0.0</Version>
<ProviderName>Contoso</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="My Office Add-In"/>
<Description DefaultValue="A template to get started."/>
<IconUrl DefaultValue="https://localhost:3000/assets/icon-64.png"/>
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-128.png"/>
<SupportUrl DefaultValue="https://www.contoso.com/help"/>
<AppDomains>
<AppDomain>https://www.contoso.com</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Mailbox"/>
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1"/>
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="https://localhost:3000/taskpane.html"/>
<RequestedHeight>250</RequestedHeight>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteItem</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
</Rule>
<DisableEntityHighlighting>false</DisableEntityHighlighting>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<Requirements>
<bt:Sets DefaultMinVersion="1.3">
<bt:Set Name="Mailbox"/>
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<FunctionFile resid="Commands.Url"/>
<ExtensionPoint xsi:type="AppointmentOrganizerCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgReadGroup">
<Label resid="GroupLabel"/>
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="TaskpaneButton.Label"/>
<Supertip>
<Title resid="TaskpaneButton.Label"/>
<Description resid="TaskpaneButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Taskpane.Url"/>
</Action>
</Control>
<Control xsi:type="Button" id="ActionButton">
<Label resid="ActionButton.Label"/>
<Supertip>
<Title resid="ActionButton.Label"/>
<Description resid="ActionButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>action</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/icon-16.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/icon-32.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/icon-80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html"/>
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="GroupLabel" DefaultValue="Contoso Add-in"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="Show Taskpane"/>
<bt:String id="ActionButton.Label" DefaultValue="Perform an action"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Opens a pane displaying all available properties."/>
<bt:String id="ActionButton.Tooltip" DefaultValue="Perform an action when clicked."/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
Thank you in advance.
You need to pin your add-in in the outlook to acheive the same.
You can pin an add-in so it's easily available when you're composing an email message.
Select Settings> View all Outlook settings > Mail > Customize actions.
Select the check box for the add-in that you want to see when you’re composing a message.

Log4j generate different files with the same content

I'm working with a Java application that integrates log4j. For a new development I would need that instead of generating a file I will generate two, one per country that is accessed from the application web. Both would have the same log records that are found throughout my application.
I configured the configuration using an .xml file:
<!-- Appenders -->
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="jeveris: %d{dd MMM yyyy HH:mm:ss,SSS} %-5p %c - %m%n" />
</layout>
</appender>
<appender name="One-Console" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="Console.log" />
<param name="Append" value="true" />
<param name="MaxFileSize" value="2MB" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{dd MMM yyyy HH:mm:ss,SSS} %-5p %c - %m%n" />
</layout>
</appender>
<category name="com.example.one.web">
<level value="debug" />
<appender-ref ref="One-Console" />
</category>
<root>
<appender-ref ref="console" />
<level value="debug" />
</root>
</log4j:configuration>
Could someone guide me, tell me if it is possible or help me find the solution?
Thank you.
If you want 2+ log files that will print the same content, then you could fine 2 different files in your tag like so:
<configuration status="OFF">
<Properties>
<Property name="log-path">/your/file/path/</Property>
<Property name="log-country-name1">Country1</Property>
<Property name="log-country-name2">Country2</Property>
<!-- more if necessary -->
<Property name="log-pattern">%d{ISO8601} %-5p [%t|%c{1}] %m\n</Property>
<Property name="rollover-strategy-max">5</Property>
<Property name="rolling-size-based">10 MB</Property>
</Properties>
<appenders>
<!--uncomment following if want to print to console as well -->
<!-- <Console name="Console" target="SYSTEM_OUT">
<PatternLayout>
<pattern>${log-pattern}</pattern>
</PatternLayout>
</Console> -->
<RollingFile name="INFO" fileName="${log-path}/${log-country-name1}-logger.log" filePattern="${log-path}/${log-project-name}-debug-%d-%i.log.zip">
<PatternLayout>
<pattern>${log-pattern}</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="${rolling-size-based}" />
</Policies>
<DefaultRolloverStrategy max="${rollover-strategy-max}" />
</RollingFile>
<RollingFile name="INFO" fileName="${log-path}/UpdaterLocal-logger.log" filePattern="${log-path}/${log-country-name2}-debug-%d-%i.log.zip">
<PatternLayout>
<pattern>${log-pattern}</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="${rolling-size-based}" />
</Policies>
<DefaultRolloverStrategy max="${rollover-strategy-max}" />
</RollingFile>
</appenders>
<Loggers>
<logger name="io.switchfour" level="trace" additivity="false">
<AppenderRef ref="INFO" level="info" />
</logger>
</Loggers>
The above will create /your/file/path/Country1-logger.log and /your/file/path/Country2-logger.log and will write all entries that are INFO or higher to both files. Your log file should be identical.

Error Calling a WSDL service from angularjs using soapclient.js and angular.soap.js

I want to call wsdl service (created by dataflux data management studio )from my angular application.
I had already referred to the post
1) AngularJS - SOAP Service Integration With AngularJS Model
2) Simplest SOAP example
3) How to consume a SOAP WebService with AngularJS?
I am using soapclient.js and angular.soap.js
It is giving this error:
Uncaught TypeError: Cannot read property 'constructor' of null
soapCallback # angular.soap.js:16
SOAPClient._onSendSoapRequest # soapclient.js:214
xmlHttp.onreadystatechange # soapclient.js:187
My code in controller:
$scope.getData = function(){
soapService.DMService().then(function(response){
$scope.response = response;
});
}
In app.js,
app.factory("soapService", ['$soap',function($soap){
var base_url = "http://myserver:9000/WSDL_Web_Service/service__DashBoard.WSDL";
return {
DMService: function(){
return $soap.post(base_url,"procsvc_service__DashBoard.djf");
}
}
}]);
My wsdl service : service__Dashboard.WSDL
`
<?xml version="1.0"?>
<definitions name="DMService"
targetNamespace="http://archserver.wsdl.dataflux.com"
xmlns:tns="http://archserver.wsdl.dataflux.com"
xmlns:archxsd="archserver.xsd.dataflux.com"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<schema
targetNamespace="archserver.xsd.dataflux.com"
xmlns:tns="archserver.xsd.dataflux.com"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified"
attributeFormDefault="unqualified">
<complexType name="request">
<sequence>
</sequence>
</complexType>
<element name="procsvc_service__DashBoard.djf_in" type="tns:request"/>
<complexType name="response">
<sequence>
<element name="result" type="xsd:string" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<element name="procsvc_service__DashBoard.djf_out" type="tns:response"/>
</schema>
</types>
<message name="procsvc_service__DashBoard.djf_in">
<part name="body" element="archxsd:procsvc_service__DashBoard.djf_in"/>
</message>
<message name="procsvc_service__DashBoard.djf_out">
<part name="body" element="archxsd:procsvc_service__DashBoard.djf_out"/>
</message>
<portType name="DataManagementServicePortType">
<operation name="procsvc_service__DashBoard.djf_in">
<documentation></documentation>
<input message="tns:procsvc_service__DashBoard.djf_in"/>
<output message="tns:procsvc_service__DashBoard.djf_out"/>
</operation>
</portType>
<binding name="DataManagementService" type="tns:DataManagementServicePortType">
<SOAP:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="procsvc_service__DashBoard.djf_in">
<SOAP:operation soapAction="service__DashBoard.djf*1*57195B25CE0B6D37"/>
<input>
<SOAP:body use="literal"/>
</input>
<output>
<SOAP:body use="literal"/>
</output>
</operation>
</binding>
<service name="DMService">
<documentation>Data Management Server</documentation>
<port name="DMService" binding="tns:DataManagementService">
<SOAP:address location="http://someserver:21000"/>
</port>
</service>
</definitions> `
changes in soapclient.js (in method SOAPClient._onSendSoapRequest on line 201 ):
var nd = SOAPClient._getElementsByTagName(req.responseXML, method + **"_in"**);
if(nd.length == 0)
nd = SOAPClient._getElementsByTagName(req.responseXML, "return");
I feel, I might be calling the wsdl method in wrong way, but not able to figure out how it should be. If anybody can throw more light on how it should be done...it would be great
Thanks...

How To Generate SAML2Response Specified By Destination

I am very new to SAML and am very confused at this point. I am using Kentor to generate a Saml2Response, but it is not looking anything like my relying party is expecting. They are specifically looking for the certificate to be embedded in the response.
I need to generate this.
<?xml version="1.0" encoding="UTF-8"?>
<saml2p:Response xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" ID="_09f6a725ecf844128a5f7ef8cc1e7620"
IssueInstant="2013-12-11T03:52:21.770Z" Version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:Reference URI="#_09f6a725ecf844128a5f7ef8cc1e7620" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:Transforms xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:Transform
Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="xs" />
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:DigestValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">DATA_REMOVED</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">DATA_REMOVED</ds:SignatureValue>
<ds:KeyInfo>
<ds:KeyName>[removed]</ds:KeyName>
</ds:KeyInfo>
</ds:Signature>
<saml2p:Status>
<saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success" />
</saml2p:Status>
<saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" ID="_cadd3488f62c6d3b9933fdb56d9e8ddc"
IssueInstant="2013-12-11T03:52:21.770Z" Version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">[removed]</saml2:Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:Reference URI="#_cadd3488f62c6d3b9933fdb56d9e8ddc" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:Transforms xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="xs" />
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" />
<ds:DigestValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">DATA_REMOVED</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">DATA_REMOVED</ds:SignatureValue>
<ds:KeyInfo>
<ds:KeyName>CN=, O=, C=US</ds:KeyName>
</ds:KeyInfo>
</ds:Signature>
<saml2:Subject xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
<saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified" NameQualifier="com.sms">0500555</saml2:NameID>
<saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<saml2:SubjectConfirmationData NotBefore="2013-12-11T03:47:21.770Z" NotOnOrAfter="2013-12-11T03:57:21.770Z" />
</saml2:SubjectConfirmation>
</saml2:Subject>
<saml2:Conditions NotBefore="2013-12-11T03:52:21.770Z" NotOnOrAfter="2013-12-11T03:57:21.770Z"
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" />
<saml2:AuthnStatement AuthnInstant="2013-12-11T03:52:21.770Z" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
<saml2:AuthnContext>
<saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml2:AuthnContextClassRef>
</saml2:AuthnContext>
</saml2:AuthnStatement>
<saml2:AttributeStatement xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
<saml2:Attribute Name="AppData" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
<saml2:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">A_Party_PI.Person.FirstName =John& A_Party_PI.Person.LastName =Smith</saml2:AttributeValue>
</saml2:Attribute>
</saml2:Attribute>
</saml2:AttributeStatement>
</saml2:Assertion>
</saml2p:Response>
What I am getting from Kentor is this:
<?xml version="1.0"?>
<saml2p:Response
Destination="https://[destinationUrl]"
ID="ide5470d1f5a9a48d1822f71ea5a5363f2"
IssueInstant="2015-05-28T13:35:44Z"
Version="2.0" xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol">
<saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
ritterim.com
</saml2:Issuer>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#ide5470d1f5a9a48d1822f71ea5a5363f2">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>7YmTpqZR6Ba4/eDrEqQt7BGit0A=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>
</SignatureValue>
</Signature>
<saml2p:Status>
<saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
</saml2p:Status>
<saml2:Assertion ID="_77b39d8e-bcc4-48c2-b6c7-fe6e87414461"
IssueInstant="2015-05-28T13:35:44Z" Version="2.0"
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
<saml2:Issuer>ritterim.com</saml2:Issuer>
<saml2:Subject>
<saml2:NameID>0500555</saml2:NameID>
<saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"/>
</saml2:Subject>
<saml2:Conditions NotOnOrAfter="2015-05-28T13:37:44Z"/>
<saml2:AttributeStatement>
<saml2:Attribute Name="AppData">
<saml2:AttributeValue>A_Party_PI.Person.FirstName =John& A_Party_PI.Person.LastName =Smith</saml2:AttributeValue>
</saml2:Attribute>
</saml2:AttributeStatement>
</saml2:Assertion>
</saml2p:Response>
Any help would be appreciated, as I'm not even sure I'm in the right arena.
I'll answer by commenting on the differences in the responses.
There's no encoding in the xml declaration. Probably won't matter.
Issuer, which is optional is added.
I assume you've removed the SignatureValue from the AuthServices response.
AuthServices currently does not include the KeyInfo in the signature (it's optional)
AuthServices does not sign the assertion, only the response.
XML namespaces declarations are put in one place by AuthServices and not repeated all over.
There's no Format on the Subject NameId (it's optional)
There's no NameQualifier on the Subject NameId (it's optional)
There's no NameFormat on the Attribute (it's optional)
There's no xml type (xsi:string) on the AttributeValue (it's optional)
Basically Kentor.AuthServices leaves out a bunch of optional stuff, but otherwise the messages are equivalent.
You'll have to provide more details on what things are causing problems to get help on those.

How to link a soap request and response in mule 3

I need to send a file to a external web service. When the response is 1, the file should be deleted, else the file should be kept.
I use the file connector to send the file, and insert a record into Oracle. When the file is sent out, the key is the message id of the file connect. I want to keep the message id so that I can update the record using this id when the response is back.
I tried to use MessagePropertiesTransformer to add a custom property, but the response doesn't preserve it. Is there any way to keep the message id?
My config:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:file="http://www.mulesoft.org/schema/mule/file"
xmlns:stdio="http://www.mulesoft.org/schema/mule/stdio"
xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.mulesoft.org/schema/mule/jdbc"
xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/3.1/mule-file.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd
http://www.mulesoft.org/schema/mule/stdio http://www.mulesoft.org/schema/mule/stdio/3.1/mule-stdio.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/3.1/mule-cxf.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.mulesoft.org/schema/mule/jdbc http://www.mulesoft.org/schema/mule/jdbc/3.1/mule-jdbc.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/3.1/mule-xml.xsd
">
<spring:bean id="jdbcDataSource" class="org.enhydra.jdbc.standard.StandardDataSource" destroy-method="shutdown">
<spring:property name="driverName" value="oracle.jdbc.driver.OracleDriver"/>
<spring:property name="url" value="jdbc:oracle:thin:user/pass#ip:1521:orcl"/>
</spring:bean>
<file:connector name="output" outputAppend="true" outputPattern="#[function:datestamp]-#[header:originalFilename]" />
<file:connector name="input" streaming="false" recursive="true" autoDelete="false">
<service-overrides messageFactory="org.mule.transport.file.FileMuleMessageFactory" />
</file:connector>
<jdbc:connector name="jdbcConnector" pollingFrequency="10000" dataSource-ref="jdbcDataSource">
<jdbc:query key="outboundInsertStatement"
value="INSERT INTO TEST_MESSAGE (message_id, filename, done) VALUES (#[message:id],
#[header:originalFilename], #[string:0])"/>
</jdbc:connector>
<mulexml:namespace-manager includeConfigNamespaces="true">
<mulexml:namespace prefix="ns1" uri="http://www.iec.ch/TC57/2008/schema/message"/>
<mulexml:namespace prefix="soapenv" uri="http://schemas.xmlsoap.org/soap/envelope/"/>
<mulexml:namespace prefix="ns1" uri="http://www.iec.ch/TC57/2008/schema/message"/>
<mulexml:namespace prefix="fullmodel" uri="iesb.dongfang.com"/>
</mulexml:namespace-manager>
<flow name="fileTestFlow1">
<file:inbound-endpoint path="D:/data/in" moveToDirectory="D:/data/out" moveToPattern="#[message:id]-#[header:originalFilename]" connector-ref="input"/>
<component class="com.component.FileNameExtract"/>
<message-properties-transformer scope="outbound">
<add-message-property key="test" value="#[message:id]"/>
</message-properties-transformer>
<jdbc:outbound-endpoint queryKey="outboundInsertStatement"/>
<cxf:jaxws-client
clientClass="com.ws.IESBService"
port="IESBServiceEndpoint"
wsdlLocation="classpath:IESBService.wsdl"
operation="requestInfo"/>
<outbound-endpoint address="http://ip:8888/axis2/services/iESBService/" exchange-pattern="request-response">
</outbound-endpoint>
<xml-entity-decoder-transformer/>
<logger message=" #[header:test] !" level="INFO"></logger>
</flow>
</mule>
UPDATE:
I tried "session" scope and I think it works. New config:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:file="http://www.mulesoft.org/schema/mule/file"
xmlns:stdio="http://www.mulesoft.org/schema/mule/stdio"
xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.mulesoft.org/schema/mule/jdbc"
xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/3.1/mule-file.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd
http://www.mulesoft.org/schema/mule/stdio http://www.mulesoft.org/schema/mule/stdio/3.1/mule-stdio.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/3.1/mule-cxf.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.mulesoft.org/schema/mule/jdbc http://www.mulesoft.org/schema/mule/jdbc/3.1/mule-jdbc.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/3.1/mule-xml.xsd
">
<spring:bean id="jdbcDataSource" class="org.enhydra.jdbc.standard.StandardDataSource" destroy-method="shutdown">
<spring:property name="driverName" value="oracle.jdbc.driver.OracleDriver"/>
<spring:property name="url" value="jdbc:oracle:thin:user/pass#ip:1521:orcl"/>
</spring:bean>
<file:connector name="output" outputAppend="true" outputPattern="#[function:datestamp]-#[header:originalFilename]" />
<file:connector name="input" streaming="false" recursive="true" autoDelete="false">
<service-overrides messageFactory="org.mule.transport.file.FileMuleMessageFactory" />
</file:connector>
<jdbc:connector name="jdbcConnector" pollingFrequency="10000" dataSource-ref="jdbcDataSource">
<jdbc:query key="outboundInsertStatement"
value="INSERT INTO TEST_MESSAGE (message_id, filename, done) VALUES (#[message:id],
#[header:originalFilename], #[string:0])"/>
<jdbc:query key="outboundUpdateStatement"
value="update TEST_MESSAGE set done='1' where message_id=#[header:SESSION:test] "/>
</jdbc:connector>
<mulexml:namespace-manager includeConfigNamespaces="true">
<mulexml:namespace prefix="ns1" uri="http://www.iec.ch/TC57/2008/schema/message"/>
<mulexml:namespace prefix="soapenv" uri="http://schemas.xmlsoap.org/soap/envelope/"/>
<mulexml:namespace prefix="ns1" uri="http://www.iec.ch/TC57/2008/schema/message"/>
<mulexml:namespace prefix="fullmodel" uri="iesb.dongfang.com"/>
</mulexml:namespace-manager>
<flow name="fileTestFlow1">
<file:inbound-endpoint path="D:/data/in" moveToDirectory="D:/data/out" moveToPattern="#[message:id]-#[header:originalFilename]" connector-ref="input"/>
<component class="com.component.FileNameExtract"/>
<message-properties-transformer scope="outbound">
<add-message-property key="test" value="#[message:id]"/>
</message-properties-transformer>
<logger message="first #[message:id] " level="INFO"></logger>
<jdbc:outbound-endpoint queryKey="outboundInsertStatement"/>
<cxf:jaxws-client
clientClass="com.ws.IESBService"
port="IESBServiceEndpoint"
wsdlLocation="classpath:IESBService.wsdl"
operation="requestInfo"/>
<outbound-endpoint address="http://ip:8888/axis2/services/iESBService/" exchange-pattern="request-response">
</outbound-endpoint>
<xml-entity-decoder-transformer/>
<jdbc:outbound-endpoint queryKey="outboundUpdateStatement"/>
<logger message="second #[header:SESSION:test] " level="INFO"></logger>
</flow>
</mule>
When I copy the file one by one, it's ok, but when I copy more than five files to the directory, some records can't be updated.
Executing SQL statement: 0 row(s) updated
Set your JDBC outbound endpoint to request-response in order to ensure the flow will execute in a single thread. With your current configuration, the 2 in-only JDBC requests are "detached" from the flow and executed in parallel from it.

Resources