• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Inserting data using webservice gives javax.xml.ws.soap.SOAPFaultException: Component Interface api

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
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 com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:197)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:130)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:125)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:135)
at $Proxy32.createCompIntfcKCMWEBCASECI(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.wsee.jaxws.spi.ClientInstance$ClientInstanceInvocationHandler.invoke(ClientInstance.java:363)
at $Proxy33.createCompIntfcKCMWEBCASECI(Unknown Source)
at project1.proxy.KCM_WEB_CASE_CISoapClient.createKCMMethod(KCM_WEB_CASE_CISoapClient.java:318)
at project1.proxy.KCM_WEB_CASE_CISoapClient.main(KCM_WEB_CASE_CISoapClient.java:116)
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.

Thank you in advance
Ashvini

 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
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.
Best wishes!
 
ashvini tharval
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

thanks
ash


 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
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.
Best wishes!
 
ashvini tharval
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I tried using the SOAP UI and when i test my create request using that i get the following error
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>Component Interface API.</faultstring>
<detail>
<messages>
<type>Error</type>
<messagesetnumber>91</messagesetnumber>
<messagenumber>74</messagenumber>
<messagetext>Property or collection #comment was not found in the component interface at the given level.</messagetext>
</messages>
</detail>
Basically the input i am sending is some thing like
<kcm:Create__CompIntfc__KCM_WEB_CASE_CI>
<kcm:CASE_ID></kcm:CASE_ID>
<!--Optional:-->
<kcm:QUICK_CD>?</kcm:QUICK_CD>
<!--Optional:-->
<!--Optional:-->
<kcm:PRODUCT_ID>?</kcm:PRODUCT_ID>
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.
Ash
 
ashvini tharval
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ivan,
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.

Thanks
Ash
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
Section 9.5 in my document http://www.slideshare.net/krizsan/scdjws-5-study-notes-3085287 describes how to create a handler that logs in and out-going SOAP messages.
Best wishes!
 
ashvini tharval
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ivan,
Thank you for your help.
My problem got resolved as i could view the soap string and make appropriate changes.
Thanks once again
Ash
 
roses are red, violets are blue. Some poems rhyme and some are a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic