Object reference Error while consuming webservice in BizTalk

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

September 1st, 2015 12:48pm

Check if all the elements have proper Namespace.

Rahul

Free Windows Admin Tool Kit Click here and download it now
September 1st, 2015 1:06pm

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

September 1st, 2015 1:07pm

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

Free Windows Admin Tool Kit Click here and download it now
September 1st, 2015 4:52pm

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

September 2nd, 2015 6:26am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics