on 07-31-2006 12:12 PM
Hello,
I have transported my webdynpro application from my development server to production server.I have created HTTP destinations on my production server and these destinations are specified in the Webdynpro application in component controller section before the execute() method as explained in SAP Help :
http://help.sap.com/saphelp_nw04/helpdata/en/59/e8e95d1eba48dfa86ae91ad8816f5d/content.htm
I am using parameter Style=Document
but even after that, My Production application is still pointing to my development server. It is probably not overiding wsdl. Why is it so??
Can anyone help me in resolving this issue!!
Thanks and Regards,
Yashodhan Mujumdar
I faced the same error in my EJB project which is exposed as webservice.
Adding security.class and tc/sec/destinations/interface resolved my error.
Thanks
Srujana.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe this would be helpul for someone.
I've solved the use of RFC Destinations in a J2EE EJB Module DC, adding these used DCs:
tc/sec/destinations/interface
security.class
com.sap.exception
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
While creating HTTP Destination please give value like:
http://<servername>:<portnumber>/<Webservicename>/Config1?style=document
Then you can get from HTTP Destination.
Please see the following thread:
Kind Regards,
S.Saravanan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Follow the steps:
create the HTTP Destination:
1. Log on to the J2EE Engine as an administrator using the Visual Administrator.
2. Expand <SID> -> Server ->Services.
3. Select the Destinations service.
4. Under Destinations, select HTTP and choose New.
HTTP Destination name: <Application Server>
URL:http://localhost:50000
Go to component controller implementation initially it will be like this:
public void wdDoInit()
{
//@@begin wdDoInit()
//$$begin Service Controller(831926490)
wdContext.nodeRequestAdd().bind(new Request_SampleServiceViDocument_add());
//$$end
//@@end
}
Following code samples:
import java.net.HttpURLConnection;
import java.util.Properties;
import javax.naming.InitialContext;
import com.sap.security.core.server.destinations.api.Destination;
import com.sap.security.core.server.destinations.api.DestinationService;
import com.sap.security.core.server.destinations.api.HTTPDestination;
public void wdDoInit()
{
//@@begin wdDoInit()
InitialContext ctx ;
Object obj;
DestinationService dstService;
Destination destination;
HTTPDestination httpDestination ;
HttpURLConnection httpurlconnection = null;
Properties destprop = null;
String serverName = "";
//Give your web service name
String serviceURL = "/SampleService/Config1?style=document";
String prefixURL = "http://";
try
{
ctx = new InitialContext();
obj = ctx.lookup(DestinationService.JNDI_KEY);
dstService = (DestinationService) obj;
//ApplicationServer is HTTP destination name which i added through visual Admin
destination = dstService.getDestination("HTTP","ApplicationServer");
destprop = destination.getDestinationProperties();
httpDestination = (HTTPDestination) destination;
serverName = httpDestination.getUrl();
prefixURL = prefixURL + serverName;
}
catch(Exception ex)
{
manager.reportException(ex.getMessage(), false);
}
serviceURL = prefixURL + serviceURL;
//$$begin Service Controller(831926490)
Request_SampleServiceViDocument_add addRequest= new Request_SampleServiceViDocument_add();
addRequest._setEndPoint(serviceURL );
wdContext.nodeRequestAdd().bind(addRequest);
}
Do this step also:
(1) In the Package explorer, select your project, right click, cick on "Set Additional Libraries.."
(2) Select security.class and tc/sec/destinations/interface
(3) Click on menu Project > Properties, goto Webdynpro refereces node in the tree and add the following
(a) Interface References: tcsecdestinations~interface
(b) Service References: tcsecdestinations~service
Regards
Suresh KB
Hi
Create the alias name in the server for the WSLD file that should be point outin the server location .Create the alias in Visual Admin -> Destinations->Http
try this to call the webservice by generic
final InitialContext ctx = new InitialContext();
final DestinationService dstService = (DestinationService)ctx.lookup(DestinationService.JNDI_KEY);
if (dstService== null)
throw new NamingException ("Destination service not available");
final Destination destination = dstService.getDestination("HTTP","WEBSERVICE NAME");
final HTTPDestination httpDestination = (HTTPDestination) destination;
HttpURLConnection httpConnection = httpDestination.getURLConnection();
String xyz = String.valueOf(httpConnection.getURL());
Request_AdvLocationVer1ViDocument_getLocation obj=wdContext.currentRequest_AdvLocationVer1ViDocument_getLocationElement().modelObject();
obj._setHTTPDestinationName("WEBSERVICE NAME");
obj._setEndPoint(xyz);
obj.execute();
Kind Regards
Mukesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mukesh,
Thanks for the prompt reply.
1)Can you please ellaborate on what do you mean by Calling the webService by generic
2)The class "DestinationService" is not available in my NWDS, do I need to include any library?
3) Does creating the alias means creating a HTTPDestination using visual admin
4) obj._setHTTPDestinationName("WEBSERVICE NAME"); - is the "WEBSERVICE NAME" same as the HTTP Destination Name
Thank again.
Regards,
Yashodhan
Hi,
1.It is a look-up name for calling a Webservice
2.You have need to include the Jar files in the build path of the application,
tc_sec_destinations_interface.jar
tc_sec_destinations_service.jar
Make necessary entries in the Web Dynpro References by selecting Properties of the Project as under:
tcsecdestinations~interface (in the Interface Tab)
tcsecdestinations~service (in the Service Tab)
3.Yes
4.Yes
Kind Regards.
Mukesh.
Hi Mukesh,
I implement you code and the steps that you mentioned.
I am not able to find tc_sec_destinations_service.jar, which is the only pending step.
While building the application I am getting the following error
[
C:\Documents and Settings\netweaver\.dtc\3\t\18726BCEAB26C6711206D30DBF9F4317\gwd\packages\com\apl\hssp\hsspsearch\HSSPSearch.java:201: cannot access com.sap.security.core.server.util0.IDException
file com\sap\security\core\server\util0\IDException.class not found
Destination destination = dstService.getDestination("HTTP","WEBSERVICE");
^
]
What could be the problem.
Regards,
Yashodhan
Hi,
I have received the jar files.
But when I am looking into the path mentioned by you it is already there.
How do I add the jar file into my project?
When I try to add it as a the used DC, it is not present in the active components list.
Even in case of Set Additional Libraries the particular jar is not available.
We are using SAP J2EE 640 SP16 and are using JDI Scenario 2+ enviornment.
Regards,
Yashodhan
Hi Mukesh,
Even after Create a Library project and using the jar file, it is still giving the followig error while building the application.
[
C:\Documents and Settings\netweaver\.dtc\3\t\18726BCEAB26C6711206D30DBF9F4317\gwd\packages\com\apl\hssp\hsspsearch\HSSPSearch.java:201: cannot access com.sap.security.core.server.util0.IDException
file com\sap\security\core\server\util0\IDException.class not found
Destination destination = dstService.getDestination("HTTP","WEBSERVICE");
^
]
Regards,
Yashodhan
hi,
The import statement if properly mentioned.
The exact error is:
[
[echo] Starting Java compiler
[javac] Compiling 212 source files to C:\Documents and Settings\netweaver\.dtc\3\t\18726BCEAB26C6711206D30DBF9F4317\classes
C:\Documents and Settings\netweaver\.dtc\3\t\18726BCEAB26C6711206D30DBF9F4317\gwd\packages\com\apl\hssp\hsspsearch\HSSPSearch.java:201: cannot access com.sap.security.core.server.util0.IDException
file com\sap\security\core\server\util0\IDException.class not found
Destination destination = dstService.getDestination("HTTP","HSSPPeProcessorService_hssp");
^
1 error
Ant runtime 36.828 seconds
Ant build finished with ERRORS
Compile failed; see the compiler error output for details.
Error: Build stopped due to an error: Compile failed; see the compiler error output for details.
]
The error which it is giving is related to the file "com\sap\security\core\server\util0\IDException.class"
which is not present within the api's.
Regards,
Ameya
Hi
Try this in the Coding part
try{
final InitialContext ctx = new InitialContext();
final DestinationService dstService = (DestinationService)ctx.lookup(DestinationService.JNDI_KEY);
if (dstService== null)
throw new NamingException ("Destination service not available");
final Destination destination = dstService.getDestination("HTTP","HSSPPeProcessorService_hssp");
final HTTPDestination httpDestination = (HTTPDestination) destination;
HttpURLConnection httpConnection = httpDestination.getURLConnection();
String xyz = String.valueOf(httpConnection.getURL());
Request_WEBTESTRLCViDocument_getClient obj=wdContext.currentRequest_WEBTESTRLCViDocument_getClientElement().modelObject();
obj._setHTTPDestinationName("HSSPPeProcessorService_hssp");
obj._setEndPoint(xyz);
obj.execute();
} catch(Exception ce) {
wdComponentAPI.getMessageManager().reportSuccess("Error"+ce.getMessage());
manager.reportException(ce.getMessage(), false);
}
Kind Regards
Mukesh
Hi All,
Mukesh the code which you have given is the same that you had mentioned yesterday, except for the try/catch block which I have already used in my code.
Saravanan the thread you mentioned talks about using a server library component to deploy the external jars, which we have already tried that but still the same error is get shown during build.
Ragards,
Yashoshan
Hi,
did u created HTTP detsination name?
create the HTTP Destination:
1. Log on to the J2EE Engine as an administrator using the Visual Administrator.
2. Expand <SID> -> Server ->Services.
3. Select the Destinations service.
4. Under Destinations, select HTTP and choose New.
HTTP Destination name: HSSPPeProcessorService_hssp
Regards
Suresh KB
Hi,
Please check the follwoing steps in your Dynpro project.
1.Project>Properties>Web Dynpro References-->Interface references --> Add the follwoing:
Name=tcsecdesninations~interface
2.Project>Properties>Web Dynpro References>Service reference> Add the following:
Name=webservices
Name=tcsecdesninations~service
I hope this step might be solve your problem.
Kind Regards,
S.Saravanan.
Hi,
I re-iterated the entire thing from scratch and now it has started working in devlopment server, but after transporting it to production it is still giving the same class not found error as it was giving in development.
I attempted to checkout the application in some other NWDS.
There I observed that the setting which we have done in Web Dynpro References did not show up. The reference list was empty.
Does the changes done in Web Dynpro References do get activated or its only editor specific.
Regards,
Yashodhan
Dear Saravan,
Can you please elaborate on how to set web Dynpro References explicitly. The general procedure that I follow is right clicking on the dc -> properties where the references are mentioned.
I checked for the references in the development server using the web dynpro content administrator. The reference were existing.
But, in production web dynpro content administrator the referenceszmentioned are not existing.
Regards,
Yashodhan
Hi,
I have the same problem, but now solved using the following steps. Just do the following steps in WebDynpro project property.
Please check the follwoing steps in your Dynpro project.
1.Project>Properties>Web Dynpro References-->Interface references --> Add the follwoing:
Name=tcsecdesninations~interface
2.Project>Properties>Web Dynpro References>Service reference> Add the following:
Name=webservices
Name=tcsecdesninations~service
Kind Regards,
S.Saravanan.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.