You are on page 1of 26

Oracle PaaS for SaaS Workshop

Developer Workshop
Lab 2 Build Queries using Http Analyzer

Page 1 of 26
Time
30 minutes

Overview

At the end of this exercise, you will be able to:

1. How to Use HTTP Analyzer


2. Query Opportunity web service by name
3. Set up opportunity attributes retrieved

Page 2 of 26
Instructions

1. In JDeveloper, click on menu: Tools -> HTTP Analyzer.

2. HTTP Analyzer shows up in the bottom of the IDE.

Page 3 of 26
3. Click create a new request icon on the bottom of the IDE

Page 4 of 26
4. HTTP Analyzer page shows up.

Page 5 of 26
5. Click Open WSDL button on the top right side, enter WSDL URL for the Opportunity
Service: https://<your-osc-crm-
endpoint>/opptyMgmtOpportunities/OpportunityService?WSDL (Please use the correct
Oracle Sales Cloud address that has been allocated to you) and click OK.

Page 6 of 26
6. Wait for fetching WSDL documentation.

Page 7 of 26
7. Request Template shows up

8. Select OpportunityServiceSoapHttpPort.findOpportunity(,).

Page 8 of 26
Page 9 of 26
9. Click on HTTP Content tab

10. Copy payload and paste it to HTTP Content.

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://xmlns.oracle.com/apps/sales/opptyMgmt/opportunities/opportu
nityService/types/" xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<env:Header/>
<env:Body>
<ns1:findOpportunity>
<ns1:findCriteria>
<ns2:fetchStart>0</ns2:fetchStart>
<ns2:fetchSize>-1</ns2:fetchSize>
<ns2:filter>
<ns2:group>
<ns2:item>
<ns2:upperCaseCompare>true</ns2:upperCaseCompare>
<ns2:attribute>Name</ns2:attribute>
<ns2:operator>=</ns2:operator>
<ns2:value>Q3 Green Server 5000 Opportunity</ns2:value>

Page 10 of 26
</ns2:item>

</ns2:group>
</ns2:filter>
</ns1:findCriteria>
<ns1:findControl>
<ns2:retrieveAllTranslations>false</ns2:retrieveAllTranslations>
</ns1:findControl>
</ns1:findOpportunity>
</env:Body>
</env:Envelope>

11. Click SOAP Structure tab and click Request HTTP Headers

Page 11 of 26
12. Click on + Add headers icon (Sometimes, the + may not be visible. You may
have to expand the Request HTTP Headers panel by dragging the splitter bar to the
right.)

13. Choose Authorization basic

Page 12 of 26
14. Fill up username and password (as Matt.Hooper and the Oracle Sales Cloud
password sent to you)

15. Click on Send Request button

Page 13 of 26
16. Review the Response payload on the right hand side window. Note that this is
only to show you how the request is sent and response is received. Do not worry if
there is no opportunity named Q3 Green Server 5000 Opportunity. If you are already
familiar with Oracle Sales Cloud, you may want to create an Opportunity by this name
and test or can change the value for the Name attribute, assigning a name available
in the Oracle Sales Cloud instance you are working with (this is not mandatory for this
lab)

Page 14 of 26
17. Next step you will create a new request using a different SOAP payload. Click
again on Create a new request icon at the bottom of the IDE.

Page 15 of 26
18. HTTP Analyzer page shows up.

Page 16 of 26
19. Click on Open WSDL button on the upper right side of the page. Enter the same
URL you used on your first test. Please use the Correct Oracle Sales Cloud instance
that has been allocated to you and click OK.

Page 17 of 26
20. Wait for fetching WSDL documentation.

Page 18 of 26
21. Request Template shows up

22. Select OpportunityServiceSoapHttpPort.findOpportunity(,).

Page 19 of 26
Page 20 of 26
23. Click on HTTP Content tab

24. Copy payload and paste it to HTTP Content.

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://xmlns.oracle.com/apps/sales/opptyMgmt/opportunities/opportu
nityService/types/" xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<env:Header/>
<env:Body>
<ns1:findOpportunity>
<ns1:findCriteria>
<ns2:fetchStart>0</ns2:fetchStart>
<ns2:fetchSize>-1</ns2:fetchSize>
<ns2:filter>
<ns2:group>
<ns2:item>
<ns2:upperCaseCompare>true</ns2:upperCaseCompare>
<ns2:attribute>Name</ns2:attribute>
<ns2:operator>=</ns2:operator>
<ns2:value>Q3 Green Server 5000 Opportunity</ns2:value>

Page 21 of 26
</ns2:item>

</ns2:group>
</ns2:filter>
<ns2:findAttribute>OptyId</ns2:findAttribute>
<ns2:findAttribute>TargetPartyName</ns2:findAttribute>
<ns2:findAttribute>TargetPartyId</ns2:findAttribute>
<ns2:findAttribute>Name</ns2:findAttribute>
<ns2:findAttribute>PartyName1</ns2:findAttribute>
<ns2:findAttribute>WinProb</ns2:findAttribute>
<ns2:findAttribute>EffectiveDate</ns2:findAttribute>
<ns2:findAttribute>Revenue</ns2:findAttribute>

</ns1:findCriteria>
<ns1:findControl>
<ns2:retrieveAllTranslations>false</ns2:retrieveAllTranslations>
</ns1:findControl>
</ns1:findOpportunity>
</env:Body>
</env:Envelope>

Page 22 of 26
25. Click SOAP Structure tab and click Request HTTP Headers

26. Click on + Add headers icon (Sometimes, the + may not be visible. You may
have to expand the Request HTTP Headers panel by dragging the splitter bar to the
right.)

Page 23 of 26
27. Choose Authorization basic

28. Fill up username and password

29. Click on Send Request button

Page 24 of 26
30. Get the result back and Click on HTTP Content (this is only to show how the
request is sent and response is received. Do not worry if there is no opportunity by
name Q3 Green Server 5000 Opportunity. If you are already familiar with Oracle
Sales Cloud, you may want to create an Opportunity by this name and test but this is
not mandatory for this lab)

Page 25 of 26
Oracle PaaS Extending SaaS Workshop
March 2014

Oracle Corporation
World Headquarters
500 Oracle Parkway
Redwood Shores, CA 94065
U.S.A.

Worldwide Inquiries:
Phone: +1.650.506.7000
Fax: +1.650.506.7200
oracle.com

Copyright 2012, Oracle. All rights reserved.


This document is provided for information purposes only and the
contents hereof are subject to change without notice.
This document is not warranted to be error-free, nor subject to any
other warranties or conditions, whether expressed orally or implied
in law, including implied warranties and conditions of merchantability
or fitness for a particular purpose. We specifically disclaim any
liability with respect to this document and no contractual obligations
are formed either directly or indirectly by this document. This document
may not be reproduced or transmitted in any form or by any means,
electronic or mechanical, for any purpose, without our prior written permission.
Oracle, JD Edwards, PeopleSoft, Fatwire and Siebel are registered trademarks of Oracle
Corporation and/or its affiliates. Other names may be trademarks
of their respective owners.

Page 26 of 26

You might also like