BizTalk Orchestration with Envelope Schema - biztalk

I have Flat File Schema in which I set the Allow Message Breakup at Infix Root to true. And also I set the Record Max Occurrence 1. To dispatch the message and send the multiple message to the send port.I used a Receive Pipeline(with flat file disassemble) and Send Pipeline (XML Transmit) in the receive and send ports. Till this it worked fine.
The input .txt File at the receive Port
1000 ABC IT
1001 DEF Maintenece
1002 GHI Payroll
The Output was three .xml files like
<?xml version="1.0" encoding="utf-8" ?>
<Record xmlns="http://FlatFilewithEnvelop.FlatFileSchema1">
<Employee xmlns="">
<ID>1000</ID>
<Name>ABC</Name>
<Dept>IT</Dept>
</Employee>
</Record>
<?xml version="1.0" encoding="utf-8" ?>
<Record xmlns="http://FlatFilewithEnvelop.FlatFileSchema1">
<Employee xmlns="">
<ID>1001</ID>
<Name>DEF</Name>
<Dept>Maintenece</Dept>
</Employee>
</Record>
<?xml version="1.0" encoding="utf-8" ?>
<Record xmlns="http://FlatFilewithEnvelop.FlatFileSchema1">
<Employee xmlns="">
<ID>1002</ID>
<Name>GHI</Name>
<Dept>Payroll</Dept>
</Employee>
</Record>
Now I wanted to send only the message with specific ID.So I added a Orchestration in to the Project where I am using decision shape, using the expression. Else I didn't want to send any message to the send Port.
Msg(FlatFilewithEnvelop.PropertySchema.ID) == 1000
If I send the same message in the Receive Port, I am getting four messages in the Send port(shown as below). I dont what was the mistake can anybody tell me what is the mistake.
<?xml version="1.0" encoding="utf-8" ?>
<Record xmlns="http://FlatFilewithEnvelop.FlatFileSchema1">
<Employee xmlns="">
<ID>1000</ID>
<Name>ABC</Name>
<Dept>IT</Dept>
</Employee>
</Record>
<?xml version="1.0" encoding="utf-8" ?>
<Record xmlns="http://FlatFilewithEnvelop.FlatFileSchema1">
<Employee xmlns="">
<ID>1000</ID>
<Name>ABC</Name>
<Dept>IT</Dept>
</Employee>
</Record>
<?xml version="1.0" encoding="utf-8" ?>
<Record xmlns="http://FlatFilewithEnvelop.FlatFileSchema1">
<Employee xmlns="">
<ID>1001</ID>
<Name>DEF</Name>
<Dept>Maintenece</Dept>
</Employee>
</Record>
<?xml version="1.0" encoding="utf-8" ?>
<Record xmlns="http://FlatFilewithEnvelop.FlatFileSchema1">
<Employee xmlns="">
<ID>1002</ID>
<Name>GHI</Name>
<Dept>Payroll</Dept>
</Employee>
</Record>

What is probably happening is that you initially created a send port with a filter subscribing to the messages.
Then you created an Orchestration that also subscribes to the messages and is bound to the send port.
If you look in BizTalk Server Administration Console and do a New Query and Search For Equals Subscriptions you will see a filter for your Send Port like below
Property Operator Value Group by
http://schemas.microsoft.com/BizTalk/2003/system-properties.SPTransportID == {GUID} Or
http://schemas.microsoft.com/BizTalk/2003/system-properties.MessageType == MesageType And
Notice how the subscription has an OR, the first will be the GUID for the port and the second part will be the filter you added to the port.
Any message published by an Orchestration that is bound to the port will set the SPTransportID to the GUID of the port.
The Filter on the send port is still looking for the messages and the Orchestration is also publishing a message to the port, hence the four messages.
The solution. Remove the Filter from the port.

Another thing is to keep your send port subscription and enrich it with the verification on the promoted field ID with desired value and disable the orchestration. So your message will be intercepted by the send port only.

Related

'DailySalesReportRQ' responds with an error 'TICKETING DATABASE ERROR'

Request to 'DailySalesReport' service responds with an error. What could be the possible reason?
security1.BinarySecurityToken = security.BinarySecurityToken;
var response = client.DailySalesReportRQ(ref messageHeader, ref security1, request.DailySalesReportRQ);
I received this error too "ERR.SWS.HOST.ERROR_IN_RESPONSE".
This is the request
<?xml version="1.0" encoding="UTF-16"?>
-<DailySalesReportRQ Version="2.0.0" TimeStamp="2020-12-13T18:34:56.6500346+03:00" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SalesReport xmlns="http://webservices.sabre.com/sabreXML/2011/10" StartDate="2018-10-01" PseudoCityCode="IPCC1"/>
</DailySalesReportRQ>
This is the response
<?xml version="1.0" encoding="UTF-16"?>
-<DailySalesReportRS Version="2.0.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-<ApplicationResults xmlns="http://services.sabre.com/STL/v01" status="NotProcessed">
-<Error timeStamp="2020-12-19T18:29:41+03:00" type="BusinessLogic">
-<SystemSpecificResults>
<Message>TICKETING DATABASE ERROR</Message>
<ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</ShortText>
</SystemSpecificResults>
</Error>
</ApplicationResults>
</DailySalesReportRS>
#Oguzhn,
First of all, you must have a credential to access Sabre's web services, since with this access you should have access to a PCC with the volume of tickets issued, that is, in the CERT.SABRE environment you should have already issued tickets in this PCC.
Once you meet this requirement you will be able to generate daily sales reports with up to 30 days retroactive ie D-30.
In your request you are using the example settings ...
StartDate="YYYY-MM-DD", only the last 30 days
PseudoCityCode = "IPCC1", travel agency sales unit
... in this case you must adjust these values with real information from the travel agency, as you are using the references in the development document.
Here is an example:
<SalesReport StartDate="2020-12-20" PseudoCityCode="4DC2"/>
You must change StartDate and PseudoCityCode to your agency's information.

Host error during request eTicketCouponLLSRQ

Sometimes I receive ERR.SWS.HOST.CONNECTOR_ERROR while invoking eTicketCouponLLSRQ and sometimes I receive valid response. What is wrong?
Thank you!
I'm working in CERT, SRW version is 2.15.2 (SDK version), PCC Z4KB, EPR 1112
RQ:
<?xml version="1.0" encoding="UTF-8"?><eTicketCouponRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" TimeStamp="2018-04-23T10:36:18.907" Version="2.0.0">
<Ticketing eTicketNumber="5552484960880"/>
</eTicketCouponRQ>
RS:
<?xml version="1.0" encoding="UTF-8"?><eTicketCouponRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" TimeStamp="2018-04-23T10:36:18.907" Version="2.0.0">
<Ticketing eTicketNumber="XXXXXXXXX0880"/>
</eTicketCouponRQ><?xml version="1.0" encoding="UTF-8" standalone="no"?><eTicketCouponRS xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:stl="http://services.sabre.com/STL/v01" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.0.0">
<stl:ApplicationResults status="Unknown">
<stl:Error timeStamp="2018-04-23T01:33:59-05:00" type="Application">
<stl:SystemSpecificResults>
<stl:Message>Sending request to the Host failed</stl:Message>
<stl:ShortText>ERR.SWS.HOST.CONNECTOR_ERROR</stl:ShortText>
</stl:SystemSpecificResults>
</stl:Error>
</stl:ApplicationResults>
</eTicketCouponRS>
This is likely a timeout on a Sabre backend, meaning that it was not able to process it.
If you get many of this, I recommend you to contact the Sabre API helpdesk

How to post parameter with special symbol like "\/" or "|" in https://apigee.com GET api request?

We are trying to use an external SOAP service in our mobile app. We are converting that SOAP service into a GET method REST api using https://apigee.com. But that REST api , is changing our parameter value (which contain some special character like / | and all), when hitting actual SOAP api. How can we stop this encoding/decoding part in Apigee? is their any other free service available there for same purpose ?
REST API GET Request. So you will be sending request parameters in the URL as query parameters. Use the below flow
Use Extract Variables policy to extract query parameter variables
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ExtractVariables async="false" continueOnError="true" enabled="true" name="getqueryparams">
<DisplayName>getqueryparams</DisplayName>
<QueryParam name="param1">
<Pattern ignoreCase="true">{param1}</Pattern>
</QueryParam>
<QueryParam name="param2">
<Pattern ignoreCase="true">{param2}</Pattern>
</QueryParam>
<QueryParam name="param3">
<Pattern ignoreCase="true">{param3}</Pattern>
</QueryParam>
<Source>request</Source>
<VariablePrefix>getqueryparams</VariablePrefix>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
</ExtractVariables>
Use Service callout policy to create and send SOAP POST Request
<ServiceCallout async="false" continueOnError="false" enabled="true" name="Service-Callout-1">
<DisplayName>Custom label used in UI</DisplayName>
<Request clearPayload="true" variable="myRequest">
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
<Set>
<Headers>
<Header name="Content-Type">text/xml</Header>
<Header name="SOAPAction">http://www.webserviceX.NET/GetWeather</Header>
</Headers>
<Payload contentType="text/xml">
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetWeather xmlns="http://www.webserviceX.NET">
<CityName>{getqueryparams.param1}</CityName>
<CountryName>{getqueryparams.param2}</CountryName>
</GetWeather>
</soap:Body>
</soap:Envelope>
</Payload>
<Verb>POST</Verb>
</Set>
</Request>
<Response>response</Response>
<Timeout>60000</Timeout>
<HTTPTargetConnection>
<URL>http://www.webservicex.com/globalweather.asmx</URL>
</HTTPTargetConnection>
</ServiceCallout>
Use xml to json policy to convert the response xml to JSON in RESPONSE flow
Your service URL: http://superman-prod.apigee.net/service/getService?param1=abc/xyz&param2=one|two&param3=omgomgomg

Encryption Transformer in Mule

Please can anyone help me with encryption namespace and schema location in Mule 3.4.
I have this Configuration XML
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd">
<encryption:config name="Encryption_PGP" defaultEncrypter="PGP_ENCRYPTER" doc:name="Encryption_PGP">
<encryption:pgp-encrypter-config publicKeyRingFileName="./mule.gpg" secretKeyRingFileName="./secring.gpg" secretAliasId="3879972755627455806" secretPassphrase="mule1234" principal="test1"/>
</encryption:config>
<flow name="sdsd">
<encryption:encrypt config-ref="Encryption_PGP" doc:name="Encryption" using="PGP_ENCRYPTER" input-ref="#[message.payload]">
<encryption:pgp-encrypter principal="fernando.martinez <fernando.martinez#mulesoft.com>" />
</encryption:encrypt>
</flow>
</mule>
But its giving me this error: The prefix "encryption" for element "encryption:config" is not bound.
To use the the message processors from the encryption namespace you need to install the Anypoint Enterprise Security module
You can find more informations about how to use it here
That said this is an EE only feature, so if you don't have an EE license you should probably use the PGP security instead

need to construct a XML file and do HTTP POST to webservice URL--Blackberry

I need to construct a xml like this
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsu="http://docs.xyz/2009/01.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://service.xyz.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<SOAP-ENV:Body><mns1:getVisitList xmlns:mns1="http://service.xyz.com/">
<input_no>321</input_no>
</mns1:getvisitlist>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
and i want to do http post this to a webservice url to get some json output response.. i dono where to start.. can anyone help me with this ?? any idea please..

Resources