I want to change an image in about 110 CR 2008 Reports.
I've seen answer about mass changing fields, but I need to change image.
Is their any script or method I could use ?
if you are saving the image in the database you can create schema xml file to reade from the image from DB and call this schema as subreport in the report itself.
the schema will be like this:
You have to make some modification on the id, target, element(table Name) and source as your requirements.
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="rptAppSettings" targetNamespace="http://tempuri.org/AppSettings.xsd" xmlns:mstns="http://tempuri.org/AppSettings.xsd" xmlns="http://tempuri.org /AppSettings.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas- microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:annotation>
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
<DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft- com:xml-msdatasource">
<Connections>
<Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="ConnectionString" IsAppSettingsProperty="true" Modifier="Assembly" Name="ConnectionString (Web.config)" ParameterPrefix="#" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.ConnectionString.ConnectionString" Provider="System.Data.SqlClient" />
</Connections>
<Tables />
<Sources />
</DataSource>
</xs:appinfo>
</xs:annotation>
<xs:element name="rptAppSettings" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_DataSetName="rptAppSettings" msprop:Generator_UserDSName="rptAppSettings">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="App_Settings" msprop:Generator_UserTableName="App_Settings" msprop:Generator_RowEvArgName="App_SettingsRowChangeEvent" msprop:Generator_TableVarName="tableApp_Settings" msprop:Generator_TablePropName="App_Settings" msprop:Generator_RowDeletingName="App_SettingsRowDeleting" msprop:Generator_RowChangingName="App_SettingsRowChanging" msprop:Generator_RowDeletedName="App_SettingsRowDeleted" msprop:Generator_TableClassName="App_SettingsDataTable" msprop:Generator_RowChangedName="App_SettingsRowChanged" msprop:Generator_RowEvHandlerName="App_SettingsRowChangeEventHandler" msprop:Generator_RowClassName="App_SettingsRow">
<xs:complexType>
<xs:sequence>
<xs:element name="LogoImage" msprop:Generator_ColumnVarNameInTable="columnLogoImage" msprop:Generator_ColumnPropNameInRow="LogoImage" msprop:Generator_ColumnPropNameInTable="LogoImageColumn" msprop:Generator_UserColumnName="LogoImage" type="xs:base64Binary" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Related
I am converting WSDL to Java with CXF. When -autoNameResolution key is enabled CXF generates many files with the same content. Is there any way to avoid it?
To avoid nested static classes I've enabled <jaxb:globalBindings localScoping="toplevel">. As you can see in the WSDL element "Apple" is referenced three times. Unfortunately I cannot change WSDL. CXF creates
Apple.java, Apple2.java, Apple3.java accordingly or crashes when -autoNameResolution flag is not set.
<xs:element name="Forest">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="99" minOccurs="0" name="Apple">
<xs:complexType>
<xs:sequence>
<xs:element name="Size" type="xsd:string" />
<xs:element name="Color" type="xsd:string" />
<xs:element name="Taste" type="xsd:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="TreeOne">
<xs:complexType>
<xs:sequence>
<xs:element name="Branch1" type="xsd:string">
</xs:element>
<xs:element maxOccurs="99" minOccurs="0" name="Apple">
<xs:complexType>
<xs:sequence>
<xs:element name="Size" type="xsd:string" />
<xs:element name="Color" type="xsd:string" />
<xs:element name="Taste" type="xsd:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="TreeTwo">
<xs:complexType>
<xs:sequence>
<xs:element name="BranchTwo" type="xsd:string">
</xs:element>
<xs:element maxOccurs="99" minOccurs="0" name="Apple">
<xs:complexType>
<xs:sequence>
<xs:element name="Size" type="xsd:string" />
<xs:element name="Color" type="xsd:string" />
<xs:element name="Taste" type="xsd:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
Is there any way to teach wsdl2java not to create Apple2.java and Apple3.java and refer to Apple.java in all three cases? With bindings I could change the name to something else like Apple2->Peach, Apple3->Watermelon but this is not that What I am looking for. It might be obvious to see that all three apples have same set of fields, and are actually the same?
Is there any way to solve that? May be some refactoring plugin that refactors code generated by cxf?
You can force JAXB/XJC to reuse existing classes using the jaxb:class/#ref customization. Something along the lines:
<jaxb:class ref="com.acme.foo.Apple"/>
Where com.acme.foo.Apple is the FQCN of one of the generated Apple classes.
Bind this to the other two xs:complexTypes and JAXB will reuse the existing class instead of generating the same thing again.
I don't have much experience with customizing WSDLs so unfortunatelly I can't point you to the exact syntax of the binding in this case.
I have a multipart message with this schema (edited for brevity):
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://MyCompany/Schemas/Canonical/Property/1.0" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://MyCompany/Schemas/Canonical/Property/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Property">
<xs:annotation>
<xs:appinfo>
<b:properties>
<b:property distinguished="true" xpath="/*[local-name()='Property' and namespace-uri()='http://MyCompany/Schemas/Canonical/Property/1.0']/*[local-name()='UPRN' and namespace-uri()='']" />
</b:properties>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="Addresses">
<xs:complexType />
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="UPRN" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Given that the message name in an Orchestration is MyMessage, how would I access the value of the distinguished field 'UPRN' in a BizTalk Expression Editor.
When I try dot notation all I get from IntilliSense is MyMessage.Property
It's supposed to be:
MessageName.PartName.RootNode.ElememtName[...].FieldName
I've built an assembly with the BTAHL7V2X schemas (MSH_25_GLO_DEF, etc).
In another assembly, I need to create a schema, where one of the elements is of type MSH_25_GLO_DEF.
In my BTAHL7V2XCommon assembly I have:
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://microsoft.com/HealthCare/HL7/2X" targetNamespace="http://microsoft.com/HealthCare/HL7/2X" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<b:schemaInfo root_reference="MSH_25_GLO_DEF" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" />
</xs:appinfo>
</xs:annotation>
<xs:element name="MSH_25_GLO_DEF">
...
In my other assembly, I have a schema that look like:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://mycompany.com/Custom/HL7/2X" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:ns0="http://microsoft.com/HealthCare/HL7/2X" targetNamespace="http://mycompany.com/Custom/HL7/2X" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import schemaLocation="BTAHL7Schemas.MSH_25_GLO_DEF" namespace="http://mycompany.com/Custom/HL7/2X"/>
<xs:include schemaLocation="ORU_R01_23_GLO_DEF.xsd" />
<xs:annotation>
<xs:appinfo>
<b:schemaInfo standards_version="HL7.DBVersion.1_5" document_type="HL7 2X Schema" version="2.0.0104.0.2.0" root_reference="ORU_R01_23_GLO_DEF" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" />
<b:references>
<b:reference targetNamespace="http://mycompany.com/Custom/HL7/2X/2.3/ORU/DataTypes" />
<b:reference targetNamespace="http://microsoft.com/HealthCare/HL7/2X" />
<b:reference targetNamespace="http://mycompany.com/Custom/HL7/2X/2.3/ORU/Segments" />
<b:reference targetNamespace="http://mycompany.com/Custom/HL7/2X/2.3/ORU/Tables" />
</b:references>
</xs:appinfo>
</xs:annotation>
<xs:element name="ORU_R01_23_ALL">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="MSH_25_GLO_DEF" type="ns0:MSH_25_GLO_DEF" />
<xs:element minOccurs="1" maxOccurs="1" ref="ORU_R01_23_GLO_DEF" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
I've added a reference to the BTAHL7V2X assembly which contains the MSH header and I can see the MSH_25_GLO_DEF if I view the referenced assembly in the object browser, but I always get an error stating "http://microsoft.com/HealthCare/HL7/2X:MSH_25_GLO_DEF is not declared, when I view my schema.
I've also tried changing the imports reference to an include:
<xs:include schemaLocation="BTAHL7Schemas.MSH_25_GLO_DEF" />
but get a different error when vieweing the schema:
The targetNamespace 'http://microsoft.com/HealthCare/HL7/2X' of included/redefined schema should be the same as the targetNamespace 'http://mycompany.com/Custom/HL7/2X' of the including schema.
Is there a proper way to reference BizTalk schema in another assembly?
Check this out:
http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/d40d2c15-5c91-45c9-877d-2559802d1b1e
hope that helps
<xs:schema ... targetNamespace="http://mycompany.com/Custom/HL7/2X">
<xs:import schemaLocation="BTAHL7Schemas.MSH_25_GLO_DEF" namespace="http://microsoft.com/HealthCare/HL7/2X"/>
<b:schemaInfo ... root_reference="ORU_R01_23_ALL" ... />
I am using biztalk 2009 and need help with mapping. I have input like:
<root>
<shop>
<product>
<type>1</type>
<code>ab</code>
<desc></desc>
</product>
<product>
<type>2</type>
<code>cd</code>
<desc></desc>
</product>
</shop>
<address />
<names />
</root>
I want to map the collection of products to a target element as a string of xml that looks like this:
<products><product type="1" code="ab" /><product type="2" code="cd" /></products>
I have found a solution using custom xslt but I dont want to use it as we have found it to be very fickle. Is there any functoids that could do this for me with some custom scripting? I am also a c sharp dev thanks!
This is completely doable out of the box with a simple map.
Here is the soure XML file:
<root>
<shop>
<product>
<type>1</type>
<code>ab</code>
<desc></desc>
</product>
<product>
<type>2</type>
<code>cd</code>
<desc></desc>
</product>
</shop>
<address />
<names />
</root>
Here is the source schema:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element name="shop">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" name="product">
<xs:complexType>
<xs:sequence>
<xs:element name="type" type="xs:string" />
<xs:element name="code" type="xs:string" />
<xs:element name="desc" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="address">
<xs:complexType />
</xs:element>
<xs:element name="names">
<xs:complexType />
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Here is the target schema:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="products">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" name="product">
<xs:complexType mixed="true">
<xs:attribute name="type" type="xs:string" />
<xs:attribute name="code" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
And here is the map:
And here is the output:
<products>
<product type="1" code="ab" />
<product type="2" code="cd" />
</products>
Armed witht his result, you can follow one of two suggestions outlined by Mark Brimble in his blog.
How to copy the entire node to element of string type in a map
I am sorry to say this but when mapping gets too involved and there is no obvious way to do this in the mapper I just fall back on a .net helper method inside assign message which will build the output message.
The helper method can take a biztalk message as an argument of type XLANGMessage and return a type of XMLDocument which will be converted to your target message type, providing the xml inside renders the type correctly.
For example:
public static XmlDocument HelperMethod (XLANGMessage message)
{
var sourceType = (SourceType)message[0].RetrieveAs(typeof(SourceType));
var targetType = new TargetType();
// ... Do target type population and serialization to XmlDocument here
return targetAsXmlDoc;
}
It would be trivial to do this inside .net so just take it into .net and do it. Sorry to all the mapping gurus out there!
I have a method:
public static DataSet getTable()
{
DataSet DS = new DataSet("My Set");
DS.ReadXml(getCategories());
return DS;
}
My getCategories() returns a stream containing my XML.
But when I run this, I get this error:
The supplied xml instance is a schema or contains an inline schema. This class cannot infer a schema for a schema.
So I'm not sure what to do.
My goal is to use the call to getTable() to populate a DataList.
I've tried using the DataTable and I get a different, but similar error.
Any help would be great.
Thanks.
Here is my XML file. Might help. Thanks.
<?xml version="1.0" encoding="utf-8"?>
<WSPackage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
<ResponseInteger>0</ResponseInteger>
<ResponseBoolean>false</ResponseBoolean>
<ResponseDataset>
<xs:schema id="CategoryDS" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="CategoryDS" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Category">
<xs:complexType>
<xs:sequence>
<xs:element name="PartCategories" type="xs:string" minOccurs="0" />
<xs:element name="CategoryDescriptions" type="xs:string" minOccurs="0" />
<xs:element name="CategoryImageURLs" type="xs:string" minOccurs="0" />
<xs:element name="CategoryModelFlags" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<CategoryDS xmlns="">
<Category diffgr:id="Category1" msdata:rowOrder="0" diffgr:hasChanges="inserted">
<PartCategories>TESTCAT</PartCategories>
<CategoryDescriptions>TESTING API</CategoryDescriptions>
<CategoryImageURLs />
<CategoryModelFlags />
</Category>
</CategoryDS>
</diffgr:diffgram>
</ResponseDataset>
<ErrorMessage />
<UserMessage />
</WSPackage>
It is related to the fact that you have the following xml in there.. If you take that out it should work. it is not going to create a schema for something that already exists.
<xs:element name="Category">
<xs:complexType>
<xs:sequence>
<xs:element name="PartCategories" type="xs:string" minOccurs="0" />
<xs:element name="CategoryDescriptions" type="xs:string" minOccurs="0" />
<xs:element name="CategoryImageURLs" type="xs:string" minOccurs="0" />
<xs:element name="CategoryModelFlags" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
t