Importing external web service with SSL certificate security

Hello,
I'm trying to import an external web service (that resides in another server, independent of ours). However, right after I enter the WSDL in the import window I get the following error in the NWDS:
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target      [Error: com.sap.ide.es.core.ui.internal.wizards.fragments  Thread[ModalContext,6,main]]
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
          at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
          at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1649)
          at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:241)
          at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:235)
          at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1206)
          at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:136)
          at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
          at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
          at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:893)
          at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
          at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1165)
          at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1149)
          at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:434)
          at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
          at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
          at com.sap.ide.es.core.ui.internal.wizards.fragments.UrlValidationRunnable.getURLAsStream(UrlValidationRunnable.java:137)
          at com.sap.ide.es.core.ui.internal.wizards.fragments.UrlValidationRunnable.validate(UrlValidationRunnable.java:75)
          at com.sap.ide.es.core.ui.internal.wizards.fragments.UrlValidationRunnable.run(UrlValidationRunnable.java:55)
          at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
          at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:323)
          at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:217)
          at sun.security.validator.Validator.validate(Validator.java:218)
          at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:126)
          at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:209)
          at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249)
          at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1185)
          ... 15 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
          at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:174)
          at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:238)
          at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:318)
          ... 21 more
Has anyone ever consumed an external web service with SSL certificate security? How do you import this in your Web Dynpro project?
Cheers!

Hi Alain,
I just checked on a newer NW environment (NW 7.2) and was presented an empty list as well... It seems the mapping procedure I described is deprecated since NW 7.11, and the modeled CAF application service is already exposed as a web service.
You may want to have a look at http://help.sap.com/saphelp_nwce711/helpdata/en/43/f173947bbb025be10000000a1553f7/content.htm or http://scn.sap.com/message/7852996 for more info

Similar Messages

  • Secured Sybase Web Service with outside certificate authority

    Hello,
    I would like to use Secured Sybase Web Service with outside certificate authority, like Symantec. Could you let me know how I can create CSR for sending to Symantec? What other steps do I need to do?
    Thanks,
    Sudarat.

    Hello Jason,
    Thanks for your reply. The certificate authority require the CSR file before issue a signed certificate. If this is a signed certificate for IIS web server, I can create CSR from IIS. But I cannot use a signed certificate created from CSR of IIS with Sybase Web Service. The below steps are what I have tried.
    1. I use CreateCert.exe with /r parameter to create CSR and private key.
    2. I sent CSR to a certificate authority and they send back a signed certificate.
    3. I have to combine a signed certificate from #2 with private key created from #1. Then use that file to specify with -xs{https …when starting the service.
    Are the above steps what I have to do?  If so, do I need to redistribute createcert.exe to my customers who want to use my application and how? Why I cannot use the signed certificate created from CSR of IIS?
    Thanks,
    Sudarat.

  • Consume Web Service with SSL

    Hi expert!!!
    I have a problem!!
    I need consume a web service with ssl autentification in PI to call from SAP.
    That web services is of AFIP (Argentina ).
    i don`t know how do that!!
    How and where configure the certificate for signature??
    Thxz in advance!!!
    Sorry my bad english..

    thxz for all!!!!1
    I will be to resume my problem
    i need sign xml file with a certificate!!1
    i have xml file build in ABAP,  i try do with openssl in windows or unix to sign with private key file and certificate file .Crt
    that generate a new file with sign, i put this in other web service and work....
    i need do that in abap or pi..... i abap i could create xml file, but i can`t execute open ssl.....
    thxz for u help!!!

  • Issue with calling external web service with authentication details ...

    Hi,
         I am facing a deployment issue with Oracle ESB. I am trying to call an external Web Service with authentication from ESB SOAP Service. It is working fine with my local ESB version 10.1.3.3.0 Build PCBPEL_10.1.3.3.0_GENERIC_070615.0525; however it is getting an error at our development ESB version 10.1.3.3.1 Build PCBPEL_10.1.3.3.1_GENERIC_RELEASE.
         I am getting following error.
    An unhandled exception has been thrown in the ESB system. The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException: exception during SOAP invoke: Server was unable to process request. ---> Object reference not set to an instance of an object.; nested exception is: javax.xml.rpc.soap.SOAPFaultException: Server was unable to process request. ---> Object reference not set to an instance of an object. at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.populateFaultMessage(WSIFOperation_JaxRpc.java:3086) at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.invokeOperation(WSIFOperation_JaxRpc.java:1728) at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.invokeRequestResponseOperation(WSIFOperation_JaxRpc.java:1473) at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.executeRequestResponseOperation(WSIFOperation_JaxRpc.java:1196) at oracle.tip.esb.server.common.wsif.WSIFInvoker.executeOperation(WSIFInvoker.java:867) at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:770) at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:790) at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.nextService(OutboundAdapterService.java:208) at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.processBusinessEvent(OutboundAdapterService.java:127) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(InitialEventDispatcher.java:118) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:95) at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1424) at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:112) at oracle.tip.esb.server.service.EsbRouterSubscription.onBusinessEvent(EsbRouterSubscription.java:307) at oracle.tip.esb.server.dispatch.EventDispatcher.executeSubscription(EventDispat
         Could one of you please help me out to understand why it is happining.
    Thanks in advance.
    Jyotirmoy.

    Hi Mahesh,
    One you are missing is authentication token or credentials.
    Please refer to the following articles.
    http://www.cleverworkarounds.com/2014/02/05/tips-for-using-spd-workflows-to-talk-to-3rd-party-web-services/
    A Series of articles related to Web Service in SPD Workflow
    Trials or tribulation?
    Inside SharePoint 2013 workflows–Part 1
    Trials or tribulation?
    Inside SharePoint 2013 workflows–Part 2
    Trials or tribulation?
    Inside SharePoint 2013 workflows–Part 3
    Trials or tribulation?
    Inside SharePoint 2013 workflows–Part 4
    Trials or tribulation?
    Inside SharePoint 2013 workflows–Part 5
    Trials or tribulation?
    Inside SharePoint 2013 workflows–Part 6
    Trials or tribulation?
    Inside SharePoint 2013 workflows–Part 7
    Trials or tribulation?
    Inside SharePoint 2013 workflows–Part 8
    Trials or tribulation?
    Inside SharePoint 2013 workflows–Part 9
    Trials or tribulation?
    Inside SharePoint 2013 workflows–Part 10
    Trials or tribulation?
    Inside SharePoint 2013 workflows–Part 11
    Trials or tribulation?
    Inside SharePoint 2013 workflows–Part 12
    Please don't forget to mark it answered, if your problem resolved or helpful

  • Help: consuming an external web service with user name token

    Hello Together!
    I need to consume an external web service secured with WS-UserNameToken. The way, how did I do it:
    1. I generated a web service consumer (proxy) in SE80 from the wsdl file
    2. I created logical port for the consumer in SOAMANAGER
    3. I created security profile in WSSPROFILE with telpmate SET_USERNAME and assigned it to consumer operation in LPCONFIG  (I use LPCONFIG, because I didn't find any way to do it in SOAMANAGER)
    3. I called the web service and got the error back:  session token is missing or invalid or has inspired
    My questions are:
    1. is this possible to consume an external webservice in SAP, which is secured with WS-Usernametoken?
    2. do I need therefore any settings in java stack? do I need java stack in general?
    3. Is this any way to configure the consumer without writing programs, which set header parameter manually?
    4. if the answer on the third question is no, do you have any examples, how to implement session management in report? (I mean sending session id and checking the validaty of id)
    I appriciate any help of you!
    best regards Anna

    Hi,
    it should be possible to use WS-UserNameToken for consuming web service. It should be available on AS BAP 7.0 and higher. This profile should be under category Document authentication. You can try to dump a message send from SAP to see what is going out of SAP. This should be supported in ABAP so you don't need a Java stack. What exactly do you want to configure? Do you want to just set user name and password for that service which will be used for any calls of that proxy?
    Cheers

  • Accessing external web service with non-constant URL

    Hello, all
    I am looking in the documentation on accessing external web services, but either I am looking in the wrong place, or the documentatoin is lacking info.
    My clients have several web services in the local network (regular services, not DB-based), the have the same interface, but different URL's.
    Versions of the DB are 11, 12, and 16.
    First of all, I do not see in the specs an option for a non-hardcoded URL. The logic says that this has to be possible, but I cannot find it.
    Second, I need to see an example of accessing an XML or JSon based service, I cannot find it in the specs either.
    Can anyone point me to a document with examples?
    Thank you
    Arcady

    The following will call a web service with whatever URL you pass in as the argument "myurl".  I think that is what you are looking for.
    CREATE PROCEDURE cli_test2( myurl LONG VARCHAR )
    RESULT( httpheaders long varchar, httpvalues long varchars
    URL '!myurl'
    To deal with the resulting data in XML, use the OPENXML() function.
    eg. To turn an XML list of employees that looks like this:
    <root>
    <row EmployeeID="102" Surname="Whitney" GivenName="Fran" StartDate="1984-08-28"/>
    </root>
    into a table of results, you would do this (where xmlgetemplist() is the web service call):
    CREATE OR REPLACE PROCEDURE xmlgetemplist() RESULT( httpheader long varchar, httpbody long varchar)
    URL 'http://localhost/demo/xmlEmployeeList'
    TYPE 'HTTP:GET';
    create variable res long varchar;
    -- call the web service
    select httpbody into res from xmlgetemplist() where httpheader = 'Body'
    -- extract the XML elements into a SQL result set
    select * from openXML( res, '/root/row' ) WITH ( EmployeeID INT '@EmployeeID',
           GivenName    CHAR(20) '@GivenName',
           Surname      CHAR(20) '@Surname',
           PhoneNumber  CHAR(10) '@Phone');
    To deal with the resulting data in JSON, use the sp_parse_json() procedure.
    eg.
    To turn a JSON formatted list of employees that looks like this:
    "EmployeeID": 102,
    "Surname": "Whitney",
    "GivenName": "Fran",
    "StartDate": "1984-08-28",
    "TerminationDate": null
    into a table of results, you would do this (where jsongetemplist() is the web service call):
    CREATE OR REPLACE PROCEDURE jsongetemplist() RESULT( httpheader long varchar, httpbody long varchar)
    URL 'http://localhost/demo/jsonEmployeeList'
    TYPE 'HTTP:GET';
    create variable foo long varchar;
    --call the webservice
    select httpbody into foo from jsongetemplist() where httpheader = 'Body';
    --turn the json result into a structured array of data
    -- this step is required because of less structured nature of JSON
    call sp_parse_json( 'output_array', foo);
    --extract the JSON elements from the output array into a SQL result set
    SELECT  output_array[[row_num]].EmployeeID as EmployeeID,
                   output_array[[row_num]].SurName as SurName,
                   output_array[[row_num]].GivenName as GivenName,
                   output_array[[row_num]].StartDate as StartDate,
                   output_array[[row_num]].TerminationDate as EndDate
    FROM sa_rowgenerator(1, CARDINALITY(output_array))
    Hope this helps,
    --Jason

  • Consuming an external web service with WAS 6.40

    Hi all,
    I know this thread isn’t 100% XI forum related, my apologies for that. However, I believe somebody here has experience with this subject.
    I’m trying to consume an external web service through WAS 6.40 with se80. When I try to create my proxy object <u>“package Choose Create > Enterprise Service / Web Service > Proxy Object > URL type</u>”, I receive an error message (SPRX084) -> <i>During proxy generation, an interface description in WSDL format is fetched from the integration builder or from another source and interpreted. This WSDL document must describe the whole interface correctly.</i>
    I don’t have sure, but it seams something within WSDL object/element. Nevertheless, these external web services are working well with other third party client applications, why SAP WAS can’t take this WSDL?
    Anyone has faced an issue like this one?
    Thanks in advance,
    Ricardo.

    Hi,
    some tools do not generate WSDLs correcty (not with all the standards
    or with obsolete parts) and then in ABAP you cannot generate a proxy from it
    you should be able to see the some more details in disgnosis section
    sometimes you just have to change one or two things in the WSDL
    and it will be ok for WAS but you need to find the exect cause
    of the error - it can be done by debugging
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Test Web Services with X509 Certificate

    Hello,
    We'd like to perform a test of our web services with an X509 Certificate.  I have been using SOAPSonar to do my test up to this point.  But the version I have will not allow me to test with a certificate.  It appears I will need to purchase the software upgrade in order to test with a certificate. 
    Must I use this software or is there another method/software I can use to do this testing?
    Can Altova's XMLSpy test with a X509 certificate?
    Thanks,
    Matt

    Neetesh,
    It looks like SOAPUI will work.  I am currently looking into it. 
    Ravi - I'm not sure what software these steps are refering to?  Is that for XMLSpy?
    Thanks,
    Matt
    Edited by: Matthew Herbert on Dec 2, 2009 8:56 PM

  • Missing type information when importing external web service

    Hello,
    using the SAP NetWeaver Developer Studio SAP NetWeaver 7.1 Composition Environment SP06 PAT0003, I have imported a number of RFCs from an R/3. The import succeeded as expected (see [here|http://img25.imageshack.us/my.php?image=importrfc.png]) and I am able to invoke the RFCs as intended.
    Now, we have imported these RFCs into a PI 7.1 and published them as web services.
    However, when I import these web services rather than the RFCs, the type information for parameters is lost as shown [here|http://img25.imageshack.us/my.php?image=importwebservice.png]. The missing type information is included in the provided wsdl files, though.
    Note: Using the current version of the NWDS for the CE 7.1 EhP1 does not solve this problem!
    Does anyone has an idea what is going wrong?
    Best regards
    Alexander

    The type information is actually not missing. However, the used types carry no names. Therefore, the types are displayed as "anonymous" in the NWDS.

  • Calling web service with SSL (HTTPS) hangs client stub

    If anyone can help it would make my day! I've spent way too much time on this!!!
    I'm running:
    - Web service is running on Linux RedHat with Oracle9iAS 9.0.3
    - Client is running from Windows XP under Jdeveloper
    I've successfully installed and run the web security demo "ws_security" at http://otn.oracle.com/sample_code/tech/java/web_services/wssecurity/ws_security.jar.
    This demo goes through installing the web service, certificates, etc... and the demo runs fine. I'm also able to connect to the web service from a browser using https://server1:4443/CreditCardValidator/CreditCardValidator. I can download the proxy, look at the WSDL, etc...
    Now I've written my own very simple stateless java class web service, deployed it to 9iAS , and then downloaded the proxy stub jar. Using the proxy stub I can call my web service and everything works fine.
    Then I configure the web service to use HTTPS by making the following changes to the proxy stub (per the ws_security demo).
    1) Copy the following 5 lines to the proxy stub
    System.setProperty("ssl.SocketFactory.provider","oracle.security.ssl.OracleSSLSocketFactoryImpl");
    System.setProperty("ssl.ServerSocketFactory.provider","oracle.security.ssl.OracleSSLServerSocketFactoryImpl");
    System.setProperty("java.protocol.handler.pkgs","HTTPClient");
    System.setProperty("oracle.wallet.location","C:\\Data\\Oracle\\WALLETS\\ws_security\\wallet.txt");
    System.setProperty("oracle.wallet.password","thewalletpassword");
    2) modify the "m_soapURL" by changing "http" to "https" and the port number to 4443
    3) add the following 3 jar files to my projects library class list:
    C:\Program Files\jdev9031\jlib\jssl-1_2.jar
    C:\Program Files\jdev9031\jdk\jre\lib\ext\jcert.jar
    C:\Program Files\jdev9031\lib\jsse.jar;C:\Program Files\jdev9031\jlib\javax-ssl-1_2.jar
    When I run the proxy stub it just hangs. I've traced the hang to the "Response response = call.invoke(new URL(m_soapURL), soapActionURI);" statement in the "makeSOAPCallRPC" method in the proxy stub.
    Again, this works fine if I simply change the "m_soapURL" to use "http" instead of "https". It looks like it's hanging on the client side and the call is never making it to the server.
    Any help is GREATLY appreciated!!!!!

    Could you explain it a little more, please.
    Since my first message, I used the wallet manager to add the certificate the server where the web service is at, uses.
    What else do I need to make it work??
    Thanks in advance again.

  • Error while trying to import external web service in webdynpro java

    Hi,
    I am trying to import external webservice in webdynpro java using adaptive webservice model, but i am getting below error..i tried some other external webservices but those are working fine....I wanted to know if there is any issue with this wsdl?? any suggestions?
    com.sap.tc.webdynpro.model.webservice.exception.WSModelRuntimeException: Exception on creation of service metadata for WSDL URL 'https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_SearchService?wsdl' and service factory configuration '{DynamicProxy.ClassPath=C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.tc.cmi_1.0.0/_cmi_api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.exception_2.0.0/lib/exception.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/boot.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/iq-lib.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/util.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/webservices_lib.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/webservices.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/webservices_api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/tc_sec_wssec_lib.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.dictionary.runtime_2.0.0/lib/SapDictionaryTypesRuntime.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.dictionary.services_2.0.0/lib/SapDictionaryTypeServices.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.tssap.sap.libs.logging_2.0.0/lib/logging.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.tssap.sap.libs.logging_2.0.0/lib/loggingStandard.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.tssap.sap.libs.logging_2.0.0/lib/jARM.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.tssap.sap.libs.xmltoolkit_2.0.0/lib/sapxmltoolkit.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/activation.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/jaxm-api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/saaj-api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/jaxrpc-api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/jnet.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/jsse.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/mail.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.tc.webdynpro.model.webservice_2.0.0/lib/_webdynpro_model_webservice.jar;, DynamicProxy.Javac.path=C:\j2sdk1.4.2_19, DynamicProxy.TempDir=C:\Users\sakkav01\AppData\Local\Temp\}'
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getOrCreateWsrService(WSModelInfo.java:414)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.readOperationsFromWSDL(WSModelInfo.java:372)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.importMetadataInternal(WSModelInfo.java:342)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.importMetadata(WSModelInfo.java:306)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.importMetadata(WSModelInfo.java:316)
    at com.sap.ide.webdynpro.modeleditor.wizards.model.creation.PageRenameWS.loadNameSpacesAndModelClasses(PageRenameWS.java:435)
    at com.sap.ide.webdynpro.modeleditor.wizards.model.creation.ModelDialog.nextPressed(ModelDialog.java:105)
    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:316)
    at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:423)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:583)
    at org.eclipse.jface.window.Window.open(Window.java:563)
    at com.sap.ide.webdynpro.modeleditor.ModelEditorCallback.createModel(ModelEditorCallback.java:52)
    at com.sap.ide.webdynpro.service.modeleditor.ModelService.createModelWithUI(ModelService.java:70)
    at com.sap.ide.webdynpro.service.modeleditor.ServiceWithUI.createModel(ServiceWithUI.java:49)
    at com.sap.ide.webdynpro.tsmodel.application.provider.ModelNodeProvider.createUniqueName(ModelNodeProvider.java:55)
    at com.tssap.selena.impl.model.elements.EntityImpl.createChildEntityUin(EntityImpl.java:936)
    at com.tssap.selena.impl.model.elements.EntityImpl.createChildEntity(EntityImpl.java:502)
    at com.sap.ide.webdynpro.tsmodel.application.actions.CreationAction.runInternal(CreationAction.java:76)
    at com.sap.ide.webdynpro.tsmodel.application.actions.CreationAction.access$000(CreationAction.java:24)
    at com.sap.ide.webdynpro.tsmodel.application.actions.CreationAction$1.run(CreationAction.java:51)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1595)
    at com.sap.ide.webdynpro.tsmodel.application.actions.CreationAction.run(CreationAction.java:57)
    at com.sap.ide.webdynpro.projectbrowser.actions.PBCreateModelAction.run(PBCreateModelAction.java:95)
    at com.tssap.selena.model.extension.action.SelenaActionCollector$GenericElementActionWrapper.run(SelenaActionCollector.java:224)
    at com.tssap.util.ui.menu.MenuFactory$MuSiAction.saveRunAction(MenuFactory.java:1425)
    at com.tssap.util.ui.menu.MenuFactory$MuSiAction.run(MenuFactory.java:1407)
    at com.tssap.util.ui.menu.MenuFactory$DelegateAction.processInternal(MenuFactory.java:616)
    at com.tssap.util.ui.menu.MenuFactory$DelegateAction.access$100(MenuFactory.java:586)
    at com.tssap.util.ui.menu.MenuFactory$DelegateAction$BusyProcessWorker.run(MenuFactory.java:716)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
    at com.tssap.util.ui.menu.MenuFactory$DelegateAction.process(MenuFactory.java:610)
    at com.tssap.util.ui.menu.internal.MenuListenerFactory$ProcessAdapter.widgetSelected(MenuListenerFactory.java:172)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
    at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
    at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858)
    at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
    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:324)
    at com.sap.ide.eclipse.startup.Main.basicRun(Main.java:291)
    at com.sap.ide.eclipse.startup.Main.run(Main.java:789)
    at com.sap.ide.eclipse.startup.Main.main(Main.java:607)
    Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.WebserviceClientException: GenericServiceFactory initialization problem. Could not load web service model. See nested exception for details.
    at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DGenericServiceImpl.generateProxyFiles(DGenericServiceImpl.java:157)
    at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DGenericServiceImpl.<init>(DGenericServiceImpl.java:56)
    at com.sap.engine.services.webservices.espbase.client.dynamic.GenericServiceFactory.createService(GenericServiceFactory.java:88)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getOrCreateWsrService(WSModelInfo.java:412)
    ... 52 more
    Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.ProxyGeneratorException: Proxy Generator Error. Problem with WSDL file parsing. See nested message.
    at com.sap.engine.services.webservices.jaxrpc.wsdl2java.ProxyGenerator.generateProxy(ProxyGenerator.java:182)
    at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DGenericServiceImpl.generateProxyFiles(DGenericServiceImpl.java:154)
    ... 55 more
    Caused by: com.sap.engine.lib.xml.util.NestedException: IO Exception occurred while parsing file:Invalid Response Code: (-1) null. The requested URL was:"https//:xxxxxxxxxxxxxxxxxxxxx_SearchService?wsdl" -> com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (-1) null. The requested URL was:"https://xxxxxxxxxxxxxxxxxxxxxxxxxx_SearchService?wsdl"
    at com.sap.engine.services.webservices.wsdl.WSDLDOMLoader.loadDOMDocument(WSDLDOMLoader.java:1039)
    at com.sap.engine.services.webservices.wsdl.WSDLDOMLoader.loadWSDLDocument(WSDLDOMLoader.java:1126)
    at com.sap.engine.services.webservices.jaxrpc.wsdl2java.ProxyGenerator.generateProxy(ProxyGenerator.java:178)
    ... 56 more
    Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (-1) null. The requested URL was:"https://xxxxxxxxxxxxxxxxxxxx/HCP_SearchService?wsdl"
    at com.sap.engine.services.webservices.tools.WSDLDownloadResolver.resolveEntity(WSDLDownloadResolver.java:180)
    at com.sap.engine.services.webservices.wsdl.WSDLDOMLoader.loadDOMDocument(WSDLDOMLoader.java:1019)
    ... 58 more

    Hi Vijay,
    There was some issues with the wsdl url itselft, now i got the right wsdl url and i tried with wsnavigator , i tested it works fine from there...
    but when i try to import using adaptive web service model it is throwing error..pls find the error log below...i am getting cannot load namespaces and model classes error and also some proxy error..i am giving proxy and 8080 as default...pls let me know what exact proxy settings i have to give here..
    com.sap.tc.webdynpro.model.webservice.exception.WSModelRuntimeException: Exception on creation of service metadata for WSDL URL 'https://xxxxxxxxxxxxxxxxxxchService?wsdl' and service factory configuration '{DynamicProxy.ClassPath=C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.tc.cmi_1.0.0/_cmi_api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.exception_2.0.0/lib/exception.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/boot.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/iq-lib.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/util.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/webservices_lib.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/webservices.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/webservices_api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.engine.webservices_2.0.0/lib/tc_sec_wssec_lib.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.dictionary.runtime_2.0.0/lib/SapDictionaryTypesRuntime.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.dictionary.services_2.0.0/lib/SapDictionaryTypeServices.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.tssap.sap.libs.logging_2.0.0/lib/logging.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.tssap.sap.libs.logging_2.0.0/lib/loggingStandard.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.tssap.sap.libs.logging_2.0.0/lib/jARM.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.tssap.sap.libs.xmltoolkit_2.0.0/lib/sapxmltoolkit.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/activation.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/jaxm-api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/saaj-api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/jaxrpc-api.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/jnet.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/jsse.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.ext.libs.webservices_2.0.0/lib/mail.jar;C:/Program Files (x86)/SAP/IDE/IDE70/eclipse/plugins/com.sap.tc.webdynpro.model.webservice_2.0.0/lib/_webdynpro_model_webservice.jar;, DynamicProxy.INetProxy.Bypass="*.sap.corp"|usc1-dpid01|, DynamicProxy.INetProxy.Port=8080, DynamicProxy.Javac.path=C:\j2sdk1.4.2_19, DynamicProxy.TempDir=C:\Users\sakkav01\AppData\Local\Temp\, DynamicProxy.INetProxy.Host=proxy'
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getOrCreateWsrService(WSModelInfo.java:414)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.readOperationsFromWSDL(WSModelInfo.java:372)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.importMetadataInternal(WSModelInfo.java:342)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.importMetadata(WSModelInfo.java:306)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.importMetadata(WSModelInfo.java:316)
    at com.sap.ide.webdynpro.modeleditor.wizards.model.creation.PageRenameWS.loadNameSpacesAndModelClasses(PageRenameWS.java:435)
    at com.sap.ide.webdynpro.modeleditor.wizards.model.creation.ModelDialog.nextPressed(ModelDialog.java:105)
    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:316)
    at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:423)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:583)
    at org.eclipse.jface.window.Window.open(Window.java:563)
    at com.sap.ide.webdynpro.modeleditor.ModelEditorCallback.createModel(ModelEditorCallback.java:52)
    at com.sap.ide.webdynpro.service.modeleditor.ModelService.createModelWithUI(ModelService.java:70)
    at com.sap.ide.webdynpro.service.modeleditor.ServiceWithUI.createModel(ServiceWithUI.java:49)
    at com.sap.ide.webdynpro.tsmodel.application.provider.ModelNodeProvider.createUniqueName(ModelNodeProvider.java:55)
    at com.tssap.selena.impl.model.elements.EntityImpl.createChildEntityUin(EntityImpl.java:936)
    at com.tssap.selena.impl.model.elements.EntityImpl.createChildEntity(EntityImpl.java:502)
    at com.sap.ide.webdynpro.tsmodel.application.actions.CreationAction.runInternal(CreationAction.java:76)
    at com.sap.ide.webdynpro.tsmodel.application.actions.CreationAction.access$000(CreationAction.java:24)
    at com.sap.ide.webdynpro.tsmodel.application.actions.CreationAction$1.run(CreationAction.java:51)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1595)
    at com.sap.ide.webdynpro.tsmodel.application.actions.CreationAction.run(CreationAction.java:57)
    at com.sap.ide.webdynpro.projectbrowser.actions.PBCreateModelAction.run(PBCreateModelAction.java:95)
    at com.tssap.selena.model.extension.action.SelenaActionCollector$GenericElementActionWrapper.run(SelenaActionCollector.java:224)
    at com.tssap.util.ui.menu.MenuFactory$MuSiAction.saveRunAction(MenuFactory.java:1425)
    at com.tssap.util.ui.menu.MenuFactory$MuSiAction.run(MenuFactory.java:1407)
    at com.tssap.util.ui.menu.MenuFactory$DelegateAction.processInternal(MenuFactory.java:616)
    at com.tssap.util.ui.menu.MenuFactory$DelegateAction.access$100(MenuFactory.java:586)
    at com.tssap.util.ui.menu.MenuFactory$DelegateAction$BusyProcessWorker.run(MenuFactory.java:716)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
    at com.tssap.util.ui.menu.MenuFactory$DelegateAction.process(MenuFactory.java:610)
    at com.tssap.util.ui.menu.internal.MenuListenerFactory$ProcessAdapter.widgetSelected(MenuListenerFactory.java:172)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2022)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
    at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
    at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858)
    at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
    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:324)
    at com.sap.ide.eclipse.startup.Main.basicRun(Main.java:291)
    at com.sap.ide.eclipse.startup.Main.run(Main.java:789)
    at com.sap.ide.eclipse.startup.Main.main(Main.java:607)
    Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.WebserviceClientException: GenericServiceFactory initialization problem. Could not load web service model. See nested exception for details.
    at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DGenericServiceImpl.generateProxyFiles(DGenericServiceImpl.java:158)
    at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DGenericServiceImpl.<init>(DGenericServiceImpl.java:56)
    at com.sap.engine.services.webservices.espbase.client.dynamic.GenericServiceFactory.createService(GenericServiceFactory.java:92)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getOrCreateWsrService(WSModelInfo.java:412)
    ... 52 more
    Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.ProxyGeneratorException: Proxy Generator Error. Problem with WSDL file parsing. See nested message.
    at com.sap.engine.services.webservices.jaxrpc.wsdl2java.ProxyGenerator.generateProxy(ProxyGenerator.java:182)
    at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DGenericServiceImpl.generateProxyFiles(DGenericServiceImpl.java:155)
    ... 55 more
    Caused by: com.sap.engine.lib.xml.util.NestedException: IO Exception occurred while parsing file:Cannot connect to https://xxxxxxxxxxxxxxxxx_SearchService?wsdl, passing via http proxy: https://usc1-dpid01:21000: Peer sent alert: Alert Fatal: illegal parameter -> java.io.IOException: Cannot connect to https://xxxxxxxxxxxx_SearchService?wsdl, passing via http proxy:proxy: Peer sent alert: Alert Fatal: illegal parameter
    at com.sap.engine.services.webservices.wsdl.WSDLDOMLoader.loadDOMDocument(WSDLDOMLoader.java:1039)
    at com.sap.engine.services.webservices.wsdl.WSDLDOMLoader.loadWSDLDocument(WSDLDOMLoader.java:1126)
    at com.sap.engine.services.webservices.jaxrpc.wsdl2java.ProxyGenerator.generateProxy(ProxyGenerator.java:178)
    ... 56 more
    Caused by: java.io.IOException: Cannot connect to https://xxxxxxxxxxxxxxx_SearchService?wsdl, passing via http proxy:: Peer sent alert: Alert Fatal: illegal parameter
    at com.sap.engine.services.webservices.tools.WSDLDownloadResolver.resolveEntity(WSDLDownloadResolver.java:175)
    at com.sap.engine.services.webservices.wsdl.WSDLDOMLoader.loadDOMDocument(WSDLDOMLoader.java:1019)
    ... 58 more

  • Consume an external web service with an ABAP proxy

    Hello,
    I'm working on creating an ABAP Proxy to consume my first web service.  In searching SCN I haven't found a comprehensive list of steps to complete the process, but I have found information on generating a proxy from a WSDL and creating a logical port.
    My first issue arises when I go to SPROXY to generate a proxy from a WSDL, I see the message 'Local objects only (No Connection to ESR)', and I have no ability to 'create'.  The Enterprise Service Repository seems to be the new name for the Integration Repository, if that helps.  Do I need the ESR installed to create a proxy?
    A follow-on question, assuming I do need the ESR, would be what do I do with it?  It appears to serve the purpose of design for interfaces, messages, and mapping, but I thought that happened when I created a proxy in SPROXY.
    We're on ECC 6.0, with a 702 / 0007 basis release.  I appreciate and light you can shed on the topic.
    Thanks

    ESR is part of the PI system, and it is where all interfaces details are stored.You could create an ABAP Proxy from a pre-defined WDSL yet stored in PI as part of some communication, but you can also import directly a WSDL from a local file or even from a URL.
    ABAP proxy generates a proxy class and a set of abap structures , fields and data elements. Simply by filling the data and call a method in the proxy class (depends of syncrhonization a different method name) you can consume your service. No PI is needed if you use the local option.
    There is a very good Tutorial from Thomas Jung. I'll try to find it.
    http://scn.sap.com/people/thomas.jung/blog/2005/05/13/calling-webservices-from-abap-via-https
    Here you have a lot of tutorials
    Best regards

  • Web Service using SSL certificates

    Hi All,
    I built an Adaptive Web service model using a WSDL file. The web service is from a third party provider and it requests exchange certificates.
    When I tried to consume any of the methods of the web service I get an error: sometime is an invalid response code (500) and sometimes is Peer certificate rejected by ChainVerifier.
    We created a logical destination and in this is where I'm sepecifying what certificate to use also I tried creating a service group but in this case the error says Configuration not found for application, but I created in NWA maybe something is missing.
    Any idea what the issue is? also it is posible to indicate in java what certificate to use?
    Regards,
    Eduardo Campos

    HI Eduardo,
    Please refer SAP Note 838111 for Consuming SSL webervices.
    Please refer the below link for the process flow of consuming SSL webservices..
    https://cw.sdn.sap.com/cw/docs/DOC-32734?decorator=print
    Hope this helps you..
    Regards,
    Saleem Mohammad.

  • Connect to Secure web service with certificate from SAP EP

    Hi Experts,
    Here is the current situation:
    1. Our business requirement is to connect 3rd party RESTful web service which requires secure connection with private client certificate attached
    2. I've tested in my Java test application and successfully attached private certificate to HttpsURLConection request to the web service and made a connection. No problem at all.
    KeyStore keyStore  = KeyStore.getInstance("PKCS12");
    InputStream inputStream = new FileInputStream("privateKeyCert.p12");
    keyStore.load(inputStream, "myPassword".toCharArray());
    KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
    keyManagerFactory.init(keyStore, "myPassword".toCharArray());
    KeyManager[] kms = keyManagerFactory.getKeyManagers();
    SSLContext sslContext = SSLContext.getInstance("SSL");
    sslContext.init(kms, null, new SecureRandom());
    SSLSocketFactory sockFact = sslContext.getSocketFactory();
    URL url = new URL("https://www.thirdpartywebservice.com/testroot/");
    HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
    conn.setSSLSocketFactory(sockFact);
    conn.setRequestMethod("POST");
    conn.setDoOutput(true);
    conn.setDoInput(true);
    conn.setUseCaches(false);
    conn.setDefaultUseCaches (false);
    conn.setRequestProperty("Content-Type", "text/xml");
    3. Next, I tried to apply my Java application to SAP EP NetWeaver, and found that I have to use SecureConnectionFactory:
    https://help.sap.com/saphelp_nw70ehp1/helpdata/en/e2/71c83edf72e16be10000000a114084/content.htm
    4. So, I modified my Java code for SAP EP:
    KeyStore keyStore  = KeyStore.getInstance("PKCS12");
    InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("privateKeyCert.p12");
    keyStore.load(inputStream, "myPassword".toCharArray());
    SecureConnectionFactory scFactory = new SecureConnectionFactory(keyStore);
    HttpURLConnection conn = scFactory.createURLConnection("https://www.thirdpartywebservice.com/testroot/");
    conn.setRequestMethod("POST");
    conn.setDoOutput(true);
    conn.setDoInput(true);
    conn.setUseCaches(false);
    conn.setDefaultUseCaches (false);
    conn.setRequestProperty("Content-Type", "text/xml");
    And I'm facing the following error message:
    Exception: java.security.UnrecoverableKeyException: ja
    va.security.GeneralSecurityException: Unable to decrypt private key: javax.crypto.BadPaddingException: Invalid PKCS#5 padding length: 253
    Could you please help me what this error message means?
    Do you think do I need to to do some other configuration to make connection to web service with client certificate?
    This is our first approach. Please help...
    Thank you in advance.

    SunJSSE implement SSL server CertificateRequest in a strict mode, if client failed to find a proper certificate corresponding the server request, it does not guess what's the proper certificate and send to the server. In your case, because there is no intermediate certificate in the client context, so there is no way to make the decision which certificate would be acceptable by server, so client does not send any cert to server. That's why you got a handshaking error.
    I guess your client key store does not contains a full certificate path from the client end-entity certificate to the root CA. Please import the full certificate path into the key store.
    BTW, these approaches should work, but I found no reason why one does not adopt #1:
    1. import the full certification path of client certificate into client key store.
    2. as a workaround, configure the server to send a list including the intermediate certificates;
    3. as a workaround, you will have to customize the client KeyManager if you don't want to or are not able to configure the server to send a list including the intermediate certificates.

  • Invoking an external web service through a JCD with Basic Authentication

    Group,
    I am trying to invoke an external web service (written in ASP.Net) from a jcd (5.1.2). The web service is guarded by Basic Authentication. I have entered the crudentials into the External Web service environment component and deployed the project. I receive the following error from the .invoke() method:
    request requires HTTP authentication: Unauthorized
    I have tried the same request through SoapUI using the same crudentials and get back the response correctly. Has anyone tried invoking an external web service with basic authentication through a jcd in 5.1.2 before?
    One other item of note. I have another jcd calling a different external web service deployed on the same domain. I hope that this isn't interfering with the execution of this service as it doesn't require any crudentials to execute.

    Hey Chris.
    I am just starting to write a jcd that calls an external web service but cannot find any sample code nor instructions on how to do it in the supplied documentation. Could you send me a code sample from your one?
    Cheers
    Matt

Maybe you are looking for