Link to home
Start Free TrialLog in
Avatar of lapucca
lapucca

asked on

Run time Errors when invoking a Java SOAP web service from a asp.net/C# applicaiton

I added in VS 2013 project using the Add Web Service for a Java SOAP API web service.  When I run my code to call one of the API mehtod, I got bunch of errors in the attached file.  Can someone help me on how to fix this?  Thank you.
Java-Soap-Web-Service-Error.txt
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

1) Is this running from a server or a local machine?

2) Do you need to generate an XmlSerializer?  This is a project property, that is Auto by default.

3) "A System.Web.HttpException was thrown: "Invalid file name for file monitoring: ''C:\Projects\XXXXXXXXXXXApi\YYYYYYYYYYYApi\Scripts'.:"

    Are you running on IIS?  If so, what identity are you using for the application pool?  Does the identity have access to that folder?
Avatar of lapucca
lapucca

ASKER

Hi,
The Java SOAP web service that I'm consuming is running on an Intranet web server which I think is Apache.  My application is still in development, running on my local PC, VS2013.

I didn't create a XmlSerializer, do I have to?  Do I need to if it's automatically done?  Attached is my code.  The error occurs inside the try when I called a method in the API.  

Thank you.
CALL-api.txt
Avatar of lapucca

ASKER

The only reference I've added is this Java SOAP web service that I added as "Web Service" under the Advanced button of Add Service Reference.   Intelllisense is able to detect all methods after I added "using" to include the reference and setup a proxy class.  
I dont' know where is this path that is hard coded or not that I'm supposed to fix.   I made sure all references are added, System.xxxxx.  I don't know why and where is this Scipts is being reference as a file when it's a folder under the project.  Also, the XmlSerializers error, I don't know why it's looking for that file either.  My code doesn't call for it.  If the web service is calling for it then I don't know how to fix that.

Could these errors  be caused because I'm using VS2013, .net framework 4.5?  When I added the web service under Advanced Compatibility,, it says "Add a Web Reference instead os a Service Reference.  This will generate code based on .NET Framework 2.0 Web Services technology"  Does that mean I need to develop in much lower version of .net framework like VS2013?

Thank you.
Avatar of lapucca

ASKER

for the 1st Scripts reference error, In VS debug, it stops and highlight the following code in the file BundleConfig.cs as the next statement to be executed.  I don't know anything about. this bundleconfig.cs  I think this file and the code in it auto generated.  How can I fix this?  Thank you.

// Use the Development version of Modernizr to develop with and learn from. Then, when you’re
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));

I'm attaching screen shots and code is as follow:
    public class BundleConfig
    {
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkID=303951
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/WebFormsJs").Include(
                            "~/Scripts/WebForms/WebForms.js",
                            "~/Scripts/WebForms/WebUIValidation.js",
                            "~/Scripts/WebForms/MenuStandards.js",
                            "~/Scripts/WebForms/Focus.js",
                            "~/Scripts/WebForms/GridView.js",
                            "~/Scripts/WebForms/DetailsView.js",
                            "~/Scripts/WebForms/TreeView.js",
                            "~/Scripts/WebForms/WebParts.js"));

            // Order is very important for these files to work, they have explicit dependencies
            bundles.Add(new ScriptBundle("~/bundles/MsAjaxJs").Include(
                    "~/Scripts/WebForms/MsAjax/MicrosoftAjax.js",
                    "~/Scripts/WebForms/MsAjax/MicrosoftAjaxApplicationServices.js",
                    "~/Scripts/WebForms/MsAjax/MicrosoftAjaxTimer.js",
                    "~/Scripts/WebForms/MsAjax/MicrosoftAjaxWebForms.js"));

            // Use the Development version of Modernizr to develop with and learn from. Then, when you’re
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                            "~/Scripts/modernizr-*"));

            ScriptManager.ScriptResourceMapping.AddDefinition(
                "respond",
                new ScriptResourceDefinition
                {
                    Path = "~/Scripts/respond.min.js",
                    DebugPath = "~/Scripts/respond.js",
                });
        }
    }

Open in new window

File-Monitor-error-1.jpg
File-Monitor-error-2.jpg
Avatar of lapucca

ASKER

p.s., I verified all files referenced in this file do exist in my  hard drive under the folder it references.
SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lapucca

ASKER

I believe the issues are with the vendor not having correct wsdl and the port is not opened.  thank you.