none
Oracle Adapter : There is an error in XML document (1, 40) RRS feed

  • Question

  • I had developed an application which requests for data from an Oracle Database according to the search criteria , everything works fine as I check the Orchestration debugger  the search result return from the database successfully , but the error occurred in the web service that generated by the BizTalk. You can download from here

     

    Detailed Error :

      
    A response message sent to adapter "SOAP" on receive port "WebPort_OracleAdapter_Proxy/OracleAdapter_OracleOrchesteration_rcvRequest" with URI "/OracleAdapter_Proxy/OracleAdapter_OracleOrchesteration_rcvRequest.asmx" is suspended.
    Error details: There is an error in XML document (1, 40).
    MessageId: {F231205A-68A4-45D7-9D3A-33CAF2D5889F}
    InstanceID: {B77F31E2-D2D8-4D12-9768-A5B97938E20B}
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp

     

    Operating System: windows 2003

    Microsoft BizTalk Server 2006

    Oracle Client version : 10.2.0

     

    Wednesday, February 6, 2008 2:44 PM

Answers

  • This problem is coming up because the URI that is generated by the adapter is rejected by the SOAP adapter.

    like if the URI for the targetNamespace is something below, it is not valid URI for SOAP adapter:
    "http://schemas.microsoft.com/[OracleDb://MSADAPTER/SCOTT/Tables/MYTEST]"

    In this case the work around is change the URI within the Orchestration so that it is a valid URI for the webservice.

    Special characters "[" must be replaced with '%' followed by their ISO hex representation. Also I am not sure about the "://" string appearing two times in the same string. Here is a valid URI format as per the XML rfc
    http://www.rfc-editor.org/rfc/rfc3986.txt.

     

    Or else if we do not want to change the schema to be sent to the Oracle adapter there is another workaround where in we need to use Transform in the orchestration.

    1. For this create a new schema similar to the one generated by Oracle and change it to a different target name space without any special characters, something like this "http://schemas.microsoft.com/OracleDb/MSADAPTER/SCOTT/Tables/MYTEST"

    2. Then create a map whose source schema points to the one given by Oracle and destination schema corresponds to the one you created in step 1. And correspond the elements of source to destination.

    3. Add a Transform(making use of the above Map) in the orchestration before sending it to the SOAP.

     

    Will update you if i get to have any other solution.

    Thanks,

    Sanjay

     

     

     

    Friday, February 15, 2008 1:47 PM

All replies

  • Could you please share the eventlog and description of the orchestration you are using along with the input xml you used in case of without webservice and also please confirm if you are using any custom pipeline in the orchestration.

     

    Thanks,

    Sanjay

     

     

     

     

    Tuesday, February 12, 2008 3:07 PM
    • By the way the error that I had submitted is the eventlog
    • the input schema is as :

    Code Snippet

    <?xml version="1.0" encoding="utf-16" ?>

     <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://SQLOrchesteration.InputSchema" targetNamespace="http://SQLOrchesteration.InputSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
     <xs:element name="InputSchema">
        <xs:complexType>
    <xs:sequence>
      <xs:element name="CustomerID" type="xs:string" />
    </xs:sequence>
             </xs:complexType>
         </xs:element>
        </xs:schema>

     

     

    • And there is no Custom Pipline , am using the XMLTransmit and XMLReceive , by the way I had tested this application using files way (File Adapter) , it works successfuly without any exception
    Wednesday, February 13, 2008 10:47 AM
  • This problem is coming up because the URI that is generated by the adapter is rejected by the SOAP adapter.

    like if the URI for the targetNamespace is something below, it is not valid URI for SOAP adapter:
    "http://schemas.microsoft.com/[OracleDb://MSADAPTER/SCOTT/Tables/MYTEST]"

    In this case the work around is change the URI within the Orchestration so that it is a valid URI for the webservice.

    Special characters "[" must be replaced with '%' followed by their ISO hex representation. Also I am not sure about the "://" string appearing two times in the same string. Here is a valid URI format as per the XML rfc
    http://www.rfc-editor.org/rfc/rfc3986.txt.

     

    Or else if we do not want to change the schema to be sent to the Oracle adapter there is another workaround where in we need to use Transform in the orchestration.

    1. For this create a new schema similar to the one generated by Oracle and change it to a different target name space without any special characters, something like this "http://schemas.microsoft.com/OracleDb/MSADAPTER/SCOTT/Tables/MYTEST"

    2. Then create a map whose source schema points to the one given by Oracle and destination schema corresponds to the one you created in step 1. And correspond the elements of source to destination.

    3. Add a Transform(making use of the above Map) in the orchestration before sending it to the SOAP.

     

    Will update you if i get to have any other solution.

    Thanks,

    Sanjay

     

     

     

    Friday, February 15, 2008 1:47 PM
  • Sanjay-

    • I did the first solution about replacing the special characters with '%' followed by the hex of the special character the following error occurred :

    Invalid target: Query@%5BOracleDb/farsiii/FARSI/Tables/CUSTOMER%5D

     

    Error transmitting message: <SOAP-ENV:Fault xmlnsTongue TiedOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>SOAP-ENV:Client</faultcode><faultstring>Request ID: Unknown

    Exception Type: The method does not exist

    Exception Info:

    Exception occurred:

    Invalid target: Query@%5BOracleDb/farsiii/FARSI/Tables/CUSTOMER%5D</faultstring></SOAP-ENV:Fault>

     

    • And Also the did the second one the error "There is an error in XML document (1, 40)" occurred
    Sunday, February 17, 2008 3:49 PM
  • I could able to correct the problem by following the second workaround.

    Follow the following steps clearly for second workaround:

    1. Revert back the orchestration to the one you have in case of file adapter(File way instead of SOAP adapter).

    2. Create a new schema similar to the one generated by Oracle adapter, and then edit the target namespace with a uri which do not have any special characters.

    2. Then create a map whose source schema points to the one given by Oracle and destination schema corresponds to the one you created in step 1. And correspond the elements of source to destination.

    3. Add a Transform(making use of the above Map) in the orchestration before sending it to the SOAP.

    4. Make sure you build the solution with the above new orchestration and deploy the solution.

    5 Publish the webservice with this new orchestration.While publishing webservice make sure you check the "Overwrite existing project" check box if you want to use the same old webservice in step 6.

    (Note: Step.4 is important one, i guess you might have missed this step, With old webservice i am refering to the one with which you are getting the error,by new webservice i refer to the one you create newly with Transform in the orchestration).

    6 Use the Webservice created in step 5 in your application.

     

    Thanks,

    Sanjay

    Monday, February 18, 2008 1:56 PM
  •  

    Step 4 and Step 5 in the above thread are very important. Please make sure you are doing it correctly.

    That is you are building and deploying the new orchestration and publishing the webservice with this new orchestration only and making use of the new webservice only(If by chance if you are having reference of old webservice i.e, the one with which you got the error, delete it and then add the web reference of the newly published web service and test it).

     

    It is working fine without any errors for me after doing the above steps.

    Thanks,

    Sanjay.

    Monday, February 18, 2008 2:03 PM
  • I know that I must do this steps Sanjay, but any way I will do it again .

    What about the first Solution ! do you have any suggestion ?

    Monday, February 18, 2008 2:08 PM
  • The first work around is having some problem(giving the errors which you mentioned), however the second work around is working fine without any errors.

     

    Thanks,

    Sanjay

     

    Tuesday, February 19, 2008 12:15 PM
  • Thank you Sanjay for your help

    Tuesday, February 19, 2008 2:05 PM