This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am using jdeveloper 11g to consume a peoplesoft webservice using the wsdl file and JAX-Ws approach to build the proxy.
I have been successfull in getting to work the "get", "find" methods for the webservice but while trying to access the create/Update(inserting data) method, it gives me the following exception.
In CREATE method
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Component Interface API.
at $Proxy32.createCompIntfcKCMWEBCASECI(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at $Proxy33.createCompIntfcKCMWEBCASECI(Unknown Source)
Process exited with exit code 1.
From the exception it is not clear what is missing or where am i going wrong. I have provided all the mandatory values required by the method.
The create method generated needs almost 40 parameters, hence i am intializing all of them and sending it.
Few parameters are INOUT or out mode, depending on that i even created the required holder etc.
I dont have any access to peoplesoft logs, is there a way to debug this further.
Basically i am stuck here as i am not able to decode this exception.
Can anyone tell me where is it failing, is it a some formation error or is it creating a query at db and getting a sql error??
as mentioned earlier, its very difficult to get access to db resources hence its becming very difficult to debug the error.
Any help will be appreciated.
As I recommend in many answers, try using soapUI.
If soapUI succeeds in talking to the web service, then you will be able to see what a correct SOAP request looks like.
Then use Wireshark, or some other way, to look at the SOAP messages sent by your client.
Where you detect a difference, modify the client code so that the SOAP messages it generates look like those from soapUI.
Yes, this is a slightly tedious process, but since you do not have access to the server logs, then this is the only way I can think of.
Thank you for your inputs.
I am using webservices for the first time,hence the process will be more than slightly tedious for me :-)
Is it possible to tell from the exception where exactly is it failing, like the create method is invoked but while passing the paramerters its failing or is it failing at the database level while trying to execute the sql.
I can try getting the db and peoplesoft logs, but i just want to know if my webservice is even reaching upto that point.
Will try executing the steps you have mentioned and hopefully will get some results.
Joined: Oct 04, 2006
What I can tell from your exception stack trace is that there is a SOAP fault occurring. As far as I can tell, it thus looks like your request reaches the server and the server responds with a SOAP fault.
You can also add a handler on the client side and print out the SOAP messages received from the server - this will perhaps yield some more information.
Let me know if you need help with creating a SOAP message logging handler.
Joined: Jun 09, 2010
I tried using the SOAP UI and when i test my create request using that i get the following error
<faultstring>Component Interface API.</faultstring>
<messagetext>Property or collection #comment was not found in the component interface at the given level.</messagetext>
Basically the input i am sending is some thing like
According to the method, the case id should be generated by peoplesoft and returned back along with other parameters.
so i am passing an empty case_id, but when i pass a <kcm:CASE_ID>?</kcm:CASE_ID>, it gives me a sql error.
I am not getting any hold of the logs or any assistance from the respective dep.
Hence i will have to figure it out on my own, Is there any thing you can suggest from the above observations??
Thanks again for your help.
Joined: Jun 09, 2010
I did use SOAP UI and found out that the method works fine, it is able to insert data using the webservice.
But when i am trying the same from my java client, it gives me Component Interface Api error.
How do i add a handler which will print the soap messages??
Basically i need to view the SOAP request that is formed after i initialise all the values, i am sure something is wrong in the way the
values are assigned.
Since all the parameters are <complex-type> , the proxy generates a class for each type.
hence i have to initialize all the classes and assign values.
I think if i can view the request that is passed, i can be in a better position to go further.
The HTTP Analyser does not work, as in it does not show any packets.