cancel
Showing results for 
Search instead for 
Did you mean: 

Webservice not accessible in dot net

Former Member
0 Kudos

Hi Friends,

I have developed a SAP webservice and created URLs for the web service. In DOT NET, this webservice is appearing as interface. But it should appear like a class so that we can create objects for the class. Using these objects, the web methods are accessible in dot net.

How to make webservice act like class rather than an interface.

Please guide me.

Thanks & Regards,

Murali Krishna . T

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Are you using wsdl which is implemented endpoint or just modeled. Please use wsdl with endpoint in it then it should not be a problem to create class in .Net.

Regards,

Gourav

Former Member
0 Kudos

Hi Gourav,

I have created URL binding which implemented endpoint. ( After creation of end point, url binding has been created). For this particular WSDL ( or URL) in .Net, class is not getting created. Instead the web service is displaying as interface.

Thanks,

Murali Krishna. T

Former Member
0 Kudos

Hi Gourav,

From your saying,

Are you using wsdl which is implemented endpoint or just modeled. Please use wsdl with endpoint in it then it should not be a problem to create class in .Net.

Is it right in soamanager, we create service/endpoint under configurations tab? And after creating service/endpoint, open WSDL document for selected binding?

If it is right, Iam going in the way you suggested. Iam also enclosing the code from .net. Please check this one.

This is the code from Development client ( Working properly)

    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.3053")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="zweb_rep_v60", Namespace="urn:sap-com:document:sap:rfc:functions")]

    public partial class zweb_rep_v60 : System.Web.Services.Protocols.SoapHttpClientProtocol {
        private System.Threading.SendOrPostCallback ZBANK_BOOKOperationCompleted;
        private System.Threading.SendOrPostCallback ZTRIALBALANCEOperationCompleted;

This is the code from Producton client ( Not Working )

    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(Namespace="urn:sap-com:document:sap:rfc:functions", ConfigurationName="WsReports.zweb_rep")]

    public interface zweb_rep {
        // CODEGEN: Generating message contract since the operation ZBANK_BOOK is neither RPC nor document wrapped.
        [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute()]
        SAPProductionInterface.WsReports.ZBANK_BOOKResponse1 ZBANK_BOOK(SAPProductionInterface.WsReports.ZBANK_BOOKRequest request);
        
        // CODEGEN: Generating message contract since the operation ZTRIALBALANCE is neither RPC nor document wrapped.
        [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute()]
        SAPProductionInterface.WsReports.ZTRIALBALANCEResponse1 ZTRIALBALANCE(SAPProductionInterface.WsReports.ZTRIALBALANCERequest request);

Please do the needful.

Thanking you

regards

Murali Krishna . T

Former Member
0 Kudos

It appears you are doing right but if you observe "Service Name" is different in development and production environment.

Can you just test this service in SOAPUI or any other soap testing tool just to be sure if service is correctly implemented.

My theory is that service is not correctly implemented and you are using incorrect wsdl to generate .Net class. I hope you are using wsdl url to generate class not the file.

Please try and come back.

Regards,

Gourav

Former Member
0 Kudos

Hi Murali,

Forgive my ignorance here & I'm making some assumptions. You're using exactly the same WSDL URL in .NET dev & .NET prod?

Or, on the SAP side you also transported the service all the way to SAP prod & you're now using the SAP prod WSDL URL in

.NET prod?

Either way though, the SAP WSDL should be identical & you also say that it's working fine in .NET dev but not in .NET prod so why would there be something wrong with the SAP WSDL? Surely it must be on the .NET side?

Don't know much about .NET but struggling to understand why is your code doing 2 different things in dev & prod? But I might be just totally mis-reading this.

If you're still struggling though, and depending on upi SAP version/s, maybe you could try the SAP Enterprise Services explorer for .NET (although it looks like you would need to publish your service into the SAP Service Registry first):

[http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/11667] [original link is broken] [original link is broken] [original link is broken];

Regards, Trevor

Edited by: Trevor Naidoo on Aug 18, 2010 1:47 PM

Former Member
0 Kudos

Thanks Gourav and Trevor,

Iam also trying from my side. And I will get back to you.

Regards,

Murali Krishna . T

Former Member
0 Kudos

Hi Gourav,

It appears you are doing right but if you observe "Service Name" is different in development and production environment.

Can you just test this service in SOAPUI or any other soap testing tool just to be sure if service is correctly implemented.

As you said, I have tested the Production Webservice in the SOAPUI testing tool. It has thrown an error saying ---

" SoapUIException : Error importing wsdl ". But the same webservice of the development server when tested with SOAPUI testing tool, It has displayed all the methods included in the web service.

Former Member
0 Kudos

Hi,

My doubts are correct. Service is not correctly implemented or you are using wrong wsdl.

I hope you followed following steps:

1. Test service in Dev

2. Transport service from Dev to Prod

3. Tcode SOAMANAGER on Prod

4. Configure service and create endpoint on Prod

5. Test binding on Prod

6. Check if service is active in SCIF transaction on Prod.

Please recheck everything and if required delete service and endpoint and create them again.

Regards,

Gourav

Former Member
0 Kudos

Hi Gourav,

Can you just test this service in SOAPUI or any other soap testing tool just to be sure if service is correctly implemented.

Once again I have checked the production WSDL with the SOAP Testing tool. It worked fine with SOAP Testing tool.

Iam unable to track exactly where the problem could be. In SAP or .net?

Thanks & Regards,

Murali Krishna .T

Former Member
0 Kudos

Hi Gourav,

After testing the production web service with SOAP Testing tool which has worked well, we came to conclusion that the problem would be at the .net side. The .net people struggled on this one and got the problem solved.

So, Finally the problem is with .net.

Thanks & Regards

Murali Krishna. T

Former Member
0 Kudos

Hi Trevor,

As you said, the problem is with the .Net As Gourav said, we tested the service in SOAP Testing tool and came to conclusion that the problem is on .net side. And finally the problem has been solved.

Thanks & Regards,

Murali Krishna . T

avishek_gorai2
Participant
0 Kudos

Hi Murali,

Please export the WSDL of the Web Service and use Visual Studio command line tool (WSDL.exe) to create a proxy for the Web Service. This will create the proxy classes as a .CS file which you can add to your project and instantiate the classes.

Please search MSDN for the WSDL tool.

Regards,

Avsihek.

Former Member
0 Kudos

Hi Murthy and Avishek,

Thanks for your replies.

At the other end (i.e, in .net ) they are doing the same as you suggested ( like creating proxy client, e.t.c)

But still the webservice is appearing like an interface.

In Development, the webservice is acting like class. But this is not the case in Production.

Thanks

Murali Krishna .T

Former Member
0 Kudos

Hi Murthy and Avishek,

Thanks for your replies.

At the other end (i.e, in .net ) they are doing the same as you suggested ( like creating proxy client, e.t.c)

But still the webservice is appearing like an interface.

In Development, the webservice is acting like class. But this is not the case in Production.

Thanks

Murali Krishna .T

Former Member
0 Kudos

Hi,

Can you please clear me whether we need to create client proxy in SAP or .Net environment?

And also can you suggest me the link where we get the detailed notes on client proxy.

Thanks,

Murali Krishna. T

moorthy
Active Contributor
0 Kudos

Hi,

I assume , you are consuming the services which you have published from SAP. For this, create a Proxy client and then call from your main application. So first step is to import the wsdl & create a proxy which in turn will provide you the classes

Some of the help files: ignore, if you would have already seen

http://help.sap.com/saphelp_srm40/helpdata/en/2d/64d01de74911d6b2e400508b6b8a93/content.htm

For ES:

http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/905c28e4-38a9-2910-4db5-d39e4fcbf...

Regards, Moorthy