My Oracle Support Banner

Web Service Manager Does Not Recognize Custom Opcode, Throws Error "java.lang.Exception: Converting opcode name "MY_OP_CUST_CREATE_DEPOSIT" to opcode number" (Doc ID 2116178.1)

Last updated on DECEMBER 14, 2017

Applies to:

Oracle Communications Billing and Revenue Management - Version 7.5.0.0.0 to 7.5.0.0.0 [Release 7.5.0]
Information in this document applies to any platform.

Goal

On : 7.5.0.13.0 version, Web Service Manager,

Scenario:

*  Deployed custom opcode as per documentation : Creating a Custom Web Service

*  But web service manager does not recognize custom opcode and not able to call opcode from other SOAP clients.

Error seen is as below:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Server.userException</faultcode>
<faultstring>javax.xml.rpc.soap.SOAPFaultException: java.lang.Exception: Converting opcode name "MY_OP_CUST_CREATE_DEPOSIT" to opcode number</faultstring>
<detail>
<ns2:stackTrace xmlns:ns2="http://xml.apache.org/axis/">javax.xml.rpc.soap.SOAPFaultException: java.lang.Exception: Converting opcode name "MY_OP_CUST_CREATE_DEPOSIT" to opcode number
at com.portal.webservices.OpcodeCaller.opcodeWithFlags(OpcodeCaller.java:292)
at com.portal.webservices.OpcodeCaller.opcode(OpcodeCaller.java:104)
at com.portal.webservices.InfranetWebService.opcode(InfranetWebService.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:372)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:292)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:276)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)


Steps to reproduce:

1. Create header file (.h) file for custom opcode.
2. parse_custom_ops_fields -L pcmjava -I input -O output -P com.oracle.opt.MYop
3. Compile CustomOp.java file (javac -d . CustomOp.java) from location where java file was present
4. Class file created in com/portal/opt/optap as package is defined there
5. Create MYOp.java file manually
6. Compile same as CustomOp.java , generate class file in com/portal/MY/MYop location
7. Create jar file with both class files by jar -cvf MYop.jar com/potal/MY/MYop/*.class
8. Move OOTB webservice war file to temp dir
9. Extract webservice by jar -xvf infranetwebsvc
10. Go to WEB-INF dir of extracted OOTB war file
11. Copy custom jar (MYop.jar) file into WEB-INF/lib
12. Add custom entry into WEB-INF/classes/Infranet.propertes file
          infranet.custom.field.package=com.portal.my.myop
13. Create war file again
14. Deploy on Weblogic
15. Execute the custom opcode using a soap client, with below input, it throws the error indicated above

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:brm="http://XX.XX.XX.XX:7002/infranetwebsvc/services/MYServices">
<soapenv:Header/>
<soapenv:Body>
<opcode soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >
<opcode xsi:type="xsd:string">MY_OP_CUST_CREATE_DEPOSIT</opcode>
<m_SchemaFile xsi:type="xsd:string">MY_OP_CUST_CREATE_DEPOSIT.xsd</m_SchemaFile>
<inputXML xsi:type="xsd:string">
<![CDATA[
<MY_OP_CUST_CREATE_DEPOSIT_inputFlist>
<ACCOUNT_OBJ>0.0.0.1 /account 567703 0</ACCOUNT_OBJ>
<AMOUNT_ADJUSTED>0</AMOUNT_ADJUSTED>
<AMOUNT_DEFERRED>2000</AMOUNT_DEFERRED>
<AMOUNT_ORIG>0</AMOUNT_ORIG>
<POID>0.0.0.1 /MY_deposit_log -1 0</POID>
<PROFILE_ID>4G-15072400255</PROFILE_ID>
<PROFILE_OBJ>0.0.0.1 /profile/cont 572692 0</PROFILE_OBJ>
<SEQUENCE_NUM>2</SEQUENCE_NUM>
<TRANS_ID>1</TRANS_ID>
<TYPE>1</TYPE>
<NUMBER>1</NUMBER>
</MY_OP_CUST_CREATE_DEPOSIT_inputFlist>
]]>
</inputXML>
</opcode>
</soapenv:Body>
</soapenv:Envelope>

 16.  Note that when the same is executed with opcode number instead of opcode name, it goes through fine.
 

Question :

How to resolve this issue?

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.