We are working on ASP.NET MVC application and are trying to consume a java web service but we are getting null response. We are not able to debug the JAVA web service.
We can access and get proper reponse from the same web service using SoapUI. Below are the error details of reponse (When tried with MVC application).
java.lang.IllegalArgumentException at PublishingService.convertData(Service.java:272): Expected rawData to be an instance of org.w3c.dom.Element but found – class java.lang.String
Can somebody please help on this ?
you should use a network tracer to get the soap body you are sending. the error means a node was string:
where an element was expected:
without the xsd and sample payloads when can not tell what you did wrong. you should fetch the xsd from the java web service, and compare your payload xml to find the error.
also what .net tool are you using to call the web service? did you add it as web reference? an issue you may run into is that java supports xsd’s with variants, but .net serialization does not. if the xsd has variants, you will need to write a custom soap
You’re not sending a response in the correct format. As we have no idea what the service expects and no idea what your code is sending it is impossible to give any specific advise. If you can get the request working using SoapUI then use a tool like fiddler
to see what your .net code is sending and compare the two to see what the difference is. From there you can try and amend your code so it sends the right thing. A likely problem is that you are not correctly serializing your parameters.