Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Subject: No namespace in incomming XML document
- This topic has 5 replies, 1 voice, and was last updated 9 years, 2 months ago by
community-content.
-
AuthorPosts
-
-
November 30, 2006 at 12:22 AM #16617
We want to receive cXML Documents with BizTalk. Unfortunately the documents
generated by the Ariba test client do not have a namespace and looks like
this:<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.1.008/cXML.dtd"%5B%5D>
<cXML version="1.0" timestamp="2006-11-28T17:59" payloadID="2006-11-28T17:[email protected]">
<Header> …I have now the problem that I encounter a receive error because BizTalk can
not find a subscriber. The message in the eventlog is the following.A message received by adapter "FILE" on receive location
"ReceiveFolderForCXMLOrders" with URI "\\Srvdevweb01\PunchOutOrders\*.xml" is
suspended.
Error details: The published message could not be routed because no
subscribers were found…I use a XMLReceive pipeline.
Some advise how I can receave such cXML Orders that do not have a namespace
declaration?Thanks Tom
-
November 30, 2006 at 1:16 AM #16620
Hm, interesting. I will test this case this evening and will post the result tomorrow. If found a solution.
Does the namespace has to do something with the subscribers? Hm
-
November 30, 2006 at 1:37 AM #16621
The error message indicates that the message has arrived at the message box, where there are no send ports or orchestrations subscribing to this message.
The pipeline has been completed, so the Xml Disassembler would have found a matching schema and assigned a message type to the message. This is where the namespace is used. It is quite valid to have a schema without a target namespace. And the fact that you are past the Xml Disassembler means it is not the lack of a namespace that is causing the problem
Are you able to view the subscriptions and also the message context of the failing message.
Are you routing on something other than message type and receive port. i.e. do you promote data from the cXml Header and use filters on an orchestration receive shape or send port?Is your orchestration/send port enlisted and started.
An easy test is to create a send port using the file adapter and set a filter of BTS.ReceivePortName = "your receive port name". Do you get a file created in the ouput directory
-
November 30, 2006 at 5:44 AM #16628
Thanks for the reply
When I test the orchestration using an order that has the default namespace declared the message is processed.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.1.008/cXML.dtd"[]>
<cXML version="1.0" timestamp="2006-11-28T17:59" payloadID="2006-11-28T17:[email protected]" xmlns="http://www.iba.ch/cxml">
<Header> …In the cXML schema I have defined a target namespace because I think the schema has to have a targetnamespace for working properly in BizTalk:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:ns0="http://www.iba.ch/cxml" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.iba.ch/cxml" elementFormDefault="qualified">
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<xs:annotation>
<xs:appinfo>
<references xmlns="http://schemas.microsoft.com/BizTalk/2003">
<reference targetNamespace="http://www.w3.org/XML/1998/namespace"/>
</references>
</xs:appinfo>
</xs:annotation>
<xs:element name="Name">So the message with the namespace is mapped to the message of type http://www.iba.ch/cxml#cXML which is processed by the orcetration.
The message without the namespace is mapped to the message of type cXML which is not processed.
So my question. How has the schema an the BizTalk message to be defined to be able to process a message without the namespace declaration?
Thanks Tom
-
November 30, 2006 at 5:56 AM #16629
Thanks for the reply!
When I use a message that have the namespace defined the mesage is processed:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.1.008/cXML.dtd"[]>
<cXML version="1.0" timestamp="2006-11-28T17:59" payloadID="2006-11-28T17:[email protected]" xmlns="http://www.iba.ch/cxml">
<Header>In the schema I have defined a targetnamespace so BizTalk can process the schema:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:ns0="http://www.iba.ch/cxml" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.iba.ch/cxml" elementFormDefault="qualified">
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<xs:annotation>
<xs:appinfo>
<references xmlns="http://schemas.microsoft.com/BizTalk/2003">
<reference targetNamespace="http://www.w3.org/XML/1998/namespace"/>
</references>
</xs:appinfo>
</xs:annotation>
<xs:element name="Name">…The message with the defined namespace maps to the message type http://www.iba.ch/cxml#cXML. The message without the namespace definition maps to the message type cXML.
So my question: is it possible to define a schema and a mesage based on this schama tha has no targetnamespace? What I have to define so that a message without a namespace can be processed by an orchestration?
Thanks Tom
-
December 1, 2006 at 2:12 PM #16661
It sounds like you have two schemas deployed, one with a namespace and one without.
A message arriving with a namepsace gets a message type of http://www.iba.ch/cxml#cXML. A message arriving without a namespace gets a message type of #cXML.
The orchestration is subscribing to a message type of http://www.iba.ch/cxml#cXML and will not process any other message type.
If you wish to use messages without the namespace you will need to change the message type definition in the orchestration. The message that is received by the activation receive shape needs to use the schema without a namespace.
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.