1) Open JDeveloper, Create New Application and Project as shown below
2) Create a Java Class, Right Click on Project->New->General->JavaClass
7) Click OK, Select J2ee 1.4 (JAX-RPC) Web Service and click OK
9) In Step1, Enter WebService Name and Select the CreditRating Class as Component to Publish and click Next
10) Click Next, In Step 5 Select the Checkbox of getCreditRating Method in the List of Availbale Methods.
Once You Successfully generate the Java Web Service, You need to deploy it and Test the working of the Web Service in SOA_Suite(Oracle Application Server).
Step1: Start Oracle SOA Suite,
Step 2: Follow the below steps for getting connection of your application server in Jdeveloper 10g.
a) Go to Connections Tab, Right Click New Application Server Connection, Enter Connection Name as SOA_Suite,
Step 3: Deploy your Java Web Service to Oracle Application Server to test it.
a) Right Click the webservice.deploy->deployto->SOA_Suite
a) Select your Web Service and Click on Test Web Service .
Request:
Response:
I get a message on step 6
ReplyDeleteWhen I select the method getCreditRatings
It comes in gray color as if it is disabled.
And there is a "Why not?" button besides, and when I click it I get the following message
Method getCreditRating: The following parameter types do not have an XML Schema mapping and/or seralizer specified:
java.lang.Object
Hi,
ReplyDeleteI got the solution,
It must be a primitive, String or a Java Bean Object. It can't be object.
http://programming.itags.org/development-tools/123309/
The java.io.Serializable marker is not consulted when determining whether a Java object can be transmitted in a web service invocation. Instead, each parameter and return value of a web service method must conform to one of the 3 rules below:
1. It is a Java primitive (int, long, byte etc.), Java primitive wrapper (java.lang.Integer etc.), or a java.lang.String.
2. It is a Java bean with a zero-argument constructor, and a pair of "get" and "set" methods for each property to be exposed. Each property must itself conform to one of these 3 rules.
3. It is an array of a type that meets either rule 1 or rule 2.
java.lang.ClassCastException: org.apache.xerces.dom.ElementImpl i m getting ths while running through OC4J server
Delete