1
votes

I have a reference to a web service written in java. I need to use it in my BizTalk project. So I add the reference via Add Service Reference - Advanced - Add Web Reference since java web service is not a WCF service. OK, VS generates for me XSDs and ODX for the service. But when I try to compile the project, I get very weird error "Missing partial modifier on declaration of type XXX; another partial declaration of this type exists". The same error is described here.

I thought that I'd missed something so I created a brand new solution, added there a Console Application, added the web reference and that solution builded successfully. Thus I can conclude that I get the error only if I add a web service reference in BizTalk solution.

I tried to fix the error manually, opened the Reference.map.cs file, added ".Biztalk" suffix to the generated namespace and everything compiled successfully. Is it really a bug in code generator for BizTalk project or am I missing something?

1
Have you tried creating a brand new BizTalk project and solution and add the web reference again? - Fabio
@Fabio, of course I have. The same results. I suspected that Java web service was incorrectly implemented but after I'd created a console application I made a conlusion that it is biztalk code generator that fails to create right files. - javros

1 Answers

0
votes

Not sure, I have never seen that error...

However, what I would do is create a class library project and add the web reference here. You can then use this in the SOAP send port, as described here (see point #5). You can also reference the class library in your BizTalk project directly. Since you said that the web reference works in a Console application, perhaps this could work...

Also, you could use the XSD schemas directly - but this will require more work. You will have to promote a couple of properties manually in an orchestration or custom pipeline component. You can find more details on this post (website is currently down, but hopefully will be back online eventually).

Finally, you could also try the WCF adapter, using the httpBinding. That's designed for interop and should work as long as you have the schemas to define the messages.

Good luck!