cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Web Services in ASP.net......

Former Member
0 Kudos

How do you make a SAP Web Service consumable in ASP.net C#?

We've in the process of trying to convert a lot of our function modules to Web Services but are having issues on the front end when trying to consume the web service in say Visual Studio. When I try to add a Web Reference with the URL provided by the SAP Web Service, all that is showing is the documentation for the created Web Service.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Anyone ever done anything to this nature?

michael_hobbins
Active Participant
0 Kudos

Hello,

we're working on exactly the same issue, and have successfully connected a C# web application to a webservice (extended from a Z function module -RFC-).

When I add a webreference (using the URL provided by SAP), I get the specification (simple view) -[see printscreen|http://www2.um.edu.uy/mhobbins/sdn_forums/webreference1.jpg]- and have no problems to create variables of that "type" to use.

Can you send or publish a printscreen of what your're getting?

Regards

Michael

Former Member
0 Kudos

Looks like you've done better than I have.

When I insert the URL to our sever it just comes up as a document and not a usable method like your shows in the "Web service found at this URL."

I'm not sure what we are donig wrong to not have it as a usable web service.

Screenshot --> http://farm3.static.flickr.com/2765/4090506536_3e161fac7e_o.jpg

Edited by: VatHB on Nov 9, 2009 1:54 PM

michael_hobbins
Active Participant
0 Kudos

Definitely strange!

We have a couple of subtle differences on the URLs. Yours mentions "wsdl" (which is the webservices' description) and "sdef_" as prefix of the Z funtion module but not mine, compare:

Just checked webservices's config in SAP and Tx SICF, and the only URL I can get is the one I mentioned, there's nothing similar to yours.

What version of ECC and Visual Studio do you have? (I'm using ECC 6.00 and VS2005)

Regards

Michael

Former Member
0 Kudos

Hmmmmmmmm, that is odd.

What we do is just right click the function module we want to convert to a web service and follow the tutorial and that's the url we get in the wsdl document or how we learned it at TechED.

We are using ECC 6.0 and I'm on VS2005.

**Edited...........

I think you may have solved my problem. I see your not pulling the URL from the SOA manager instead your pulling it straight from the SICF directory. That's what our problem is. Thanks for the help man!!!!

Edited by: VatHB on Nov 9, 2009 3:25 PM

michael_hobbins
Active Participant
0 Kudos

I worked it out with [https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/4348] [original link is broken] [original link is broken] [original link is broken];. Although it's meant for a webdynpro, steps 1 to 4 are the same, and step 5 is substituted with the adding webreference procedure you're failing to pass at this moment.

Hope it helps

Michael

Former Member
0 Kudos

When you added the Web Service, did it create a object in your project so it can contain intellisense?

michael_hobbins
Active Participant
0 Kudos

Yes, but that's a VS issue no an SAP one. Once it reads the WSDL, it'll be able to automatically show methods/properties/etc.

Michael

Former Member
0 Kudos

That's where I'm at a roadblock now is once I add the reference it's not creating the methods from the wsdl like it should.

Do I just need to recreate the service using the tutorial you provided?

michael_hobbins
Active Participant
0 Kudos

I think it's a good move. Though I'm sure how to delete an existing webservice created starting from a function module.

If you goto Tx SICF and find the service, you can right click it and delete it, but I don't know if that's all you need to start again. Give it a try if you don't find a proper procedure.

Michael

Former Member
0 Kudos

Well we've created this service twice so I'm nost sure why when it's reading the wsdl it's not creating the correct methods in the .cs code behind file.

This is all I have in my code behind:

//----


// <auto-generated>

// This code was generated by a tool.

// Runtime Version:2.0.50727.3082

//

// Changes to this file may cause incorrect behavior and will be lost if

// the code is regenerated.

// </auto-generated>

//----


//

// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.3082.

//

#pragma warning disable 1591

namespace ******.UpsRates {

}

#pragma warning restore 1591

Edited by: VatHB on Nov 9, 2009 3:55 PM

michael_hobbins
Active Participant
0 Kudos

My .CS is quite different to your, it has a simple reference to te webservice

uy.edu.um.interno.sapdev02.ZCM_OBTENER_CEDULA_DE_USUARIOService dev02 = new uy.edu.um.interno.sapdev02.ZCM_OBTENER_CEDULA_DE_USUARIOService();

and the webservice is detailed on two files the webreference wizard created:

  • ZCM_OBTENER_CEDULA_DE_USUARIO.discomap

  • ZCM_OBTENER_CEDULA_DE_USUARIO.wsdl

(both XML files)

Pls check this [video (5MB: AVI file + player)|http://www2.um.edu.uy/mhobbins/sdn_forums/webservice.zip] with the steps I do to get my SAP webservice available from ASP.NET/C# to see if you're on the same track

Cheers

Michael

Former Member
0 Kudos

Hmmmmmm. Mine only created the .wsdl and .map. It didn't create the disco as you stated it did for you.

michael_hobbins
Active Participant
0 Kudos

mmmm, I'm no expert on asp.net, can't tell you why we get different behaviours. Were you able to see the video?

Former Member
0 Kudos

Yes I was able to see your video.

Former Member
0 Kudos

Ok, I see the problem.

When I try to add my service it still tries to bring it up as Documentation and not as a method. See screenshot:

http://farm3.static.flickr.com/2672/4092394593_b6dbbc51e2_o.jpg

michael_hobbins
Active Participant
0 Kudos

The screenshot seems OK to me. Add it, and the on load (or some other event), try to reference the webservice ( I'm guessing the following code, but it should be something near it )

local.hb.onebase.z_ups_rates_svcService aux1 = new local.hb.onebase.z_ups_rates_svcService();

Former Member
0 Kudos

I've added the service but no luck. When I try to complie I get a error because it doesn't recognize the service.........

michael_hobbins
Active Participant
0 Kudos

have you tried re-creating the webservice following the link I used?(https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/4348. [original link is broken] [original link is broken] [original link is broken])

Former Member
0 Kudos

Yeah I followed your guide and still no luck.

Former Member
0 Kudos

Bringing this back to life.........

What is in your code behind after you have added the web service? Mine has nothing in it other than what looks like errors:

#pragma warning disable 1591

namespace CPSIA_Dev.zdelvryinfo {

}

#pragma warning restore 1591

Answers (1)

Answers (1)

Former Member
0 Kudos

Found out the solution provided still isn't working.

michael_hobbins
Active Participant
0 Kudos

Hello,

there's no code added on the CS file. I have the webservice reference visible on the Solution Explorer window, and a reference to it on web.config

	<appSettings>
	<add key="sapprd02.ZCM_OBTENER_CEDULA_DE_USUARIO" value="http://sapprd02.interno.um.edu.uy:1080/sap/bc/srt/rfc/sap/ZCM_OBTENER_CEDULA_DE_USUARIO?sap-client=100"/>
	</appSettings>

You can see it your self on the video I posted

Michael

Former Member
0 Kudos

Interesting. Mine never made that reference in the web.config.

michael_hobbins
Active Participant
0 Kudos

Checking things all over again, one of the differences I see is the structure of the URL of our webservices. Mine is http://<SERVER>:1080/sap/bc/srt/rfc/sap/<SERVICE>?sap-client=100, while your is http://<SERVER>/sap/bc/srt/rfc/sap/z_ups_rates_svc/160/z_ups_rates?wsdl=1.1

What's your ERP/ECC version? I have ECC 6.0 (without EHPs installed yet)

What's you Visual Studio .NET version? I have VS 2005, version 8.0.50727.42 (Professional Edition)

Can't figure out what the problem could be

michael_hobbins
Active Participant
0 Kudos
Former Member
0 Kudos

What does the structure of that web service look like in "SICF"?

michael_hobbins
Active Participant
0 Kudos

[http://www2.um.edu.uy/mhobbins/sdn_forums/sicf.JPG]

Former Member
michael_hobbins
Active Participant
0 Kudos

How did you create your webservice? I did it (and it's the only way I know how to) from Tx SE80, right-clicking on the RFC we developed and starting the webservice wizard. This will create (automatically) the entry on SICF.

Edited by: Michael Hobbins on Jan 20, 2010 4:05 PM

Former Member
0 Kudos

That's how we created our's also.

Not sure why there is such a difference. We are also on ECC 6.0 with no EHP installed.

VS: 8.0.50727.762

Former Member
0 Kudos

This is weird, I guess I must have a bad version of VS05 because I tried it on a co-workers PC who has VS08 and there is a new option called "Service Reference." We plugged the web service URL into that and it worked. It was able to pull the method with all the parameters.

Looks like I might need to update my software.

michael_hobbins
Active Participant
0 Kudos

That's good news. Remember we're using VS2005 and it's working fine. It seems there's some weird config in your VS2005

Cheers

Former Member
0 Kudos

Well I ended up installing the VS 2010 Beta and it worked.

Now my question is how are the classes / interfaces in the "intellisense" generated? Also how do you actually use the Service now that it's in your project?

I know in the SAP side you send it the required parameters and then it exports out your request to you.

Thanks for the help.

michael_hobbins
Active Participant
0 Kudos

Check the [video|http://www2.um.edu.uy/mhobbins/sdn_forums/webservice.zip] again to see how to use the webservice

I guess the intellisence service reads the webservice spec and adds the properties/methods/etc to the list of options it shows.

Former Member
0 Kudos

I've made a reference to it.

I'm just not sure how to use the classes to pass things to it to get a response back. maybe it still isn't setup right because I don't have a discomap file.

michael_hobbins
Active Participant
0 Kudos

Is your co-worker getting the discomap file created?

Former Member
0 Kudos

I can't remember exactly but I don't recall seeing it.

Can you give me screenshots of how you manage your services? Do you use SOAMANAGER?

Edited by: VatHB on Jan 21, 2010 11:26 AM

michael_hobbins
Active Participant
0 Kudos

I guess the WSDL file should be enough fo Intellisense to gather needed info. Do you have it on your Solution Explorer Window? It's a XML file

Check your Intellisense config at [http://msdn.microsoft.com/en-us/library/ecfczya1(VS.71).aspx]

Edited by: Michael Hobbins on Jan 21, 2010 2:36 PM

Former Member
0 Kudos

So you just used this documenation (/people/sridhar.k2/blog/2006/09/12/creating-and-exposing-bapi-as-web-service-and-using-it-in-web-dynpro) to create you web service?

Was there anything else you had to do to the RFC? Like create a proxy? Then create the service?

Former Member
0 Kudos

Can you show me how you called the methods from the serivce? Also how you passed the varibles the RFC requires, how to execute it after the values have been passed and get the data back?

michael_hobbins
Active Participant
0 Kudos

Here goes simple example. The RFC has two import variables (strings both) and three export variables (strings all). No tables or excepctions are used. When I invoke the ws, the 2 imports are the first and second paramaters passed, the second and third exports are the third and fourth variables passes (with "out" indicating "export") and the value returned by the ws is the first export (the code will help you visualize it)

   protected void Button1_Click(object sender, EventArgs e)
    {
        sapdev02.ZCM_OBTENER_CEDULA_DE_USUARIOService ws = new sapdev02.ZCM_OBTENER_CEDULA_DE_USUARIOService();
        string export1, export2, export3;
        string import1, import2;

        import1 = "ST";
        import2 = "MMONESTIER";

        export1 = ws.ZCM_OBTENER_CEDULA_DE_USUARIO(import1, import2, out export2, out export3);
        lblCedula.Text = export1;
        lblCC.Text = export2;
        lblText.Text = export3;

    } 

We're actualy working on another RFC which will return 2 tables with data, we'll work on it tomorrow morning. If you'll be working with tables on your RFCs, you'll have to wait a couple of days for a sample

Former Member
0 Kudos

Is it possible for you to do another video for me of you adding the service and then adding it to your code behind?

I'm trying to see what your "intellisense" pulls up. Mine won't pull the method that is shown for some reason but it gives me other which isn't what I need.

michael_hobbins
Active Participant
0 Kudos

Video ready ([click here|http://www2.um.edu.uy/mhobbins/sdn_forums/sap_ws.zip] / 13MB)

Remember, our RFC is named ZCM_OBTENER_CEDULA_DE_USUARIO, and you'll se that the service on SICF has the same name, and the method used to call the service will be exactly the same.

Note: at SICF I inserted logon data for the service (soble click the service and click en the logon tab to insert data)

Cheers

Edited by: Michael Hobbins on Jan 22, 2010 9:27 AM

Former Member
0 Kudos

Thanks Michael for all your help.

I'll take a look at the video and see if I can figure out what our problem is.

michael_hobbins
Active Participant
0 Kudos

OK, hope you can solve this issue.

BTW, I've managed to read data received on a table (an RFC table) after some googlin', and try'n error activity. I need to be able to send data back and forth in the tables (ie: send data in the tables from the web to SAP). As soon as II figure out all the picture, I'll post code sample for you.

Former Member
0 Kudos

Cool, keep me updated when you figure it out.

After looking at your video I did find something that was in my WSDL document that isn't in yours.

As you can see in the picture below, there is a area defined as "documentation." I'm not sure why that was generate and believe that is what's cuasing the problems.

http://farm5.static.flickr.com/4056/4294707459_a19d39797e_o.jpg

Former Member
0 Kudos

double post............

Edited by: VatHB on Jan 22, 2010 8:38 AM

Former Member
0 Kudos

Cool, keep me updated when you figure it out.

After looking at your video I did find something that was in my WSDL document that isn't in yours.

As you can see in the picture below, there is a area defined as "documentation." I'm not sure why that was generate and believe that is what's cuasing the problems.

http://farm5.static.flickr.com/4056/4294707459_a19d39797e_o.jpg

Can you do a video of you setting up the "Service?" I think that is where our problem lies is setting up the service correctly in SAP.

Edited by: VatHB on Jan 22, 2010 8:34 AM

Former Member
0 Kudos

I have the same problem.

I can't create a web reference to a SAP webservice bcause VS don´t create the methods. Just the namespace is created.

If you need more information you can ask to me.

Thank you very much.

Former Member
0 Kudos

Yeah, I can't get it to work properly.

Hopefully Michael can respond to my last post and give us a solution.

Former Member
0 Kudos

Yes it would be great.

At services configuration, (executing SICF, not SOAMANAGER). My Web services are at path

(/sap/bc/srt/rfc/sap/zws_consulta_parte/001/zws_consulta_parte/) which zws_consulta_parte is my WS.

On right click menu I select "Test Service". And this is the XML information that appears at browser (I put bold text at some lines, I think this lines show some kind of configuration error):

<soap-env:Envelope>

<soap-env:Header/>

u2212

<soap-env:Body>

u2212

<soap-env:Fault>

<faultcode>soap-env:Server</faultcode>

u2212

<faultstring xml:lang="en">

SRT: Wrong Content-Type and empty HTTP-Body received: ("HTTP Code 200 : OK")

</faultstring>

u2212

<detail>

u2212

<ns:SystemFault>

<Host>undefined</Host>

<Component>COREMSG</Component>

u2212

<ChainedException>

<Exception_Name>CX_SOAP_CORE</Exception_Name>

u2212

<Exception_Text>

SRT: Wrong Content-Type and empty HTTP-Body received: ("HTTP Code 200 : OK")

</Exception_Text>

</ChainedException>

</ns:SystemFault>

u2212

<ns:SystemFault>

<Host>undefined</Host>

<Component>COREMSG</Component>

u2212

<ChainedException asx:root="asx:abap" version="1.0">

u2212

<asx:values>

<EXCEPTION href="#o176"/>

</asx:values>

u2212

<asx:heap>

u2212

<cls:CX_SOAP_CORE id="o176">

u2212

<CX_ROOT>

<TEXTID>0018FE864EEE1DECA69CF9C71ACB337F</TEXTID>

<PREVIOUS/>

<KERNEL_ERRID/>

u2212

<INTERNAL_SOURCE_POS>

<PROGID>99</PROGID>

<CONTID>1077</CONTID>

</INTERNAL_SOURCE_POS>

</CX_ROOT>

<CX_NO_CHECK/>

u2212

<CX_SOAP_CORE>

u2212

<E_LOCATION>

<CLASS>CL_SOAP_HTTP_TPBND_ROOT</CLASS>

<METHOD>get_http_headers</METHOD>

<ID>3</ID>

</E_LOCATION>

u2212

<E_TEXT>

SRT: Wrong Content-Type and empty HTTP-Body received: ("HTTP Code 200 : OK")

</E_TEXT>

<E_ID>1032</E_ID>

<E_FAULT_LOCATION>1</E_FAULT_LOCATION>

<E_AREA>COREMSG</E_AREA>

<E_HOST>0</E_HOST>

<E_PROCESS_CONTROL/>

</CX_SOAP_CORE>

</cls:CX_SOAP_CORE>

</asx:heap>

</ChainedException>

</ns:SystemFault>

</detail>

</soap-env:Fault>

</soap-env:Body>

</soap-env:Envelope>

Former Member
0 Kudos

Try to test it from the initial "zws_consulta_parte" instead of the very last one in the directory.

Make sure the end of the URL has "&wsdl=1.1"

Former Member
0 Kudos

Ok,

the complete URL is

http://<server>:8000/sap/bc/srt/rfc/sap/zws_consulta_parte/001/zws_consulta_parte/zws_consulta_parte...

The XML generated is like the last post's.

Trying form SOAMANAGER, the URL generated when I click on "Open porttype WSDL document"

http://<server>:8000/sap/bc/srt/wsdl/sdef_ZWS_CONSULTA_PARTE/wsdl11/standard/rpc?sap-client=001

The XML generated is like yours, with "documentation" XML marks.

This URL doesn't work on VS 2005 (namespace is empty after web reference).

I think we have the same problem.

We need to generate an URL like Hobbins' one.

Edited by: Sergio Villar on Jan 25, 2010 5:42 PM

Edited by: Sergio Villar on Jan 25, 2010 5:43 PM

Former Member
0 Kudos

Yes, I'm waiting for Michael to respond back to my last post I asked him.

michael_hobbins
Active Participant
0 Kudos

Hello, welcome aboard Sergio. Got the video ready with an end to end demo, hope this answers all questions together. I don't know why we have differences on our XML files

An intro to the video. I made a simple RFC, it receives an ID, and returns two variables: name and surname. Only valid ID is value "1", and that will return name=Michael and surname=Hobbins. The demo starts on Tx SE80 building the webservice (notice I don't check the activate webservice just because it didnit work when I tried to when we started working with webservices). With the webservice created, I activate it from Tx WSCONFIG, from there I move to SICF to add the user and password I want it to run with, and finally check for the webservice URL by testing it and adding "&wsdl=1.1". From there I move on to VS2005 and that's it.

[Click here to get video|http://www2.um.edu.uy/mhobbins/sdn_forums/complete_demo.zip] 12MB

VatHB: I managed to handle tables with data going in and out of the webservice calling, I'll post a video today or tomorrow.

Former Member
0 Kudos

You are awesome Michael, thanks for the help you've been providing.

Former Member
0 Kudos

I see one of the main problems is that I can't use "WSCONFIG" since it says it's obsolete and to use SOAManager.

michael_hobbins
Active Participant
0 Kudos

That's weird, don't we have the same ERP version? Where do you get the obsolete message? I don't have Tx SOAMANAGER

Former Member
0 Kudos

Hello Michael,

I think that Vat and me have the same version. In our systems, WSCONFIG and WSADMIN are obsolete. We can execute them, but they only shows services defined in previous versions, the new ones there are only accesible using SOAMANAGER.

The system version is SAP NetWeaver 7.0 or 7.01

I'm going to see your video now. Thanks for help!!

michael_hobbins
Active Participant
0 Kudos

OK, what a problem we have here. Can you send some printscreens of the SOAMANAGER Tx to see if I can detect anything that might help?

Former Member
0 Kudos

Yeah, we are on Netweaver 7.0 and the basis is 7.0.

I can get you a screen shot after I get out of my meeting.

Former Member
0 Kudos

Here's a image of the SOA manager administration panel.

http://farm5.static.flickr.com/4028/4304630182_fc1eede7a7_b.jpg

I get the obolete message when trying to run the TX WSCONFIG, it pops up saying that it is "Obsolete, please look at your notes."

michael_hobbins
Active Participant
0 Kudos

OK, can you show me the other 3 tabs appearing at the bottom? "Configurations", "Clasiffications", and "Details"

And screenshots for the 3 "Open link..." links (bottom left)

Have you gone through http://help.sap.com/saphelp_nwpi71/helpdata/EN/b0/787748cf3a4200bb1ba32a62aa8519/content.htm (description on SOA Manager usage)? I must have some patch level (patch 9 for BASIS 7) where the SOA Mangaer doesn't exist yet.

Former Member
0 Kudos

My services are configured exactly as yours.

I have been trying some configurations in SOAMANAGER, and always I have same result, XML document type.

I can't understand why WS change from 6.0 to 7.0 system.

Former Member
0 Kudos

Michael, just to update you again. We are on ECC 6.0, the basis package level is 19 and the Netweaver stack is at 21.

Not sure what package level your system is currently at.

michael_hobbins
Active Participant
0 Kudos

OK. How did you check the Netweaver stack level? I don't see a specific component on System > Status > Components

Former Member
0 Kudos

In System > Status, under the SAP System Data you will see where it says Component Version. Below that there is a little magnifying glass that if you click it will give you more information.

Here's a screenshot:

http://farm5.static.flickr.com/4031/4306031055_7ece6e944c_o.jpg

Former Member
0 Kudos

My system is 7.01, all releases are 701, and all levels are 0003

SAP_ABA 701 0003 SAPKA70103 Cross-Application Component

SAP_BASIS 701 0003 SAPKB70103 SAP Basis Component

PI_BASIS 701 000 SAPK-70103INPIBASIS Basis Plug-In

SAP_BW 701 0003 SAPKW70103 SAP Business Warehouse

michael_hobbins
Active Participant
0 Kudos

OK, that's where I had checked, but as the only reference made to Netweaver was the BW (or BI) component -which we don't realy use-, I wasn't sure it refers to the Netweaver (basic?) component.

I have SAP_BW 7.00 patch 9. SOAMANAGER must have appeared somewhere after my patch.

Let me make one more shot, can you send me one the WSDL specs of the services you're trying? I'l try to import it nito VS2005 (not sure if it's possible realy) and give it a go.

Former Member
0 Kudos

Below is whats in my WSDL.

You won't be able to access it over the internet since this our DEV.

<?xml version="1.0" encoding="utf-8" ?>

- <wsdl:definitions targetNamespace="urn:sap-com:document:sap:rfc:functions" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="urn:sap-com:document:sap:rfc:functions" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">

- <wsdl:documentation>

<sidl:sidl xmlns:sidl="http://www.sap.com/2007/03/sidl" />

</wsdl:documentation>

<wsp:UsingPolicy wsdl:required="true" />

- <wsp:Policy wsu:Id="BN_Z_UPS_RATES_TEST2">

- <wsp:ExactlyOne xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:sapsp="http://www.sap.com/webas/630/soap/features/security/policy" xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility">

- <wsp:All>

- <sp:TransportBinding>

- <wsp:Policy>

- <sp:TransportToken>

- <wsp:Policy>

<sp:HttpsToken />

</wsp:Policy>

</sp:TransportToken>

- <sp:AlgorithmSuite>

- <wsp:Policy>

<sp:TripleDesRsa15 />

</wsp:Policy>

</sp:AlgorithmSuite>

- <sp:Layout>

- <wsp:Policy>

<sp:Strict />

</wsp:Policy>

</sp:Layout>

</wsp:Policy>

</sp:TransportBinding>

</wsp:All>

</wsp:ExactlyOne>

<saptrnbnd:OptimizedXMLTransfer uri="http://xml.sap.com/2006/11/esi/esp/binxml" xmlns:saptrnbnd="http://www.sap.com/webas/710/soap/features/transportbinding/" wsp:Optional="true" />

</wsp:Policy>

- <wsp:Policy wsu:Id="IF_Z_UPS_RATES_TEST2">

- <sapsession:Session xmlns:sapsession="http://www.sap.com/webas/630/soap/features/session/">

<sapsession:enableSession>false</sapsession:enableSession>

</sapsession:Session>

<wsp:ExactlyOne xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:sapsp="http://www.sap.com/webas/630/soap/features/security/policy" xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" />

</wsp:Policy>

- <wsp:Policy wsu:Id="OP_Z_UPS_RATES">

<sapcomhnd:enableCommit xmlns:sapcomhnd="http://www.sap.com/NW05/soap/features/commit/">false</sapcomhnd:enableCommit>

<sapblock:enableBlocking xmlns:sapblock="http://www.sap.com/NW05/soap/features/blocking/">true</sapblock:enableBlocking>

<saptrhnw05:required xmlns:saptrhnw05="http://www.sap.com/NW05/soap/features/transaction/">no</saptrhnw05:required>

<saprmnw05:enableWSRM xmlns:saprmnw05="http://www.sap.com/NW05/soap/features/wsrm/">false</saprmnw05:enableWSRM>

</wsp:Policy>

- <wsdl:types>

- <xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:rfc:functions">

- <xsd:simpleType name="RfcException.Message.Number">

- <xsd:restriction base="xsd:string">

<xsd:maxLength value="3" />

<xsd:pattern value="\d*" />

</xsd:restriction>

</xsd:simpleType>

- <xsd:simpleType name="char1">

- <xsd:restriction base="xsd:string">

<xsd:maxLength value="1" />

</xsd:restriction>

</xsd:simpleType>

- <xsd:simpleType name="char10">

- <xsd:restriction base="xsd:string">

<xsd:maxLength value="10" />

</xsd:restriction>

</xsd:simpleType>

- <xsd:simpleType name="char2">

- <xsd:restriction base="xsd:string">

<xsd:maxLength value="2" />

</xsd:restriction>

</xsd:simpleType>

- <xsd:simpleType name="char3">

- <xsd:restriction base="xsd:string">

<xsd:maxLength value="3" />

</xsd:restriction>

</xsd:simpleType>

- <xsd:simpleType name="char35">

- <xsd:restriction base="xsd:string">

<xsd:maxLength value="35" />

</xsd:restriction>

</xsd:simpleType>

- <xsd:simpleType name="char4">

- <xsd:restriction base="xsd:string">

<xsd:maxLength value="4" />

</xsd:restriction>

</xsd:simpleType>

- <xsd:simpleType name="curr13.2">

- <xsd:restriction base="xsd:decimal">

<xsd:totalDigits value="13" />

<xsd:fractionDigits value="2" />

</xsd:restriction>

</xsd:simpleType>

- <xsd:simpleType name="quantum15.3">

- <xsd:restriction base="xsd:decimal">

<xsd:totalDigits value="15" />

<xsd:fractionDigits value="3" />

</xsd:restriction>

</xsd:simpleType>

- <xsd:complexType name="RfcException.Message">

- <xsd:sequence>

<xsd:element name="ID" type="xsd:string" />

<xsd:element name="Number" type="tns:RfcException.Message.Number" />

</xsd:sequence>

</xsd:complexType>

- <xsd:complexType name="Z_UPS_RATES.RfcException">

- <xsd:sequence>

<xsd:element name="Name" type="tns:Z_UPS_RATES.RfcExceptions" />

<xsd:element name="Text" type="xsd:string" minOccurs="0" />

<xsd:element name="Message" type="tns:RfcException.Message" minOccurs="0" />

</xsd:sequence>

</xsd:complexType>

- <xsd:simpleType name="Z_UPS_RATES.RfcExceptions">

- <xsd:restriction base="xsd:string">

<xsd:enumeration value="INVALID_ZIP" />

<xsd:enumeration value="OVER_WEIGHT" />

<xsd:enumeration value="INVALID_PLANT" />

<xsd:enumeration value="UNSUPORTED_COUNTRY" />

<xsd:enumeration value="INVALID_SERVICE_TYPE" />

</xsd:restriction>

</xsd:simpleType>

<xsd:element name="Z_UPS_RATES.Exception" type="tns:Z_UPS_RATES.RfcException" />

- <xsd:element name="Z_UPS_RATES">

- <xsd:complexType>

- <xsd:sequence>

<xsd:element name="CITY" type="tns:char35" minOccurs="0" />

<xsd:element name="DLAND" type="tns:char3" />

<xsd:element name="PLANT" type="tns:char4" />

<xsd:element name="PZIP" type="tns:char10" />

<xsd:element name="RESIDENTIAL" type="tns:char1" minOccurs="0" />

<xsd:element name="SERV_TYPE" type="tns:char2" />

<xsd:element name="VOLUME" type="tns:quantum15.3" minOccurs="0" />

<xsd:element name="WEIGHT" type="tns:quantum15.3" />

</xsd:sequence>

</xsd:complexType>

</xsd:element>

- <xsd:element name="Z_UPS_RATESResponse">

- <xsd:complexType>

- <xsd:sequence>

<xsd:element name="RATE" type="tns:curr13.2" />

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:schema>

</wsdl:types>

- <wsdl:message name="Z_UPS_RATES">

<wsdl:part name="parameters" element="tns:Z_UPS_RATES" />

</wsdl:message>

- <wsdl:message name="Z_UPS_RATESResponse">

<wsdl:part name="parameter" element="tns:Z_UPS_RATESResponse" />

</wsdl:message>

- <wsdl:message name="Z_UPS_RATES.Exception">

<wsdl:part name="Z_UPS_RATES.Exception" element="tns:Z_UPS_RATES.Exception" />

</wsdl:message>

- <wsdl:portType name="Z_UPS_RATES_TEST2">

- <wsp:Policy>

<wsp:PolicyReference URI="#IF_Z_UPS_RATES_TEST2" />

</wsp:Policy>

- <wsdl:operation name="Z_UPS_RATES">

- <wsp:Policy>

<wsp:PolicyReference URI="#OP_Z_UPS_RATES" />

</wsp:Policy>

<wsdl:input message="tns:Z_UPS_RATES" />

<wsdl:output message="tns:Z_UPS_RATESResponse" />

<wsdl:fault name="Z_UPS_RATES.Exception" message="tns:Z_UPS_RATES.Exception" />

</wsdl:operation>

</wsdl:portType>

- <wsdl:binding name="Z_UPS_RATES_TEST2" type="tns:Z_UPS_RATES_TEST2">

- <wsp:Policy>

<wsp:PolicyReference URI="#BN_Z_UPS_RATES_TEST2" />

</wsp:Policy>

<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />

- <wsdl:operation name="Z_UPS_RATES">

<soap:operation soapAction="" style="document" />

- <wsdl:input>

<soap:body use="literal" />

</wsdl:input>

- <wsdl:output>

<soap:body use="literal" />

</wsdl:output>

- <wsdl:fault name="Z_UPS_RATES.Exception">

<soap:fault name="Z_UPS_RATES.Exception" use="literal" />

</wsdl:fault>

</wsdl:operation>

</wsdl:binding>

- <wsdl:service name="service">

- <wsdl:port name="Z_UPS_RATES_TEST2" binding="tns:Z_UPS_RATES_TEST2">

<soap:address location="http://**********:8000/sap/bc/srt/rfc/sap/z_ups_rates_test2/160/z_ups_rates_test2/z_ups_rates_test2" />

</wsdl:port>

</wsdl:service>

</wsdl:definitions>