BizTalk FF Disassembler - Only Working With Very Small Files - biztalk

I have a BizTalk 2016 / VS 2015 Solution.
There's a simple flat file schema that debatches each row by having a repeating record element have its "Max Occurs" property set to 0.
The "config" part of the schema can be seen below:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<schemaEditorExtension:schemaInfo namespaceAlias="b" extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension" standardName="Flat File" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
<b:schemaInfo standard="Flat File" codepage="65001" default_pad_char=" " pad_char_type="char" count_positions_by_byte="false" parser_optimization="speed" lookahead_depth="3" suppress_empty_nodes="false" generate_empty_nodes="true" allow_early_termination="true" early_terminate_optional_fields="true" allow_message_breakup_of_infix_root="true" compile_parse_tables="false" root_reference="Employee" />
</xs:appinfo>
</xs:annotation>
<xs:element name="Employee">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0xA" child_order="postfix" sequence_number="1" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
<b:properties>
<b:property distinguished="true" xpath="/*[local-name()='Employee' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']/*[local-name()='Data' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']/*[local-name()='NiNumber' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']" />
<b:property distinguished="true" xpath="/*[local-name()='Employee' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']/*[local-name()='Data' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']/*[local-name()='OrgLeaveDate' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']" />
<b:property distinguished="true" xpath="/*[local-name()='Employee' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']/*[local-name()='Data' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']/*[local-name()='PosLeaveDate' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']" />
<b:property distinguished="true" xpath="/*[local-name()='Employee' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']/*[local-name()='Data' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']/*[local-name()='PostStartDate' and namespace-uri()='http://LCC.Integration.Employees.Schemas.SAP.SapEmployee_FF']" />
</b:properties>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
</xs:appinfo>
</xs:annotation>
<xs:element maxOccurs="1" name="Data">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0x9" child_order="infix" sequence_number="1" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
The input file is tab delimited with unix style line endings.
The only slightly unusual thing about the flat-file schema is that the last element "PostStartDate" has a micOccurs attribute value of 0. This is because there are a couple of providers of these document and one of the providers doesn't include a "PostStartDate" column.
I've setup a receive location that contains a FF disasembler. It has the DocumentSpecName property set to that of the schema. All other properties are as default.
The only subscriber to this receive is a send port that sends to a local folder.
If I drop a flat file with 3 rows then all works ok. However, if I extend with a few more rows (7 total in this example) then BizTalk suspends on the receive location with the error: "The Messaging Engine encountered an error during the processing of one or more inbound messages." In the event log, I see the error:
There was a failure executing the receive pipeline: "LCC.Integration.Common.Pipelines.RcvArchiveFF, LCC.Integration.Common.Pipelines, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff3873c2d0a7e656" Source: "Flat file disassembler" Receive Port: "SharePoint.Employees.Receive.SAPExtract" URI: "D:\FileDrop\Employees\In\*.txt" Reason: Unexpected data found while looking for:
'\t'
The current definition being parsed is Employee. The stream offset where the error occured is 1813. The line number where the error occured is 8. The column where the error occured is 0.
Another thing I've noticed, if I remove the trailing LF from the last row in the file then it works - regardless of the number of rows.
I've made a screencast to demo the problem: Screencast of Problem
I've created a sample solution to demonstrate the problem. This is available at the following github repo: https://github.com/RobBowman/BizTalkFFProblem
Any ideas?

Edit: I just tried your GitHub Sample in BizTalk 2013R2 and it's working fine without the change.
Edit2: Broken when >20 rows.
Edit3: I now realize that it's not really supported, the setting is: 'Allow Message Breakup At Infix Root'... your schema is not infix, it's postfix. Debatching FlatFiles on the disassember is only supported when infix. If possible, you should make your schema to support infix, then it'll work.

Related

Bpel 12c - Call webservices with basic authentication

I'm using Oracle BPEL 12c to develop a process.
I need to call a external service with basic authentication. I need to pass the credentials received on my exposed service endpoint to the external service.
When i call, i receive this:
<remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
-<part name="summary">
<summary>
oracle.fabric.common.FabricException: oracle.fabric.common.FabricException: Error in getting XML input stream:XXXXXX?WSDL: Server Authentication Required: Error in getting XML input stream: XXXX?WSDL: Server Authentication Required
</summary>
</part>
-<part name="detail">
<detail>Server Authentication Required</detail>
</part>
</remoteFault>
I tried to define on the composite, also the oracle.webservices.auth.password and oracle.webservices.auth.username password for the external service.
Also the javax.xml.ws.security.auth.username and javax.xml.ws.security.auth.password properties without sucess.
Any sugestion?
Kind regards,
Ricardo
I suppose your composite snippet should look like this:
<reference name="Service1" ui:wsdlLocation="test1.wsdl">
<interface.wsdl interface="http://tempuri.org/#wsdl.interface(IService1)"/>
<binding.ws port="http://tempuri.org/#wsdl.endpoint(Service1/BasicHttpBinding_IService1)" location="test1.wsdl" soapVersion="1.1">
<property name="weblogic.wsee.wsat.transaction.flowOption" type="xs:string" many="false">WSDLDriven</property>
<property name="oracle.webservices.auth.username" type="xs:string" many="false">test</property>
<property name="oracle.webservices.auth.password" type="xs:string" many="false">password</property>
<property name="oracle.webservices.preemptiveBasicAuth" type="xs:string" many="false">true</property>
</binding.ws>
</reference>
And also good practice to use variables when defining user and password instead of explicitly username and password
<property name="oracle.webservices.auth.username" type="xs:string" many="false">{$username}</property>
<property name="oracle.webservices.auth.password" type="xs:string" many="false">{$password}</property>
and then override them in generated cfg_plan.xml while deploying composite application
<reference name="Service1">
<!--Add search and replace rules for the binding properties-->
<binding type="ws">
<attribute name="port">
<replace>{your_port}</replace>
</attribute>
<attribute name="location">
<replace>{your_location}</replace>
</attribute>
<property name="weblogic.wsee.wsat.transaction.flowOption">
<replace>WSDLDriven</replace>
</property>
<property name="oracle.webservices.auth.username">
<replace>test</replace>
</property>
<property name="oracle.webservices.auth.password">
<replace>password</replace>
</property>
<property name="oracle.webservices.preemptiveBasicAuth">
<replace>true</replace>
</property>
</binding>
</reference>

Oracle provider for .NET - Not working with Visual Studio 2012

I'm trying to work on a existing ASP.NET project which use Oracle databases. I encountered some issues when it came to run the project. At the edmx level, Visual Studio displays an error message :
The specified store provider cannot be found in the configuration.
Here is the underlined part :
<edmx:StorageModels>
<Schema Namespace="Model1.Store" Alias="Self" Provider="Oracle.DataAccess.Client" ProviderManifestToken="10.2" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
<EntityContainer Name="Model1StoreContainer">
<EntitySet Name="PIVOT_GRID_LAYOUTS" EntityType="Model1.Store.PIVOT_GRID_LAYOUTS" store:Type="Tables" Schema="HR_DWH" />
</EntityContainer>
<EntityType Name="PIVOT_GRID_LAYOUTS">
<Key>
<PropertyRef Name="ID" />
</Key>
<Property Name="ID" Type="number" Nullable="false" />
<Property Name="NT_ACCOUNT" Type="varchar2" MaxLength="255" />
<Property Name="PIVOTGRID_NAME" Type="varchar2" MaxLength="255" />
<Property Name="LAYOUT_STRING" Type="varchar2" />
<Property Name="LAYOUT_NAME" Type="varchar2" MaxLength="255" />
<Property Name="LAYOUT_STRING_CLOB" Type="clob" />
</EntityType>
</Schema>
</edmx:StorageModels>
After research, I understood that I had to install the ODP.NET components in order to use Oracle databases in my Visual Studio application.
So I installed Oracle 11g R2 (x86) and then the ODAC 11.2.0.3. I thought it would be enough to make the things work but apparently it is not.
Any lead on that? I kinda followed lots of tutorials but can't figure out what I'm doing wrong.

"Type expected" On Declaration Of Web Service

I am writing an app in VS2013 (VB) to replace our site's text editor, TXTextControl from v16 to their new HTML5 editor v22. I did not write the original code, but I have a tight release deadline so I'm trying to duplicate the original project as closely as possible, from the original code. We already have a web service written in VS2010 (VB) to fill merge codes with data from our database. I have deleted and re-added the web service multiple times, tried both a Service Reference and a Web Reference, deleted the reference and cleaned the project, etc. I still am getting a "Type Expected" area when I try to dimension an object of the web service class. Here is that code (subbing 'asdf' for my actual domain):
Dim document As com.asdf.cms.service.FileManager.FileManager = New com.asdf.cms.service.FileManager.FileManager()
I have a project setting, web service type, application scope, named BrowserControlApp_com_asdf_cms_service_FileManager_FileManager, which has a value of http://ws.staging.asdf.com/Services/FileManager/.
The following is in my web.config file:
<applicationSettings>
<BrowserControlApp.My.MySettings>
<setting name="BrowserControlApp_com_asdf_cms_service_FileManager_FileManager"
serializeAs="String">
<value>http://ws.staging.asdf.com/Services/FileManager/</value>
</setting>
</BrowserControlApp.My.MySettings>
</applicationSettings>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="FileManagerSoap" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://ws.staging.asdf.com/Services/FileManager/FileManager.asmx"
binding="basicHttpBinding" bindingConfiguration="FileManagerSoap"
contract="com.asdf.cms.service.FileManager.FileManager.FileManagerSoap"
name="FileManagerSoap" />
</client>
</system.serviceModel>
One strange thing I noticed is that the wsdl file contains two completely different locations for the service - one of which, while visually similar to the actual service URL is not even a valid URL for
the service as seen in the following snippet:
<wsdl:operation name="LoadEnvelope">
<soap12:operation soapAction="http://asdf.com/cms/services/filemanager/LoadEnvelope" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="FileManager">
<wsdl:port name="FileManagerSoap" binding="tns:FileManagerSoap">
<soap:address location="http://ws.staging.asdf.com/Services/FileManager/FileManager.asmx" />
</wsdl:port>
<wsdl:port name="FileManagerSoap12" binding="tns:FileManagerSoap12">
<soap12:address location="http://ws.staging.asdf.com/Services/FileManager/FileManager.asmx" />
</wsdl:port>
I believe I've provided all the pertinent information. Can anyone see why my service type is not resolving? Thanks in advance, and any help is appreciated!
Thanks,
Mike

The element 'system.webServer' has invalid child element 'httpPlatform'

I am working through Shawn Wildermuth's course here and get the following warning about web.config when I build
Severity Code Description Project File
Line
Warning The element 'system.webServer' has invalid child element 'httpPlatform'.
List of possible elements expected: 'asp, caching, cgi, defaultDocument,
directoryBrowse, globalModules, handlers, httpCompression, webSocket,
httpErrors, httpLogging, httpProtocol, httpRedirect, httpTracing,
isapiFilters, modules, applicationInitialization, odbcLogging, security,
serverRuntime, serverSideInclude, staticContent, tracing, urlCompression,
validation, management, rewrite'.
TheWorld E:\EShared\Pluralsight\aspdotnet-5-ef7-bootstrap-angular-web-app\1-aspdotnet-5-ef7-bootstrap-angular-web-app-m1-exercise-files\VS2015\src\TheWorld\wwwroot\web.config 8
Web.config is
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
</handlers>
<httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogEnabled="false" startupTimeLimit="3600"/>
</system.webServer>
</configuration>
The program runs ok. Should I be doing anything about the warning?
Up until the time the current is written (Jan-2016) this is a known issue that MS did not fix. It will probably be fixed in a later version/update.
The problem is that the httpPlatform element is missing from:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Xml\Schemas\1033\DotNetConfig.xsd
You can manualy modify the xsd with an editor having Administrator right and add this under the system.webServer:
<xs:element name="httpPlatform" vs:help="configuration/system.webServer/httpPlatform">
<xs:complexType>
<xs:attribute name="arguments" type="xs:string" use="optional" vs:help="configuration/system.webServer/httpPlatform/arguments" />
<xs:attribute name="processPath" type="xs:string" use="required" vs:help="configuration/system.webServer/httpPlatform/processPath" />
<xs:attribute name="startupTimeLimit" use="required" vs:help="configuration/system.webServer/httpPlatform/startupTimeLimit">
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="1" />
<xs:maxInclusive value="99999" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="stdoutLogEnabled" type="small_boolean_Type" use="required" vs:help="configuration/system.webServer/httpPlatform/stdoutLogEnabled" />
<xs:attribute name="stdoutLogFile" type="xs:string" vs:help="configuration/system.webServer/httpPlatform/stdoutLogFile" />
<xs:anyAttribute namespace="http://schemas.microsoft.com/XML-Document-Transform" processContents="strict" />
</xs:complexType>
</xs:element>
This solved the problem for me.
UPDATE: you can find a similar post here. I got the original idea there, but modified the schema a bit.
UPDATE2: a hint to find the spot to add the element is to locate
<xs:element name="handlers" vs:help="configuration/system.webServer/handlers">
and place it just above it.
First, that course is rather old now (RC2 is coming), so you would have to give it up, and wait to see if a newer course is coming.
[Updated: For RC2 and above, a new module is required instead of HttpPlatformHandler, https://github.com/aspnet/Announcements/issues/164]

Biztalk 2013 WCF-webhttp (WCF web publishing wizard) not exposing schemas

Wonder if you guys can help. I have used the BizTalk WCF Service Publishing wizard to expose an Orchestration via WCF-WebHttp, and I can see the service and I am able to send requests to it via SOAPUi etc, however, I cannot see any of the schemas when I try and add the service reference to a .NET application. I've ensured that the schemas are in the same project, and that the actual DLL is GAC'd before deploying the service.
I've looked at the wsdl but I cannot see anything related to the schemas.
<wsdl:types>
<xs:schema elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/Message" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.microsoft.com/Message">
<xs:complexType name="MessageBody">
<xs:sequence>
<xs:any minOccurs="0" maxOccurs="unbounded" namespace="##any" />
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="ITwoWayAsync_BizTalkSubmit_InputMessage">
<wsdl:part name="message" type="q1:MessageBody" xmlns:q1="http://schemas.microsoft.com/Message" />
</wsdl:message>
<wsdl:message name="ITwoWayAsync_BizTalkSubmit_OutputMessage">
<wsdl:part name="BizTalkSubmitResult" type="q2:MessageBody" xmlns:q2="http://schemas.microsoft.com/Message" />
</wsdl:message>
<wsdl:portType name="ITwoWayAsync">
<wsdl:operation name="BizTalkSubmit">
<wsdl:input wsaw:Action="BizTalkSubmit" message="tns:ITwoWayAsync_BizTalkSubmit_InputMessage" />
<wsdl:output wsaw:Action="http://www.microsoft.com/biztalk/2006/r2/wcf-adapter/ITwoWayAsync/BizTalkSubmitResponse" message="tns:ITwoWayAsync_BizTalkSubmit_OutputMessage" />
</wsdl:operation>
</wsdl:portType>
<wsdl:service name="BizTalkServiceInstance" />
</wsdl:definitions>
When I try and add a service reference to the service, it successfully adds the reference, but for the method called BizTalkSubmit, it only takes a parameter of System.ServiceModel.Channels.Message.
Any ideas greatly appreciated.
Regards
Jazzyuk
I would recommend that you publish using WCF-WSHttp first, then changing to WCF-WebHttp afterwards. This will enable you to choose a schema to publish:

Resources