cancel
Showing results for 
Search instead for 
Did you mean: 

Testing a Web Service

Former Member
0 Kudos

Hi Experts,

I'm new to publishing Web Services. To create my first WS, I followed help step by step from http://help.sap.com/saphelp_nw2004s/helpdata/en/68/0464407b9b990ae10000000a155106/frameset.htm.

After I created a service definition, when I tried to test the service through SOA MANAGER, I received the following error.

-


Cannot download WSDL from http://****/sap/bc/srt/wsdl/sdef_Z_WS_TEST_3/wsdl11/ws_policy/document?sap-client=200: WSDL 'portType' can not have child 'wsp:Policy' of namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy' !

-


It seems that the namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy' defined in WSDL is not proper. However, I just don't understand how the WSDL generated by Service Wizard could be wrong.

Any idea where the namespace comes form? Any way to modify the namespace?

The following is the beginning part of my WSDL:

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

<wsdl:definitions targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" 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:soap:functions:mc-style" 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" xmlns:n1="urn:sap-com:document:sap:rfc:functions">

<wsdl:documentation>

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

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

<wsp:Policy wsu:Id="IF_Z_WS_TEST_3">

<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>

Thanks for your help in advace,

Kay

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

Hi,

I solved same problem following these steps:

1. Go to soamanager, Business Administration -> Web Service Administration and search for your Web Service.

2. Select it and apply selection. Select "Open WSDL document for selected binding"

3. Copy URL opened in a new window.

4. Replace "ws_policy" for "standard" the URL:

http://****/sap/bc/srt/wsdl/sdef_Z_WS_TEST_3/wsdl11/ws_policy/document?sap-client=200:

replaced by:

http://****/sap/bc/srt/wsdl/sdef_Z_WS_TEST_3/wsdl11/standard/document?sap-client=200:

Former Member
0 Kudos

I am also receivnig this error when setting up my first web service. Did either Kay or Steffen find an solution?

Thanks,

T

Former Member
0 Kudos

I have the same problem. My WS works från WS explorer on our NW CE 7.1 system and it works from a 7.1 Web Dynpro. I get this error when trying to import the webservice in an older 6.40 Wb Dynpro.

jean-philippe_pain2
Participant
0 Kudos

Hi,

I have the same error.

Is someone found the answer plz ?

Thanks

Former Member
0 Kudos

Use SOAP UI Tool for Testing Webservice. Please refer foll url:

http://www.soapui.org/gettingstarted/your_first_soapUI_project.html

jean-philippe_pain2
Participant
0 Kudos

hi,

Thanks for the info !

i've downloaded and tried it..My concern is that i have a logon problem. it doesn't ask me to sign on.

Do i have to change thr default url that i got from my wsdl or there is an option ?

(i am beginner in web services)

Thanks,

JP

EDIT : FORGET IT, I'VE FOUND IT !

Edited by: Jean-Philippe PAIN on Feb 19, 2009 8:16 PM

Former Member
0 Kudos

Hi,

Have you create the binding (configuration) in SOAManager?

you also can goto tcode sicf to check whether your soapruntime it's properly created.

it should be under this path:

/sap/bc/srt/rfc/sap/z**/000/z*/z**

Note: 000 is your SAP client number.

Regards

David

Former Member
0 Kudos

Hi David,

Thanks for you comment. I just checked the soapruntime in the path and it is in place.

Further advise will be appreciated.

Thanks,

Kay

Former Member
0 Kudos

Hi Kay,

Could you try to apply this notes?

Note 1139107 - eSOA Services cannot be configured with SOAMANAGER

I recommend 2nd solution: Implement the attached correction

I try 1st one, still not working, and SP16 not released yet. SAP just release SP15 today.

Hope this helps

Regards

David

Former Member
0 Kudos

Hello All,

we have the same problem and it still exist.

When using the wsnavigator (called via soamanager) to check the web service we recieve the following error message:

Cannot download WSDL from http://<server>:8000/sap/bc/srt/wsdl/bndg_47F2E4CDC8E62B2CE1000000C0A8C9A2/wsdl11/allinone/ws_policy... WSDL 'portType' can not have child 'wsp:Policy' of namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy' !

If i open the link directly in the browser i get the wsdl.

The test of the SICF Service seems to be ok: (only the information about the empty http-body)

http://<server>:8000/sap/bc/srt/rfc/sap/ytest5/000/ytest5/ytest5?sap-client=000

soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">

<soap-env:Header />

- <soap-env:Body>

- <soap-env:Fault>

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

<faultstring xml:lang="en">SRT: Wrong Content-Type and empty HTTP-Body received</faultstring>

- <detail>

- <ns:SystemFault xmlns:ns="http://www.sap.com/webas/710/soap/runtime/abap/fault/system/">

<Host>undefined</Host>

<Component>COREMSG</Component>

- <ChainedException>

<Exception_Name>CX_SOAP_CORE</Exception_Name>

<Exception_Text>SRT: Wrong Content-Type and empty HTTP-Body received</Exception_Text>

</ChainedException>

</ns:SystemFault>

</detail>

</soap-env:Fault>

</soap-env:Body>

</soap-env:Envelope>

How can we check the service? What is wrong?

The linked BLOG does`nt give a solution.

Thanks a lot.

Steffen

Former Member
0 Kudos

Update:

The problem is not the webservice himself. We could test the webservice using an external ws explorer. It seems to be a problem with the wsnavigator or the interaction between ws navigator and AS ABAP/SOAP Runtime.

Thanks+Regards

Steffen

athavanraja
Active Contributor
0 Kudos

Hi Steffen,

Could you try with a FQDN url

instead of

http://<server>:8000

use

http://<server>.<domain>.<com>:8000

most of the SICF services expects Fully Qualified Domain Name in url

Regards

Raja

Former Member
0 Kudos

Hello Raja,

the <server> expression is in fact a FQDN. (server.domain.xx)

Regards

Steffen

former_member131788
Active Participant
0 Kudos

Hi Kay,

The web service admin (WSADMIN) and configuration (WSCONGFIG) transactions, are obsolete and the new transaction ‘SOAMANAGER’ is introduced to administrate, configure and monitor the service definitions. I hope you have done the configuration before you go ahead to test the service.

Check this blog for more detailed information on Configuring SOA MANAGER. I hope this will help.

/people/bv.pillai/blog/2008/01/27/new-service-definitions-in-the-abap-development-environment-soamanager-150-sap-nw-70-sp14

IF HELPFULL REWARD POINTS

Thanks and Kind Regards

-


Mohan