locked
Object reference Error while consuming webservice in BizTalk RRS feed

  • Question

  • I am getting error while consuming a webservice , the IDE is able to show me wsdl, but in the next step it throws object reference error, please see below pictures for the sequence 

    It was able locate webservice and pull wsdl from the service 

    Shows me where the xsd will be placed before generating the schemas, no error until this point

    Throws error in the final step.

    Note: I tested this webservice in c# windows app, it works fine by adding service reference 

    Please help, thanks in advance

    Regards

    Vivek

    Tuesday, September 1, 2015 4:45 PM

Answers

All replies

  • Check if all the elements have proper Namespace.

    Rahul

    Tuesday, September 1, 2015 5:02 PM
  • Hi Vivek,

    Please have a look into below article,

    http://blogs.msdn.com/b/kerreybpi/archive/2009/02/05/biztalk-error-wcf-service-consuming-wizard.aspx

    Export as described above with svcutil, then use your editor to add a targetNamespace attribute

      <types>
        <xsd:schema targetNamespace="xxxxx">
          <xsd:import schemaLocation="some.xsd" namespace="xxxxxx" />
        </xsd:schema>
      </types>

    Related thread;

    BizTalk 2010 Error consuming WCF service metadata. Object reference not set to an instance of an object.


    Thanks, If my reply is helpful please mark as answer or vote as helpful.



    Tuesday, September 1, 2015 5:03 PM
    Moderator
  • Hi Vivek,

    The wsdl file might be referring another xsd file which you have not selected in the wizard. In the browser it does not show up any error even if there is no .xsd file in the folder. 

    So try asking for the .xsd file and make sure it is on the same location as wsdl file. And wizard select both .xsd and .wsdl while consuming the web service.

    Cheers


    JB

    Tuesday, September 1, 2015 8:48 PM
  • Thanks Kamlesh. I marked your reply as answer.

    That worked for me and generated required schemas, orchestration and bindings.

    I have added something like targetNamespace=http://any. in <xsd:schema> nodes in WSDL file

    Will this create problem while receiving actual message from the service?

    Do I have to add custom pipeline to add the required namespace in order to receive this message inside BizTalk ?

    Regards

    Vivek

    Wednesday, September 2, 2015 10:24 AM