Getting deserialization error when calling a secured webservice
Hi All,
I am getting deserialization error: java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement when I am calling my secured web service through a proxy client.
I have secured my webservice using a keystore, I had created using keytool . In key store I have created keys using RSA algorithm.
when I am doing all this for a webservice in which input is a string variable, then it is working.
But if I am passing a document then it is giving me ERROR OWS-04045 Malformed Request Message: deserialization error: java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement .
Below is the code of java class, I have exposed as webservice :
import java.io.StringWriter;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
public class READXML {
public String getXML(Document xmlDocument) {
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = null;
try {
transformer = tFactory.newTransformer();
} catch (TransformerConfigurationException e) {
e.printStackTrace();
StringWriter writer = new StringWriter();
try {
transformer.transform(new DOMSource(xmlDocument),
new StreamResult(writer));
} catch (TransformerException e) {
e.printStackTrace();
return writer.toString();
Appreciate if any body can help me to resolve the issue.
thanks in advance
Mike,
I have tried by validating xml, again it is giving same error.
when I am not securing my webservice then it is working fine.
The problem is coming only when i am securing my webservice.
Similar Messages
-
Getting Msg: Error when calling Credit Management: Technical Error
Hi All,
While creation of sales order in ECC, i am getting a message "Error when calling Credit Management: Technical Error"
Can you help me in this case
Regards,
SatishSatish,
Just so you know, this BADI "links" SD module to FSCM credit management. If you use the right code in this BADI, it copies over credit information on to the sales order such as Credit Account, Risk Class and Credit representative code. (Later this risk class, order's credit control area and credit group is used to look up the appropriate line in OVA8 settings)
Now you could be getting this error for any of the issues:
1. If the business partner is not created for the customer for which you're trying create a sales order (The credit account (sales order header) should have a relevant BP already) Check if the BP is correctly created.
2. Next if the credit data has been maintained for the BP in credit management.
3. XI/PI connectivity issues etc
Check if all this is maintained and you should be good. Cheers -
Getting an error when calling oaf page via notifications
I am getting the below error when calling an OAF page(workflow) via notifications .
It's working fine when i am not calling through notifications.
Error:-
You are trying to access a page is no longer active.
-You may attempted to access to this page directly by bookmarkking the page or
copying URL.This page doesn'y support bookmarking.
-The referring page may have come from a previous session.Please select home to proceed.Hi,
Refer below threads:
You are trying to access a page that is no longer active
You are trying to access a page that is no longer active.
You are trying to access a page that is no longer active.
--Sushant -
XML Deserialization Error when calling WebService from WebDynrpo
Hi all,
when calling a WebService-method from my WebDynpro-application, I get the following error message:
"Deserializing fails. Nested message: XML Deserialization Error. Can not create instance of class [com.karmann.ApplMan.dto.SoftwareKomponenteDTO] when deserializing XML type [urn:com.karmann.ApplMan.dto][SoftwareKomponenteDTO].."
SoftwareKomponenteDTO is a class that I have implemented. It implements Serializable and overwrites the methods "equals()" and "hashcode()". It contains members of types long, String and java.sql.Date.
The method I call needs an argument of type SoftwareKomponenteDTO. Other methods which return something of type SoftwareKomponenteDTO do not make any problems.
The same error message appears when I test the WebService-method in the WebService-navigator. So I assume that the problem is not the way I call the method from WebDynpro.
Thanks for help,
ChristophThanks for this hint, Amar. But this points directly to my next problem: How can I set this parameter. I know how to set flat parameters (e.g. of type long, boolean, etc.). But how can I set a parameter of a complex type?
For example I can call
wdContext.currentSaveElement().setIdFather(long id)
in order to set the parameter idFather of type long for the WebService-method save(). But there is no method
wdContext.currentSaveElement().setIdFather(SoftwareKomponenteDTO aKomp)
Could you please help me on more time?
Kind regards,
Christoph -
XML Deserialization Error when calling WebService-method
Hi all,
when calling a WebService-method from my WebDynpro-application, I get the following error message:
"Deserializing fails. Nested message: XML Deserialization Error. Can not create instance of class [com.karmann.ApplMan.dto.SoftwareKomponenteDTO] when deserializing XML type [urn:com.karmann.ApplMan.dto][SoftwareKomponenteDTO].."
SoftwareKomponenteDTO is a class that I have implemented. It implements Serializable and overwrites the methods "equals()" and "hashcode()". It contains members of types long, String and java.sql.Date.
The method I call needs an argument of type SoftwareKomponenteDTO. Other methods which return something of type SoftwareKomponenteDTO do not make any problems.
The same error message appears when I test the WebService-method in the WebService-navigator. So I assume that the problem is not the way I call the method from WebDynpro.
Thanks for help,
ChristophHi all,
I found what my problem was. The complex type that I deliver to my method (i.e. SoftwareKomponenteDTO) must have a public constructor without parameters. I think that this is slightly confusing, because in the other direction (method delivers complex type as return value) this is not neccessary. Anyway, my problem's solved now.
Regards,
Christoph -
Deserialization Failed error when calling a SAP Webservice
Hello,
I'm trying to call an SAP Webservice from a .NET Mobile application, this particular BAPI expects an array of objects and when I make the call I get a deserialization problems. I have tried make the array size to 0 but no luck, I have couple of other function modules which are working fine but have a problem with this BAPI BAPI_ALM_ORDEROPER_GET_LIST.
any help is greatly appriciated.
Thanks
VinayDear Vinay,
Does your other FM are also using arrays.?
Deserialization problem comes when xml parser is not able to convert XML schema or values to language specific elements.
And this problem normally comes if you are using complex data types.
Can you check once again and reply.
Regards,
Piyush -
Error when calling getAllServerPools() using WebService API
Hi,
I try to get All the Server Pool created on my Oracle VM Manager with the WebService API, but i'm get an error.
Here is the code (I used the wsimport to create proxy class Oracle VM 2.2.0):
- 1.Get "AdminService Webservice" --> OK
private AdminService_Service adminServiceService=null;
private AdminService adminService=null;
try
this.adminServiceService=new AdminService_Service(new URL(url + WS.CONTEXT_PATH +WS.ADMINSERVICEWS),new QName(WS.QNAME, WS.ADMINSERVICE));
catch (MalformedURLException e)
// TODO Auto-generated catch block
e.printStackTrace();
this.adminService=this.adminServiceService.getAdminServiceSoapHttpPort();
bindProvider = (BindingProvider) this.adminService;
requestContext = bindProvider.getRequestContext();
requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url + WS.CONTEXT_PATH +WS.ADMINSERVICEPORT);
requestContext.put(BindingProvider.SESSION_MAINTAIN_PROPERTY, new Boolean(true));
requestContext.put(BindingProvider.USERNAME_PROPERTY, userName);
requestContext.put(BindingProvider.PASSWORD_PROPERTY, password);
- 2. Login to OracleVM Manager with an administrator user account--> OK
LoginElement loginElmnt=new LoginElement();
loginElmnt.setAccountName(userName);
loginElmnt.setPassword(encyptPassword(password));
LoginResponseElement res=this.adminService.login(loginElmnt);
String loginToken=res.getResult();
--> Admin Session token: 510175389-1257996206446
-3. Get the "ServerPoolService Webserice" --> OK
private ServerPoolService serverPoolService=null;
private ServerPoolService_Service serverPoolSrvService=null;
try
this.serverPoolSrvService=new ServerPoolService_Service(new URL(url + WS.CONTEXT_PATH +WS.SERVERPOOLSERVICEWS),new QName(WS.QNAME, WS.SERVERPOOLSERVICE));
catch (MalformedURLException e)
// TODO Auto-generated catch block
e.printStackTrace();
this.serverPoolService=this.serverPoolSrvService.getServerPoolServiceSoapHttpPort();
bindProvider = (BindingProvider) this.serverPoolService;
requestContext = bindProvider.getRequestContext();
requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url + WS.CONTEXT_PATH +WS.SERVERPOOLSERVICEPORT);
requestContext.put(BindingProvider.SESSION_MAINTAIN_PROPERTY, new Boolean(true));
requestContext.put(BindingProvider.USERNAME_PROPERTY, userName);
requestContext.put(BindingProvider.PASSWORD_PROPERTY, password);
-4. Get the AllServerPool --> KO
GetAllServerPoolsElement getAllServerPool=new GetAllServerPoolsElement();
GetAllServerPoolsResponseElement getAllserverPoolResp=null;
ServerPool serverPool=new ServerPool();
List<ServerPool> serverPoolArr=new ArrayList<ServerPool>();
i have the java.lang.NullPointerException when calling:
getAllserverPoolResp=this.serverPoolService.getAllServerPools(getAllServerPool);
What is the problem ?
Thanks in advance,
Christophe.just a silly bug....
-
Getting 500 Error when calling XI from Siebel
Hi,
We have generated a WSDL file from XI and gave it to Siebel team. They are getting a 500 Error when they try to call us using that WSDL file. Below is the error message they are getting.
"[1] Error Invoking service 'MI_SIEBEL_WS_ORDER_TOXI_OUT', method 'MI_SIEBEL_WS_ORDER_TOXI_OUT' at step 'Call Web Service'. (SBL-BPR-00162).
[2] HTTP Request error during 'Submitting Data Send HTTP request': 'Status code -500'(SBL-EAI-04117)"
Thanks in advance for the help.
Thanks
KumarHi,
Are you sure your Sender SOAP adapter is configured properly. Also ensure that the SIEBEL team is using the right URL to communicate to the SOAP adapter.
First try using SOAP Client and see if the scenario is working fine. If so then the problem lies in SIEBEL.
Check this link for confiuring SOAP sender
http://help.sap.com/saphelp_nw04/helpdata/en/fc/5ad93f130f9215e10000000a155106/content.htm
Thanks,
Pakash -
Getting an error when Importing a security file
Hi,
Im struggling to import a security file into planning..this is the error i get
Enter password: Tue Mar 30 09:30:53 SAST 2010 :: Validating the Secfile.txt...
Tue Mar 30 09:30:53 SAST 2010 :: ---------------FILE NOT FOUND EXCEPTION COMING-------
The server is running unix: I'm running the command from the directory where the ImportSecurity.sh utility is...I have also copied the secFlie.txt file into the same directory. But still get the same error.There is a slight issue with the unix versions
If you use the exportsecurity utility it will create a file called :- secFile.txt
When you use the importsecurity utility it looks for a file called :- Secfile.txt
As it is case sensitive you have to update the exported secFile.txt
Cheers
John
http://john-goodwin.blogspot.com/ -
Error when calling a XI-webservice from SQL-Server 2005
Hi all,
we have published a webservice with XI 7.0 (using the SOAP-Adapter) and try to call it from a stored procedure within SQL-Server 2005. Upon execution we receive the error
"<SAP:Code area="MESSAGE">EMPTY_HTTP_REQUEST_RECEIVED</SAP:Code>" and
"<SAP:Stack>Empty HTTP query received; message processing not possible </SAP:Stack>".
We are using the dll MSXML2.ServerXMLHTTP. The webservice is available and can be reached from other tools like SOAP-UI when using the same endpoint-URL. It is also possible to call the service from Visual-Basic using the same code.
Does anyone has any clue about what's causing this error?
Thanks in advance!It is clear that, PI service is working absolutely fine and the problem is calling it in your SP. I do not think you are calling a web service but actually sending a HTTP request to the server. An HTTP request and a SOAP call are different in terms of protocol. You would need to explore more on how to call web services from SQL SPs.. and the right place to search would be MS SQL Server Forums..!!
VJ -
Getting ie error when calling event from code.
Hi all!
I've got an application (running on 6.40 sp8, ep6 sp2) that is pretty basic by all means. Since I want to implement some way to tell the user when he/she has made an error or just to inform him/her about something, I decided to use the ConfirmationDialog.
I've created an action called onActionShowErrorMessage in my view. This action is tied to my controller and an event defined in the controller.
Hence, when I want to show the ConfirmationDialog to show the user an error message, I call the controller method and in the method I fire the event that my view method is looking for.
So far so good..
When I call my controller method from a button action in the view everything works nicely, but when I try to call it from the wdInit method it fails?! I do get the ConfirmationDialog up but I also get an IE error window telling me that IE is trying to open a page it cannot find. I have no idea why it tries to open any page at all, since there is no navigation defined for this action.
Anyone got an idea? I couldn't find any good stuff in the system logs either
Best regards,
AndreasHello Sam!
Thanks for your answer! I would like to use something more of a pop thing, since i want to make sure the user sees it. The MessageManager does not work as good as it used to anymore, since it puts all messages in the bottom of the page. This page needs to be scrolled in order to see the error message..
Anyone got an idea of a workaround? I'm reading a propsfile, and in case I'm not able to read it I want to display this to the user.
B.R
Andreas -
Getting an error when calling the method of the bean
Hi,
I have the following problem:
From my action class I'm calling a method on EJB through Business Object and getting the following error:
org.apache.struts.action.RequestProcessor Unhandled Exception thrown: class gov.nyc.fisa.wbas.exceptions.ServerException
[3/6/08 13:53:44:700 EST] 1acdd938 WebGroup E SRVE0026E: [Servlet Error]-[SERVER EXCEPTION CALLING searchBenefitGroups() METHOD ]: gov.nyc.fisa.wbas.exceptions.ServerException: SERVER EXCEPTION CALLING searchBenefitGroups() METHOD
The following are parts of my code:
In Action Class:
BenefitGroupBO bo = new BenefitGroupBO();
BenefitGroupsColView cView = new BenefitGroupsColView();
try{
cView = bo.searchBenefitGroups(transferObject,true);
catch (ServerException e){
throw new ServerException("SERVER EXCEPTION CALLING searchFunds() METHOD ",e);
In Business Object:
private BenefitGroupImpl benGrpImpl = null;
try{
System.out.println("1. BenefitGroupBO - searchBenefitGroups()");
collectionView = benGrpImpl.searchBenefitGroups(transferObject, isSearch);
System.out.println("2. BenefitGroupBO - searchBenefitGroups()");
catch (RemoteException e){
throw new ServerException("Remote exception calling BenefitGroupImplBean: searchBenefitGroups()", e);
.....It never executes the second print statement in the method
In Remote Interface:
public BenefitGroupsColView searchBenefitGroups(BenefitGroupVO transferObject, boolean isSearch)
throws ServerException, java.rmi.RemoteException;
In the EJB
public BenefitGroupsColView searchBenefitGroups(BenefitGroupVO transferObject, boolean isSearch){
throws ServerException
System.out.println("1. BenefitGroupImplBean - searchBenefitsGroups() method");
BenefitGroupsColView collectionView = new BenefitGroupsColView();
System.out.println("2. BenefitGroupImplBean - searchBenefitsGroups() method");
return collectionView;
.....It never executes first Print statement in that method and I do not think it ever goes into the actual EJB class.
Can anyone tell me what am I doing wrong?
Thank you
Edited by: SolutionsQuest on Mar 6, 2008 11:14 AM
Edited by: SolutionsQuest on Mar 6, 2008 11:15 AMHi,
Refer below threads:
You are trying to access a page that is no longer active
You are trying to access a page that is no longer active.
You are trying to access a page that is no longer active.
--Sushant -
Getting an error when calling Java System Report from Moniroring in NWA
Here is the deatils error message. Not quite sure what is referring to .
The initial exception that caused the request to fail, was:
java.lang.NullPointerException
at com.sap.engine.admin.model.performance._gen.HistoryData$Impl.getHistoryGranularities(HistoryData.java:103)
at com.sap.webadmin.performance.viewer.comp.wdp.IPublicDataController$IHistoryGranularitiesTNode.doSupplyElements(IPublicDataController.java:1488)
at com.sap.tc.webdynpro.progmodel.context.Node.supplyElements(Node.java:406)
at com.sap.tc.webdynpro.progmodel.context.Node.getElementList(Node.java:345)
at com.sap.tc.webdynpro.progmodel.context.Node.createMappedElementList(Node.java:498)
Thanks
BaniHi - Were you able to resolve the above error. I am also having a similar problem and I would like to know your resolution on this.
Thanks in advance. -
IGS error (: Error When Calling Up IGS (ListenerRfc: unknown error))
Hi,
We have recently upgraded to NW04S.
Most of our BW reports( SAP delivered or custom, web template or not ) work fine with the IGS, while some reports don't, We receive a message from the Enterprise Portal ( Error When Calling Up IGS (ListenerRfc: unknown error)). No other details are available
We have checked and found out the related web templates are actually activates properly. From the same business content, we find some repports work and some don't, all however use web template.
Has anybody expoerienced the same? Please help.
Thanks
ArunavaHi AHP,
1> BW_IGS_ADMIN when executed showed me some charts with some statictics and status etc. However as mentioned the other report BW_IGS_CHART_TEST just shows me a blank screen.
2> SM59 connection test for the IGS RFC IGS_RFC_DEST is successful
3> Ping on the Gateway Host( for the RFS dest) works fine as well.
4> Also as I mentioned earlier, some of the reports using web teamplate works fine where some are not.
5> when I do the RFC trace ( since I get an "Error When Calling Up IGS (ListenerRfc: unknown error) ) via ST01 for the query , in the BI sysatem, I get an error 'Prog:CL_IGS_CHART==================CPRow:'.
Please let me know how do I proceed further.
Thanks
Arunava -
Error when i execute the webservice /SAPAPO/SDM_PARCRTRC
hi,
I am getting this error when i execute the webservice /SAPAPO/SDM_PARCRTRC for product availability. please tell me where am i going wrong ..... ? wat parameters are missing ? how to interpret this error?
An error has occurred. Maybe the request is not accepted by the server:
XML Serialization Error. Object content does not correspond to Schema restrictions of type [http://sap.com/xi/APO/Global][/wsdl:definitions/wsdl:types/xsd:schema[3]/xsd:complexType[3]/xsd:simpleContent/xsd:extension/xsd:attribute[1]/xsd:simpleType].
Quick response will be appreciatedhi,
due to the bad formatting of your posting it is hard to read. you might consider to use the code tag to enhance readability. moreover, 'executing a webservice' is a bit a vague description of what you do. are you consuming this service with any client program and this is throwing the exception or are you testing the webservice with any 3rd party tool and this is a server error returned to you?
anyway, I think you ttry to consume that service from within ABAP and the error message says a lot despite of its bad readability:
The client ist serializing a message (creating it from parameters) and is provided some argument for a parameter which doesn't conform to the WSDL. E.g. the WSDL declares some parameter to be an integer and between 0 and 100 and you try to supply it the value 234. THis would most probably result in your erromessage. or the WSDL says integer and you provided it a string (e.g. like 'foo' or '234').
anton
Maybe you are looking for
-
FRM-92101 when openning a particular form
Hello, When opening a particular form, users are encountering the error message: FRM-92101: There was a failure in the forms server during startup. This could happen due to invalid configuration We have many more forms in the application. Those are w
-
Aperture crashing when editing .. what's that all about?
I am still using Apeture 2.1.4 and ever since loading Maverick it keep crashing when I edit!!
-
HP C5800 all in one, wireless scanning
I have a C5800 all in one connected to a desktop - print, scan, etc. work fine. I also have a Dell XPS laptop that I print from wirelessly with the bluetooth. (How) can I "scan to computer" using bluetooth?
-
The iPad could not be synced because sync session failed to start.
I looked through the discussions and couldn't find an answer. I have the latest iOS (5.1.1) and iTunes (10.6.3). My other iOS devices sync fine. I have a MacBook Pro Mid-2010 edition running OS X Mountain Lion (in case this info is needed). I tried d
-
I can't get iTunes to start. It says the QTCF.dill is missing.
This is what it says.(The program can't start because QTCF.dill is missing from your computer. Try reinstalling the program to fix this problem). I reinstalled iTunes but it din't fix it.