cancel
Showing results for 
Search instead for 
Did you mean: 

A problem when testing WebService

Former Member
0 Kudos

Hi expert:

             I am doing some work about web services,I met a problem, can anybody help me? Here is my work:

     <1>according the reference document(Maintain sales quotes),i copy the XML code

           Here is the source code:

Example

The following request would create a Customer Quote with the following information:

  • Customer Quote with ID returned in response,
  • Buyer ID as PSM CRM ABSL Test - Example_01,
  • Posting date as 2006-03-28T12:00:00.1234567Z,
  • Customer Quote name as PSM CRM ABSL Test - CallCustomerQuoteExample1,
  • Item ID as 10,
  • Item date as 2006-03-28T12:00:00.1234567Z,
  • Item product as MCF-0001,
  • Buyer party as MC9785.

Request

<n0:CustomerQuoteBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"> <CustomerQuote> <BuyerID>PSM CRM ABSL Test - Example_01</BuyerID> <DateTime>2006-03-28T12:00:00.1234567Z</DateTime> <Name languageCode="EN">PSM CRM ABSL Test - CallzCustomerQuoteExample1</Name> <Item> <ItemProduct> <ProductInternalID>MCF-0001</ProductInternalID> <UnitOfMeasure>EA</UnitOfMeasure> </ItemProduct> <ItemScheduleLine> <Quantity unitCode="EA">6</Quantity> </ItemScheduleLine> </Item> <AccountParty> <PartyID>MC9785</PartyID> </AccountParty> </CustomerQuote> </n0:CustomerQuoteBundleMaintainRequest_sync> 

Response would contain the result of the above operation.

In case of successful execution, the response would contain the Customer Quote ID and UUID.

The following is the response for successful execution of the above request.

Response

<nm:CustomerQuoteBundleMaintainConfirmation_sync xmlns:nm="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy"> <CustomerQuote> <ChangeStateID>20121211062856.7192640</ChangeStateID> <UUID>00163e02-86fa-1ed2-90eb-8122c5b94ae3</UUID> <ID>611</ID> </CustomerQuote> </nm:CustomerQuoteBundleMaintainConfirmation_sync> 

In case of failed execution, the response would contain error message(s).

     <2>according my system i changed some attribute Here is my code: My user is Administrator

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">

   <soap:Header/>

   <soap:Body>

      <glob:CustomerQuoteBundleMaintainRequest_sync>

<CustomerQuote>

  <BuyerID>ITPR</BuyerID>

  <Name languageCode="EN">New Order</Name>

  <Item>

   <ItemProduct>

   <ProductInternalID>16666</ProductInternalID>

    <UnitOfMeasure>EA</UnitOfMeasure>

   </ItemProduct>

   <ItemScheduleLine>

     <Quantity unitCode="EA">6</Quantity>

    </ItemScheduleLine>

  </Item>

</CustomerQuote>

       </glob:CustomerQuoteBundleMaintainRequest_sync>

   </soap:Body>

</soap:Envelope>

<3>.My test result arrive with an error message:Authorization role missing for service!

What does "Authorization role missing for service" mean? Can anybody help me?

Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

ankurgodre
Active Contributor

Hello Zhang,

While testing any Cloud Webservice from SOAP UI, you have to provide User Credentials which are not the same as you use for logging on to Cloud tenant.

When you go to the Communication Arrangement in the Cloud system under Application & User Management WorkCenter, for the scenario that you are testing in SOAP UI, open the scenario/Comm Arrangement in EDIT mode, go to Technical Data tab, under this you can click on EDIT Credentials which will show you the User ID (Auto genenrated) & the password that you have maintained.

These User credentials have to be provided while testing a Cloud WebService in a SOAP UI.

Try this & it should resolve your issue.

Thanks

BR

Ankur

Former Member
0 Kudos

Hi Ankur:

             Thank you very much! It works very well.

Answers (4)

Answers (4)

SAPjedi
Contributor
0 Kudos

Ankur answered it pretty well.  The error message is misleading - don't follow the lead to set any security.

Don't use any normal work user id / password for the webservice credentials.

Rather, find the Communication Scenario (CS), create a CA and set the password there for the generated user id.

(BTW, a CS is the interface template - from which you create any number of CAs for different Comm Systems)

If you cannot find the CS, then you need to activate the appropriate scoping - THEN you will see the CS.

Good luck,

Tim.

Former Member
0 Kudos

Hi Tim,

Thanks for your post about testing web services using SOAP UI! I managed to get the web service working on a demo system for cloud for customer. The thing is I am currently trying to set up a communication arrangement in ByDesign but none of the standard webservices appear in the communication scenarios.

I've had a look at trying to find out where to activate these in scoping but have had no luck. Have you had this problem before?

Thanks

Alexander Ludwig

sunil1101
Advisor
Advisor
0 Kudos

If the error message shows Authorization role is missing then it seems that you have not provided correct credential.

I guess currently you are giving end user credential( byd frontend user), this credential is not required for Webservice.

You have to create a Communication System and Communication arrangement(Goto Application and user management WoC), you can select communication scenario from the system.

for better understanding about webservice follow the guide (https://help.sap.com/studio_cloud)

Hope this will help

Sunil

sunil1101
Advisor
Advisor
0 Kudos

Hi Chaowei,

You can follow this blog by tim chang

before this testing create a "Communication system" and "Communication Arrangement".

While you are creating communication arrangement that time you can enter authentication method, select username and password then use this credential in SOAPUI.

Thanks

Sunil

Former Member
0 Kudos

Hi Sunil,

I seem to be having the same problem with the SOAP UI tutorial in that I need to set up a communication system and a communication arrangement, but the tutorial does not specify how to do this in the context of SOAP UI!

I have done a tutorial for consuming rest services as specified in the documentation, however in this case I don't know what to specify as the Host Name field. Do we need to specify a hostname (eg: local host and a port number)?

If you could please help me with this I would be extremely grateful

Thanks

Alexander Ludwig

former_member200567
Active Contributor
0 Kudos

Hi, Chaowei,

     Please try this.

     In SAP Cloud Applications Studio, on the menu bar , there is a menu "Administration", under that      you will see "Update Authorization and Access Rights".

     That might solve your problem.

Regards,

May T.

Former Member
0 Kudos

Hi, Chaowei,


When you create your web service, a WOCView is created too.

You must add that WOCView to WCF. And go to Application and user management WoC,

you must assign that WCF to your user and save your changes.


Hope this helps.

Regards,

Sue Chal.