Rupansh Garg asked 2 years ago
Title : How to deploy custom Opcode as web service supporting xml element type on application server?

Question :

How to deploy custom Opcode as web service supporting xml element type on application server?

1 Answers
Umesh SharmaUmesh Sharma Staff answered 2 years ago

1. Generate Java Files for customf fields/opcodes

-HEADER_FILE with custom opcodes and fields.
-JAVA_DIR is the memory-mapped file or directory for the output of the script. output must be a directory having some correspondence with the Java package. For example, if java_package is in com.portal.classFiles, output must be f:/mysource/com/portal/classFiles.
java_package is the Java package in which to put the generated classes. for example:- com/project/brm/customflds
-JAVA_PKG is the Java package in which to put the generated classes.

2. Compile Java files
cd ${JAVA_DIR}
$JDK_HOME/bin/javac -source $JDK_VERS -target $JDK_VERS -bootclasspath $BOOTCP -classpath ${JARS_DIR}/pcm.jar:${JARS_DIR}/pcmext.jar *.java

-JDK_VERS is the version of JDK
-BOOTCP is the path containing et.jar , jsse.jar for the specified java version
-JARS_DIR is the path containing pcm.jar,pcmext.jar files will be generated with this command

3. Build Jar
$JDK_HOME/bin/jar -cfM $CUSTOM_DIR/$CUSTOM_JAR $JAVA_DIR/*.class $JAVA_DIR/*.properties

-$CUSTOM_DIR/$CUSTM_JAR is the generated jar file name using the .class and .properties files

4. Copy the generated file to the local_dir/WEB-INF/lib directory
5. Open the BRM_home/deploy/web_services/ file in a text editor.
Add or modify the following entry:

infranet.custom.field.package = package
where package is the name of the package that contains the file; for example, com.portal.classFiles.

6. Add all the custom fields to the file.
7. Save and close the file.
8. Copy the BRM_home/deploy/web_services/ file to the local_dir/WEB-INF/classes directory or the home directory on the machine on which
you installed Apache-Tomcat

9. Creating a Custom Web Service
9.1. Create a WSDL file for the Web service.
For Web services that support payload as XML element, see the deploy/web_services/BrmWebServices.war/WEB-INF/wsdl sample file and create the WSDL file.
9.2. Create the XML specifications for your custom opcodes.
9.3. Generate web service classes for your custom service by doing the following:
-Create the following directory structure in a local directory (local_dir) on the machine on which your application server is installed.

-Copy your custom WSDL files and schema (XSD) files into the local_dir/wsdl directory.
-Copy the BrmWebServices.war/WEB-INF/wsdl/BRMWebServiceException.xsd file into the local_dir/wsdl directory.

-Place the in classes directory
-Place the following files in lib directory -pcmext.jar,pcm.jar,pfc.jar,sign,web_services.jar,webserviceUtils.jar,xmlParserAPIs-2.6.0.jar,xmlParserAPIs.jar
-Place all the default WSDLs,XSDs in wsdl folder

10. create Source files from WSDL and XSDs
wsimport -s src -d classes -p com.portal.jax.minacs wsdl/BRMMinProrateProdService_v2.wsdl
java -jar $PIN_HOME/jars/impl_generator.jar -s src -d classes -p com.portal.jax.minacs wsdl/BRMMinProrateProdService_v2.wsdl
cd classes

11. Compile the Java classes
jar cvf minacs_web_service.jar com/portal/jax/minacs

move Custom Service jar to lib directory
mv minacs_web_service.jar ../lib/

12. Creating BrmWebService.war file”
cd ../..
jar -cvf BrmWebServices.war *

13. Deploy in Apache Tomcat server by placing BrmWebService.war in apache-tomcat/webapps/

Cubastion is among a very small number of specialized Siebel CRM Oracle Gold Partners in SME.