Calling method from SOAP returns null

768 Views Asked by At

i have C# Console App where i am going to connect soap service. I used many different type of soap services in this project with successfully. But last one, yesterday one another company send us a new SOAP service.

  1. I connected using SOAP UI. Result is returning successfully.
  2. I tried to add it to JAVA project created on NetBeans. It says: parsing WSDL... [ERROR] invalid extension element: "wsdlsoap:body" (in namespace http://schemas.xmlsoap.org/wsdl/soap/")
  3. Last i have tried, to connect it with C#. In Visual studio as usually i added service reference. Client created. But result is null;

I will give you more detail information about last section(section 3).

  • I have successfully created ServiceClient
  • I am calling it with such way:

    var client = new WebToCFTPortClient();
    var res = client.getXXXListByID(ref system, data);
    //res and system variables now is null 
    
  • So i added Behaviors to client's Endpoint to see what is sending and what is receiving. I see that sent correct XML, because i took it and pasted to SOAP UI and it gave normal result. And Received XML is correct to. So as you see result as XML receiving correctly, but client can not parse it to class that came from imported service.

UPDATE I tried other way. i am generating XML and send it to service with HttpWebRequest. And it is working. Yes it is hard to generate and then parse XML result to object. But i want to choose this way. What do you think?

0

There are 0 best solutions below