XI Webservice Exception within Webdynpro component
Hi All,
I have created a model for an XI webservice within the webdynpro project and created 2 view one for search and the other for search results and have accordingly associated the context variables of these views to the import and response parameters of the web service.
Now when I execute the method associated with this service I receive a service exception as enclosed below :
Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized
Can someone please tell me if there any settings to be done on the client or server settings.
Thanks in advance.
Best regards,
Divya
Divya,
please go through this documentation and see if it helps.
http://help.sap.com/saphelp_nw04/helpdata/en/ab/08194116bfb167e10000000a155106/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/bf/27fd3b651f6a1ce10000000a11402f/frameset.htm
Similar Messages
-
Consuming webservice in a webdynpro component
Hi Experts,
I have a third party free webservice as WSDL link.My requirement is to make use of that webservice in my webdynpro component.
Can any body give me a step by step approach to consume that webservice in my webdynpro Component.
If possible, Provide me some good material for consuming webservice in a webdynpro component.
Awaiting for a useful reply.
Thanks,
Ramanan.phi,
Few indroductory sessions
/people/thomas.jung/blog/2007/12/17/consuming-services-with-abap -Consuming webservices with webdynpro.
It is possible to create webservice in ABAP as well as in Webdynpro.
ABAP Webservice:
http://wiki.open-esb.java.net/Wiki.jsp?page=BAPIWEBSERVICE
http://www.sappro.com/downloads/SAPXI.pdf
Webdynpro Webservice:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/244e7923-0a01-0010-5887-fe0b0c6dbb8d
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/30f1b585-0a01-0010-3d96-ad0ea291c4f9
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/db785a70-0701-0010-858c-eee0ec4fe1b3
In Web Dynpro ABAP there is nothing special about calling a web service. Unlike WD Java, there are not dedicated model object types in WD ABAP. WD ABAP simply has the ability to interact with other ABAP development object types. You can call function modules, ABAP classes, even modules in old dynpro apps.
So calling the webservice from ABAP therefore is just the process of generating the ABAP Proxy Class. This is the same process regardless of if you want to use this proxy class from WDA or any other type of ABAP development object. You can then call the proxy class from WDA just like any other type of ABAP class. There is a service wizard option in later support package levels that includes an option for ABAP Proxy classes - although it doesn't generate the proxy class it just generates the code and context for the call to an already existing proxy class. The service wizards in WD ABAP are not required however. They are just shortcut code generators and often can't even generate a complete context for a complex web service proxy - so expect to do some manual adjustment after running the wizard.
Edited by: Mahalakshmi kothuri on Jun 1, 2008 4:17 PM -
Webservice Exception from Webdynpro
Hi,
We are on 7.1 SP04 Patch 1. We have created a webservice with http and None Authentication and deployed on EP 7.0 server. We have set a constant User Name and Password in Visual Admin.
We are able to execute this webservice successfully from Webservice navigator.
We have developed a Webdynpro appln with this webservice. We are getting an exception when the webservice is getting executed from Webdynpro appln.
"Exception on execution of webservice with WSDL url '<wsdl url>' with operation 'webservice name' in interface"
We checked in the trace file and got the following message
com.sap.mdm.logging.MdmLogger warning
WARNING: PingServerCommand failed
Have any one faced this issue?
Thanks,
Arun prabhuHi Walter,
The webservices are developed using MDM Webservice generator. The webdnpro application has to access MDM Data using MDM Webservices / MDM Java APIs.
This was working fine with MDM 7.1 SP03. Now we have upgraded to MDM 7.1 SP04.
When I try to access MDM Data from webdynpro using MDM Java API commands, I am getting an exception at AuthenticateUserSession Command. While access using MDM Webservices, I am getting an webservice exception and an entry in trace file.
Thanks,
Arun prabhu S -
Hello Team,
We have a scenario where we have a PI web service and we are importing the WSDL into our WD Java application.
While running the test scenario we are getting the below 2 exceptions in the stack trace.
20111222:Exception trace: com.sap.tc.webdynpro.model.webservice.api.WDWSModelExecuteException: Exception on execution of web service on destination 'WS_CUST_**' for operation 'GetCustomer*' in interface 'GetCustomer**'
Caused by: java.rmi.RemoteException: Cannot created typed model object. Factory for typed model class '$002fWsdlDefinitions$002fWsdlTypes$002fXsdSchema$005b1$005d$002fXsdComplexType$005b1$005d$002fXsdSequence$002fXsdElement$005b1$005d$002fXsdComplexType' has not been registered.; nested exception is:
com.sap.tc.webdynpro.model.webservice.exception.WSModelRuntimeException: Cannot created typed model object. Factory for typed model class '$002fWsdlDefinitions$002fWsdlTypes$002fXsdSchema$005b1$005d$002fXsdComplexType$005b1$005d$002fXsdSequence$002fXsdElement$005b1$005d$002fXsdComplexType' has not been registered.
Caused by: com.sap.tc.webdynpro.model.webservice.exception.WSModelRuntimeException: Cannot created typed model object. Factory for typed model class '$002fWsdlDefinitions$002fWsdlTypes$002fXsdSchema$005b1$005d$002fXsdComplexType$005b1$005d$002fXsdSequence$002fXsdElement$005b1$005d$002fXsdComplexType' has not been registered.
By running through few posts on SDN a probable solution for this was proposed as: blank the "designtimeWsdlUrl" properties of the model in NWDS and re-deploy the application
Any help on this would be great.
Regards,
ShaileshDear Shailesh,
Did you try to check the blank the "designtimeWsdlUrl" properties of the model in NWDS and re-deploy the application? please try to check and test.
Also try to import fresh in new DC and check whether it is working or not.
Best Regards
Arun Jaiswal -
Where should i fire the plug within the webdynpro component
when the search don't match for the url parameters passed in my scenario, i need to display the error view page, so wanted to know where should i fire the plug within the webdynpro component. could some one guide plz.
thanks n regards
AnoopYou can go for event handling. In the component controller, just fire an event that there is a search mismatch. Handle this event in your view, where you just fire the outbound plug.
Or, since you get the parameters in the url itself, instead of having 2 views, you can do it in one view itself by displaying only an error message when there is no record matching the query. If there are records, make the search results visible. Just have a context attribute to manipulate the visibility. This can be done with the comp controller itself, without any events.
Regards
Nithya -
How to define the Webservices in except through WebDynpro.
Hi friends,
Can anyone tell me about how to create the webservices?[ except in Webdynpro.].
We want to give the input data as userdefined way, not in a file. can u tell me how to proceed ?Hi,
Creation of webservice in XI
Step 1:
Create the DT,MT & MI(Synch/Asynch-outbound/Inbound)
step2
Create webservice for sender ( Integration Directory ->tools ->define webservice.
It will generate the webservice and save it as .wsl file.
" Award points if helpful"
Regards,
Jayasimha Jangam -
How to call a RFC of a remote system from an ABAP webdynpro component
Dear Experts,
I am a newbie in ABAP Webdynpro.
I am working on a requirement where I have a webdynpro component on ECC system.I need to call a RFC located on CRM system from my webdynpro component on the ECC system.
How do I do that ?? Please help.
Regards,
Mamai.Calling RFC from some other system is same as local except the difference is that you have to give destination name while calling.
And the regarding the method of calling it depends on your FM.
if it is big RFC with complex structure, you can create the service call for it with destination given as RFC desitination.
if it is simple straight forward RFC you can directly call it.
for creating RFC service call call use this method
1. Starting the Wizard
To start the wizard, position the cursor on the Web Dynpro component to be edited in the object list at the left margin of the
workbench window. Open its context menu and choose the entry Create->Service Call. The wizard is started and leads you
through the creation process.
Press Continue.
2. Choice of Controller
On the second dialog window of the wizard, you can choose whether the service call is to be embedded in an existing
controller or whether a new controller is to be created for this purpose. Service calls can only always be embedded in
global controllers u2013 that is, in the component controller or in additionally created custom controllers. It is not possible, to
embed service calls in view controllers.
a. Select radio button Use Existent Controller
b. Do not change the default entry for component: <CC name>
c. Enter for controller COMPONENTCONTROLLER
d. Press Continue.
3. Service Type and Service Selection
a. You now select, which service type should be used for this service call. Select radio button Function Module. Fill the
destination here. Press Continue.
b. Select the service: for Function Module enter <RFC name>. Press Continue.
4. The Required Methods and Context Elements
On the two subsequent dialog windows, default values are listed for giving names to the context nodes and attributes
required by the service call as well as to the required methods. The proposed names are based on the names of the
embedded service, but you can change them as required. However, heed the respective notes in the corresponding dialog
box.
a. Adapt Context: Select from Nodes/Attributes . Press Continue.
b. Specify Method Name: leave all entries as provided: Component: Controller: COMPONENTCONTROLLER Method: EXCUTE_ Press Continue.
5. Completing the Choice
When you have confirmed the last dialog box, the generation is triggered. Afterwards you now have the required methods
and contexts at your disposal for using them within your Web Dynpro component.
or if you want to call directly the use the call statement with destination -
How to add a new url link in a view of an existing webdynpro component?
How to add a new url link in a view of an existing webdynpro component?
hi ,
refer SAP online hep :
Implementing Enhancements in a View
http://help.sap.com/erp2005_ehp_04/helpdata/EN/46/233f2189f74f08e10000000a114a6b/frameset.htm
To enhance the layout of the view, you can create new UI elements. This procedure is no different u2013 from a technical viewpoint u2013 from creating UI elements in components themselves. All UI elements created within the enhancement implementation can then be processed as usual.
Enhancements means inserting user developments into SAP development objects at predefined positions.
The Enhancement Framework enables you to add functionality to standard SAP software without actually changing the original repository objects, and to organize these enhancements as effectively as possible.
refernce :
have a look at this article
How to Create Enhancement Implementation in Web Dynpro ABAP
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/700317da-bd79-2c10-368e-8f18bf5d8b81&overridelayout=true
as pointed correctly by Saurav in earlier thread
regards,
amit -
Consuming MII WebService in Java WebDynpro
Hello,
We are facing a strange situation...
We define a transaction in MII to be consumed as WebService in Java WebDynpro. This transaction is a simple query on a DB returning 4 fields :
Shift code : SHIFT
Shift description : DESCRIPTION
Start time : START_TIME
End time : END_TIME
It works fine, we use the import adaptative web service wizzard in netweaver developper studio to use this WS...
But if we to an update on the webservice, changing a field name for example (SHIFT -> SHIFTCODE), we start to have trouble...
We got then the very helpful error message :
Exception on execution of web service with WSDL URL '<sever>/WebServices/GetShift' with operation 'Xacute' in interface 'XacuteWSSoap'
If I display the model info using wdContext.currentRequest_XacuteElement().modelObject().associatedModelClassInfo().getModelInfo().toString()
I got the following (extract) :
<ModelClassPropertyInfo name="SHIFT" dataType="com.sap.tc.webdynpro.model.webservice.types.string(java.lang.String)" readOnly="false" qName="SHIFT" required="true" backendType="null"/>
As you can see, the model definition is NOT updated and we still have SHIFT as name instead of SHIFTCODE...
If someboby has an idea, it will save us our life ;o)
Thank you
PS:it the same behaviour if we add a field...Oliver -
Did you try to reimport the WS model ..? If yes and still doesn't work...Try to delete the old proxy in webdynpro ( adoptive ws) and import again.
To avoid code changes,you can give same old name while fresh import.
Adoptive WS in webdynpro is not really like Adoptive RFC .It has some limitations.
Thanks
Hari -
Problem with calling Webservice from Java Webdynpro
Hi,
I have a scenario where I need to call a Webservice through my Webdynpro application. I need to pass few parameters(of type string) and the Webservice is suppose to retrun a few records based on the input values.
When I run the webservice directly using the browser, the output is in XML format.
When I create a model for the webservice in webdynpro, the return value is a Node element of type java.lang.Object. From webdynpro, I am successfully able to make a call to the Webservice (as there is no exception with model execute command), but the return value is always null. I am not sure if the webservice is not returning any data or if I am not reading the correct context element. There is no documentation available for the webservice either.
Can anyone tell me what is that I am missing. Is it not possible for Webdynpro to call a webservice which can return only XML data?
Any help on this issue would be greatly appreciated.
Thanks,
SudheerHi Sudheer,
You can refer to wiki link (& other links available at the end in this)
https://www.sdn.sap.com/irj/scn/wiki?path=/display/wdjava/faq-Models-AdaptiveWebService
Kind Regards,
Nitin -
How to call standard CRM transactions into Webdynpro component
Hi,
i have a requirement where i need to call the the standard CRM transaction like <i>activity worklist</i> and <i>activity creation</i> into the webdynpro component. Please let me know how to do it, would appreciate it, if provided with a sample code.
Thanks,
SuriHi Suri,
You could use suspend/resume mechanism to jump to the ITS version of these transactions (in case they are ITS-enabled). Starting the SAPGUI from within the browser environment, transferring data/starting a transaction and then returning to the browser is not possible.
Best regards,
Thomas -
Getting nullpointer Exception in Webdynpro application.
hi All,
I am getting one NullPointerException in the screen, .
This message is only coming only when the form is loading first time. So when i put the debugg statments to trace the error where it is coming, i come to know that it is coming before calling the init() method.
So when i click on the any of the button or firing the event in the screen, , i am not getting that error in the screen. Can u please tell me anybody , what would be the problem.s
for your reference i have added that screen shot in the in the following path. Please look at the same. It is production. i am not able to find the problem, could any body help to find what is the problem.
My Home > Web Dynpro Java > Main > Attachments
file name is > NullPointerException Easy.GIF
Is this error coming any of the life cycle methods creating internally by webdynpro framework.?
What is the lifecycle process of the webdynpro application.
Regards
VijayHi Luciano ,
thanks for the reply
I have put the debugg statments also in the component contoller and custom controller init methods.
After that when i run the application it is throwing the exception in the component controller inbetween init() and wdDoBeforeNavigation() methods.
For your reference i have attached screen shot in the following path. under wiki
My Home > Web Dynpro Java > Main > Attachments
Filename is > NullPointerException Easy1.GIF
Acutally i was not able to provide the stract trace bcz , when i went the log files i am not finding any exception or error.
Regards
Vijay -
Change Tracking Webdynpro Component Error
I am using CE 7.11 SP04 with MDM 7.1 SP04.
Installed all the 2 webdynpro components.
Configured change tracking on MDM, also configured change tracking iView on CE.
Issue1:
When I run change tracking as an iView through Portal , the logoff button on change tracking iView throughs null pointer exception.
Issue2:
I am consuming the change tracking webdynpro component on my custom webdynpro wrapper.
I have added the following code to pass the id and lookup table as per the how tto guide to consume MDM webdynpro's.
RepositorySchemaEx schema = MetadataManager.getInstance().getRepositorySchema(wdContext.currentContextElement().getUserSessionContext());
GetPermanentIdFromRecordIdCommand cmd = new GetPermanentIdFromRecordIdCommand(
wdContext.currentContextElement().getUserSessionContext());
TableId tableId = schema.getTableId(ASSIGNMENT);
cmd.setRecordIds(ids);
cmd.setTableId(tableId);
cmd.execute();
int[] permIds = cmd.getPermanentIds();
if (permIds != null && permIds.length > 0) {
int permId = permIds[0];
wdThis.wdGetMDMChangeTrackerInterface().setPermanentId(permId); // until here it works fine
wdThis.wdGetMDMChangeTrackerInterface().selectLookupTable(""+tableId.getIdValue()); // it throws null pointer exception here in SAP delivered change tracking component. Not sure whether it is SAP bug. Has anyone faced same issue?
Any help is appreciated!}
Here is the error
java.lang.NullPointerException: while trying to invoke the method com.sap.mdm.ChangeTrackingBean.setLookupTableId(int) of an object loaded from field com.sap.mdm.MdmChangeTrackerComp._tracker of an object loaded from local variable 'this'
at com.sap.mdm.MdmChangeTrackerComp.selectLookupTable(MdmChangeTrackerComp.java:812)
at com.sap.mdm.wdp.InternalMdmChangeTrackerComp.selectLookupTable(InternalMdmChangeTrackerComp.java:333)
at com.sap.mdm.MdmChangeTrackerCompInterface.selectLookupTable(MdmChangeTrackerCompInterface.java:140)
at com.sap.mdm.wdp.InternalMdmChangeTrackerCompInterface.wdInvokeMethod(InternalMdmChangeTrackerCompInterface.java:148)
at com.sap.tc.webdynpro.progmodel.generation.ExternalControllerPI$ExternalInterfaceInvocationHandler.invoke(ExternalControllerPI.java:339)
ThanksJDBC Alias should be provided as the Application Parameter for webdynpro not in the URL.
-
Exceptions in Webdynpro's generated methods
Hi,
I'm trying to develop a WebDynpro component and I'm using its feature to generate actions and methods. How can I generate a method, which throws an exception?
any added code outside the //@@begin and //@@end will be deleted by the generator....
regards,
MartinAs the views part deals with the creation of user Interface you are supposed to handle the exceptions here.
i.e
Create the methods with functionality in you rmodel and handle its exception in the view.
Perhaps if you can explain the requirement that drives you to create the method that is supposed to throw an exception, we can help. -
How to find the webdynpro component on server
Hi Experts,
I need to identify a webdynpro component in server whether it is there or not. Just i know the name of the component, Why i am asking with that component i am getting some errors while created a callable object in GP. I need to identify the component and delete that.
Is there any other way to do this.......
Please tell any one know how to find the component in server................
Thanks,
SunilHi ,
To create a callable object from a web dynpro project you need three DC like
caf/eu/gp/api
caf/eu/gp/api/wd
com.sap.security.api.sda
but caf/eu/gp/api and caf/eu/gp/api/wd are not available if you work on local development enviornment with out NWDI. Then you need to put those DCs within your local plugin directiory. I am sending you a link through this you will get to download those DCs and where you will put those DCs it is clear in this doc.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f7be53bb-0b01-0010-1c96-be3cb6799c1b
In your local mc you will go to the following path
Program FilesSAPIDEIDE70eclipsepluginscom.sap.tc.ap_2.0.0compCAFDCssap.comcaf
here you will create a folder called eu and put the DCs as per the doc. and in SC u put your Toplevel SC.
Now you try from Web Dynpro perspective. You will get all the DCs for callable object.
Thanks
Chandan
Maybe you are looking for
-
Verizon is actually asking why I haven't upgraded!
I have been with Verizon for nearly 20 years, and currently have a family share plan; 4 phones (3 smartphones [2-unlimited data, 1-2GB data], + 1 feature phone). For years, I was practically a cheerleader for Verizon, due to their great cell service
-
WS2012 - IE 11 Suggested Security Settings Prompt
I published IE as a remote app on Windows Server 2012 for users to access via RDWeb. When a new user tries to open IE 11 for the first time they are presented with a prompt to use IE's suggested security settings or not to use those settings. For
-
hi In BI11g, How can i create ticker view on Dashboard? Thanks
-
I installed MacKeeper how do i uninstall it?
Hi, I got a pop up saying I needed to install MacKeeper as my Mac needed cleaning. I downloaded it but did not finish the process of activating it from my download folder as I thought I had better see if it is legitimate. I deleted the Mackeeper fr
-
does anyone know what that means? under the video clip in the timeline there is a solid white line...although sometimes there are green and blue ones too. i am not set up to mark clips certain colors..so i am not sure what this is. thanks