Consuming a Web Service via SSL with Basic Authentication

Hello,
I have a simple web service (returns a parameter value) and want to consume it. Therefore I have generated a proxy for its in Netweaver Studio SP13.
When I set up the web service to be accessed via HTTP and Basic Authentication (Username/Password), everything is fine. When I set up the web service to communicate via HTTPS, I get the following error message in my client:
java.rmi.RemoteException: Service call exception; nested exception is:
     java.lang.NullPointerException
     at priv.senw04.wsproxy.multisec_ssl.SSLBindingStub.pingText(SSLBindingStub.java:87)
     at priv.senw04.wsproxy.multisec_ssl.SSLBindingStub.pingText(SSLBindingStub.java:96)
     at priv.se.wsclient.MultiSecSSL.main(MultiSecSSL.java:38)
Caused by: java.lang.NullPointerException
     at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.disconnect(HTTPSocket.java:625)
     at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.HTTPTransport.closeSession(HTTPTransport.java:396)
     at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1312)
     at priv.senw04.wsproxy.multisec_ssl.SSLBindingStub.pingText(SSLBindingStub.java:80)
     ... 2 more
Testing the web service with WebServiceNavigator and/or by using a generated WebDynpro Client results in the following error:
000D604C66BE004E0000001300000AFC00040922E0160632 : An error occurred during processing the timestamp. The error was: com.sap.security.core.ws.wss.NoSecurityHeaderException No wsse:Security header has been defined for role soap:finalActor. Please verify the policy configuration..
But my main focus is on the client implementation based on a proxy. Here comes the client's code:
public class MultiSecSSL {
    public static void main(String[] args) {
        try {
            MultiSecuritySSLAuthImpl serviceInterface = new MultiSecuritySSLAuthImpl();
            SSLBindingStub service = (SSLBindingStub)serviceInterface.getLogicalPort(MultiSecuritySSLAuthViDocument.class);
            SecurityProtocol protocol = (SecurityProtocol) service._getGlobalProtocols().getProtocol("SecurityProtocol");
            AuthenticationContext auth = protocol.getAuthenticationContext();
            auth.setIgnoreSSLServerCertificate(true);
            auth.setUsername("cfpcompany");
            auth.setPassword("demo");
            String ret = service.pingText("Called service MultiSecurity via SSL");
            System.out.println(ret);
        } catch (Exception e) {
             e.printStackTrace(System.out);
Here comes the logical port information of the generated proxy:
<?xml version="1.0" encoding="UTF-8"?>
<LogicalPorts Name='MultiSecuritySSLAuth' InterfaceName='priv.senw04.wsproxy.multisec_ssl.MultiSecuritySSLAuth'>
  <LogicalPort Name='SSLPort_Document' Endpoint='https://192.168.129.76:50001/MultiSecuritySSLAuth/SSL?style=document' BindingName='SSLBinding' BindingUri='urn:MultiSecuritySSLAuthWsd/SSL/document' BindingImplementation='SOAP 1.1 HTTP Binding with Attachments' StubName='priv.senw04.wsproxy.multisec_ssl.SSLBindingStub' Default='true' InterfaceName='priv.senw04.wsproxy.multisec_ssl.MultiSecuritySSLAuthViDocument' Original='true' Valid='true'>
    <globalFeatures>
      <Feature Name='http://www.sap.com/webas/630/soap/features/headers/' Provider='SoapHeadersProtocol' Original='false'>
      </Feature>
      <Feature Name='http://www.sap.com/webas/630/soap/features/session/' Provider='SessionProtocol' Original='false'>
        <Property Name='SessionMethod' Value='httpCookies'>
        </Property>
      </Feature>
      <Feature Name='http://www.sap.com/webas/630/soap/features/authentication' Provider='SecurityProtocol' Original='true'>
        <Property Name='AuthenticationLevel' Value='None'>
        </Property>
        <Property Name='AuthenticationMechanism' Value='HTTP'>
        </Property>
        <Property Name='AuthenticationMethod' Value='BasicAuth'>
        </Property>
        <Property Name='SupportsSSO2Authentication' Value='false'>
        </Property>
      </Feature>
      <Feature Name='http://www.sap.com/webas/630/soap/features/transportguarantee' Original='true'>
        <Property Name='Level' Value='No'>
        </Property>
        <Property Name='TLSType' Value='SSL'>
        </Property>
      </Feature>
    </globalFeatures>
    <localFeatures>
      <Operation Name='pingText'>
        <Feature Name='http://www.sap.com/webas/630/soap/features/wss' Original='true'>
          <Property Name='RequestPolicy' Value='Signature'>
          </Property>
          <Property Name='ResponsePolicy' Value='None'>
          </Property>
        </Feature>
        <Feature Name='http://sap.com/webservices/authorization' Original='true'>
        </Feature>
      </Operation>
    </localFeatures>
  </LogicalPort>
</LogicalPorts>
To me, this looks consistent. Any idea, what is misconfigured on my machine ?

Hi Martin,
that is exactly, what I did.
- Change Web Service Configuration in IDE
- Build and Deploy the Service to my local Server
- Check Service in Visual Administrator
- Deleted and Regenerated the Standalone Proxy
- Deleted and Recreated the link between CLient and Proxy Project in IDE
- Started Client
Here comes the section of the ws-deployment-descriptor.xml of the service. For me, it matches, what the proxy generated.
  <webservice>
    <guid>ed8363_10876a54b6d__7fe9_192_168_129_76_1135862193037</guid>
    <ejb-name-temp>MultiSecWSBean</ejb-name-temp>
    <webservice-name>
      <namespaceURI>urn:MultiSecuritySSLAuthWsd</namespaceURI>
      <localName>MultiSecuritySSLAuth</localName>
    </webservice-name>
    <webservice-internal-name>MultiSecuritySSLAuth</webservice-internal-name>
    <standard-namespaceURI>urn:MultiSecuritySSLAuthWsd</standard-namespaceURI>
    <ws-configuration>
      <configuration-name>SSL</configuration-name>
      <ejb-name>MultiSecWSBean</ejb-name>
      <service-endpoint-name>
        <namespaceURI>urn:MultiSecuritySSLAuthWsd</namespaceURI>
        <localName>SSLPort</localName>
      </service-endpoint-name>
      <wsdl-porttype-name>
        <namespaceURI>urn:MultiSecuritySSLAuthWsd</namespaceURI>
        <localName>MultiSecuritySSLAuthVi</localName>
      </wsdl-porttype-name>
      <webservice-definition-ref>
        <package>com.technidata.cfp.i3rdparty.cfpxml</package>
        <name>MultiSecuritySSLAuthWsd.wsdef</name>
      </webservice-definition-ref>
      <service-endpoint-vi-ref>
        <package>com.technidata.cfp.i3rdparty.cfpxml</package>
        <name>MultiSecuritySSLAuthVi.videf</name>
      </service-endpoint-vi-ref>
      <transport-binding name="SOAPHTTP_TransportBinding">
        <wsdl-binding-name>
          <namespaceURI>urn:MultiSecuritySSLAuthWsd</namespaceURI>
          <localName>SSLBinding</localName>
        </wsdl-binding-name>
      </transport-binding>
      <transport-address>/MultiSecuritySSLAuth/SSL</transport-address>
      <global-features>
        <feature name="http://www.sap.com/webas/630/soap/features/transportguarantee" protocol="SecurityProtocol">
          <property name="TLSType" value="SSL"/>
        </feature>
        <feature name="http://www.sap.com/webas/630/soap/features/authorization" protocol="SecurityProtocol"/>
        <feature name="http://www.sap.com/webas/630/soap/features/authentication" protocol="SecurityProtocol">
          <property name="AuthenticationMethod" value="BasicAuth"/>
          <property name="AuthenticationMechanism" value="HTTP"/>
          <property name="SupportsSSO2Authentication" value="false"/>
        </feature>
      </global-features>
      <operation-configuration uniqueViName="pingText(java.lang.String)">
        <transport-binding-configuration>
          <input>
            <property name="soapAction" value=""/>
            <property name="encodingStyle" value="http://schemas.xmlsoap.org/soap/encoding/"/>
          </input>
          <output>
            <property name="encodingStyle" value="http://schemas.xmlsoap.org/soap/encoding/"/>
          </output>
        </transport-binding-configuration>
        <feature name="http://www.sap.com/webas/630/soap/features/wss" protocol="SecurityProtocol">
          <property name="RequestPolicy" value="None"/>
          <property name="ResponsePolicy" value="None"/>
        </feature>
        <feature name="http://sap.com/webservices/authorization" protocol="SecurityProtocol">
          <property name="security-roles">
            <property name="role1" value="use_multisec_service"/>
          </property>
        </feature>
      </operation-configuration>
    </ws-configuration>
  </webservice>
Regards,
Stefan

Similar Messages

  • WebDynpro Consuming a Web Service via SSL (https)

    Hello dovelopers,
    i want to consume a Web Service in a WebDynpro Application via https.
    can anybody give me a few links to pdfs etc.
    Thank You
    Michel

    Try this:
    Are you trying to create https trust relation ship between two SAP Portals or SAP Portal to Non Sap Portal?
    Help on How to Consume a Web Service in SAP Portal?
    http://help.sap.com/saphelp_nw04/helpdata/en/f5/30c5aca7f92f418d889b99ccc9ee08/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/df/a08340d990ce62e10000000a155106/content.htm
    http://www.sapportalguide.com/web_services.html
    Here the documents helps you how to integreate https authentication betweeen two portals:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/2235260b413fe1e10000000a11466f/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/62/881e3e3986f701e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/14/29236de1864c6e8d46e77192adaa95/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/d3/41c8efb31d11d5993800508b6b8b11/frameset.htm
    Thanks
    Krishna

  • Calling web service via SSL

    Hi,
    I do not succeed in calling a web service via SSL from within a Web Dynpro application.
    Current settings of my logical port:
    Target Address: https://...
    Authentication: HTTP authentication, basic (username/password)
    I do call methods _setUser and _setPassword to set userid and password before calling method execute() of my modelclass.
    On calling method execute(), I get message "Connection closed by remote host".
    Any suggestions ?
    Many thanks.
    Jorgen

    Can you check the following?
    1) Did you install the SAP Cryptographic toolkit for Java available from service.sap.com?
    2) Did you install the "Java Cryptography Extension (JCE)
    Unlimited Strength Jurisdiction Policy Files 1.4.2". For Sun they are available here: http://java.sun.com/j2se/1.4.2/download.html (last item on page)
    3) How is the SSL server configured? Does it require client authentication? In this case you must send a client certificate.

  • WWSAPI - Cannot connect to web service via SSL and HTTP proxy authentication with NTLM, errorCode 0x803d0016, HTTP status 407

    Hi,
    I built a web service client using WWSAPI. The connection works via SSL (without HTTP proxy) and it works with SSL and proxy with basic authentication as well. When I try to connect using a proxy with NTLM authentication, then I get the errorCode
    0x803d0016, HTTP status "407 (0x197)", "Proxy Authentication Required".
    In WireShark I see only one HTTP request to connect to the proxy with NTLM Message Type: NTLMSSP_NEGOTIATE. The HTTP Response returns Status 407 and the connection ist closed. Comparing this to Internet Explorer - the Connection is not closed and
    a second request with NTLMSSP_AUTH is sent.
    Why doesn't it make the complete NTLM handshake? Why wasn't sent the NTLMSSP_AUTH directly?
    I oriented in the HttpCalculatorWithKerberosOverSslClientExample.
    Using WS_HTTP_HEADER_AUTH_SECURITY_BINDING,
    WS_SECURITY_BINDING_PROPERTY_HTTP_HEADER_AUTH_SCHEME was set to WS_HTTP_HEADER_AUTH_SCHEME_NTLM, WS_SECURITY_BINDING_PROPERTY_HTTP_HEADER_AUTH_TARGET to WS_HTTP_HEADER_AUTH_TARGET_PROXY. I tried WS_DEFAULT_WINDOWS_INTEGRATED_AUTH_CREDENTIAL_TYPE but also WS_STRING_WINDOWS_INTEGRATED_AUTH_CREDENTIAL_TYPE.
    Any idea?
    Thanks

    Hi,
    I built a web service client using WWSAPI. The connection works via SSL (without HTTP proxy) and it works with SSL and proxy with basic authentication as well. When I try to connect using a proxy with NTLM authentication, then I get the errorCode
    0x803d0016, HTTP status "407 (0x197)", "Proxy Authentication Required".
    In WireShark I see only one HTTP request to connect to the proxy with NTLM Message Type: NTLMSSP_NEGOTIATE. The HTTP Response returns Status 407 and the connection ist closed. Comparing this to Internet Explorer - the Connection is not closed and
    a second request with NTLMSSP_AUTH is sent.
    Why doesn't it make the complete NTLM handshake? Why wasn't sent the NTLMSSP_AUTH directly?
    I oriented in the HttpCalculatorWithKerberosOverSslClientExample.
    Using WS_HTTP_HEADER_AUTH_SECURITY_BINDING,
    WS_SECURITY_BINDING_PROPERTY_HTTP_HEADER_AUTH_SCHEME was set to WS_HTTP_HEADER_AUTH_SCHEME_NTLM, WS_SECURITY_BINDING_PROPERTY_HTTP_HEADER_AUTH_TARGET to WS_HTTP_HEADER_AUTH_TARGET_PROXY. I tried WS_DEFAULT_WINDOWS_INTEGRATED_AUTH_CREDENTIAL_TYPE but also WS_STRING_WINDOWS_INTEGRATED_AUTH_CREDENTIAL_TYPE.
    Any idea?
    Thanks

  • Consuming a web service in Oracle9i with JAX-RPC calling

    Hello,
    i need to generate web service client in oracle9i db using jpublisher. And i found in this tutorial http://www.oracle.com/technology/sample_code/tech/java/jsp/callout_users_guide.htm that Oracle 9i is not supporting JAX-RPC web services calling, because of JDK 1.3.
    Is there any possibility to consume a web service using JAX-RPC instead of Oracle SOAP in Oracle 9.2 database ?

    I use utl_http pl/sql supplied package for this need - http://akdora.wordpress.com/2007/08/03/calling-a-web-service-by-plsql-utl_http/
    But I believe you may find more information with these resource -
    http://www.oracle.com/technology/sample_code/tech/java/web_services/index.html
    http://forums.oracle.com/forums/forum.jspa?forumID=97
    http://forums.oracle.com/forums/forum.jspa?forumID=99
    http://www.oracle.com/technology/sample_code/tech/java/jsp/dbwebservices.html
    Best regards.

  • Consuming a Web service thru XI with Web Dynpro for ABAP

    Hi all,
    Does anyone know how to call a web service thru XI from Web Dynpro ABAP. The web service will call an RFC and bring back some data.
    Some guidelines on how to achieve this will be very much appreciated.
    Thanks
    KG.

    Hi Kunal,
    Do you want to use XI at the runtime of the service ? Usually for a synchronous call, XI is used only at the design time to design the message interface. Using this message interface the proxy class  in ur ABAP system can be generated. In the interface method of your proxy class you can call your RFC. Finally generate a webservice out of this proxy class via SPROXY tsn.
    Get the WSDL url of this webservice in tsn WSADMIN . Using this url you can call the service (peer-to-peer, no XI involved at runtime) with Webdynpro.
    I hope this answers your question.
    Regards,Girish

  • Consuming CRM Web Services via 3rd Party system

    Hi Gurus
    I've created an RFC Function Module which I converted to a Web Service
    I've used soapUI to test the Web Service and it's working perfectly.
    The 3rd Party wanting to use the Web Service is new to this technology and I'm not much better from a consuming point of view.
    What URL does the 3rd party need to call:
    WSD
    WDSL
    The Endpoint
    Or am I completely off.
    Many Thanks in advance
    Panduranga

    Hi,
    Your question does not make sense.
    If you have tested your web service successfully with SOAPUI, you do know the answer.
    The 3rd party needs to use the URL that you used for your SOAPUI test.
    Regards,
    Olivier

  • Calling web service via utl_dbws with unbounded return values

    Hello, everyone.
    I'm trying to use utl_dbws to call web service from Oracle DB 10 g.
    WS has unbounded return value:
    <xs:element maxOccurs='unbounded' minOccurs='0' name='return' type='xs:string'/>
    I'm setting return paramter in web service call handler like this:
    sys.UTL_DBWS.set_return_type(l_h_service_call, cs_qname_type_string);
    and when I'm trying to call it from PL/SQL function I'm getting an error:
    ORA-29532: Java call terminated by uncaught Java exception:
    deserialization error: XML reader error: unexpected character content: "s2"
    ORA-06512: at "SYS.UTL_DBWS", line 388
    ORA-06512: at "SYS.UTL_DBWS", line 385
    ORA-06512: at line 38
    I've tried to return values by out parameters and got the same exception.
    It looks like utl_dbws needs to know parameters count before calling.
    Have anyone succeded in getting arrays from Web Service call?
    This is a part of wsdl:
    <xs:complexType name='getProcessList'>
    <xs:sequence>
    <xs:element minOccurs='0' name='nameMask' type='xs:string'/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name='getProcessListResponse'>
    <xs:sequence>
    <xs:element maxOccurs='unbounded' minOccurs='0' name='return' type='xs:string'/>
    </xs:sequence>
    </xs:complexType>
    Throught SoapUI I can produce such kind of request:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:proc="http://processmanager.argustelecom.ru/">
    <soapenv:Header/>
    <soapenv:Body>
    <proc:getProcessList>
    <processNameMask>*</processNameMask>
    </proc:getProcessList>
    </soapenv:Body>
    </soapenv:Envelope>
    and get a response:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body>
    <ns2:getProcessListResponse xmlns:ns2="http://processmanager.argustelecom.ru/">
    <return>s1</return>
    <return>s2</return>
    <return>s3</return>
    <return>s4</return>
    </ns2:getProcessListResponse>
    </env:Body>
    </env:Envelope>
    PL/SQL function:
    DECLARE
    cs_qname_type_string CONSTANT sys.UTL_DBWS.qname
    := sys.UTL_DBWS.to_qname('http://www.w3.org/2001/XMLSchema', 'string') ;
    cs_qname_type_int CONSTANT sys.UTL_DBWS.qname := sys.UTL_DBWS.to_qname('http://www.w3.org/2001/XMLSchema', 'int');
    cs_qname_type_any CONSTANT sys.UTL_DBWS.qname
    := sys.UTL_DBWS.to_qname('http://www.w3.org/2001/XMLSchema', 'anyType') ;
    cs_endpoint CONSTANT VARCHAR2(256) := 'http://server:8080/process-manager/ProcessManager';
    l_service sys.UTL_DBWS.service;
    l_service_qname sys.UTL_DBWS.qname;
    l_port_qname sys.UTL_DBWS.qname;
    l_operation_qname sys.UTL_DBWS.qname;
    l_h_service_call sys.UTL_DBWS.call;
    l_params sys.UTL_DBWS.anydata_list;
    l_ret_val SYS.ANYDATA;
    BEGIN
    l_service_qname := sys.UTL_DBWS.to_qname(NULL, 'ProcessManagerService');
    l_service := sys.UTL_DBWS.create_service(l_service_qname);
    l_port_qname := sys.UTL_DBWS.to_qname(NULL, 'ProcessListServiceBinding');
    l_operation_qname := sys.UTL_DBWS.to_qname('http://processmanager.argustelecom.ru/', 'getProcessList');
    l_h_service_call := sys.UTL_DBWS.create_call(l_service, l_port_qname, l_operation_qname);
    sys.UTL_DBWS.set_target_endpoint_address(l_h_service_call, cs_endpoint);
    -- return type
    sys.UTL_DBWS.set_return_type(l_h_service_call, cs_qname_type_any);
    -- param type
    sys.UTL_DBWS.ADD_PARAMETER(l_h_service_call, 'processNameMask', cs_qname_type_string, 'ParameterMode.IN');
    l_params(1) := anydata.convertvarchar2('*');
    l_ret_val := sys.UTL_DBWS.invoke(l_h_service_call, l_params);
    IF l_ret_val IS NULL THEN
    DBMS_OUTPUT.put_line('l_ret_val is null');
    ELSE
    DBMS_OUTPUT.put_line('l_ret_val is not null');
    END IF;
    sys.UTL_DBWS.release_call(l_h_service_call);
    END;
    Edited by: Ilya on 03.12.2008 3:50

    Hi Tony
    I'm not sure if you would have solved your problem by now, but with my recent experience with the utl_dbws package, for doc lits with complex data types, you have to call the service with an XML request, as opposed to passing the param array.
    If you still need details, reply accordingly.
    Ta
    cT

  • Consuming stateful web service via ABAP proxy

    Hi all,
    I´ve got the following scenario. I´ve a ABAP proxy generated based on a WSDL file. The provider is a WebService provided by a tomcat server. (no PI etc. as middleware). The problem i´ve now is that the webservice is stateful so I need a stateful communication between my ABAP report (client) and the Web Service.
    I´ve already found the possibiliy to switch on the feature "Session-Oriented Communication" on "Preconfiguration Tab" of the ABAP Proxy Screen. But unfortunately it´s not working.
    Anybody knows whether general system settings has to be changed for this. Or anybody has other tips.
    I´m currentliy working on the SAP Discovery System v3 which is a Netweaver 7.0.
    Many thanks in advance for your answers,
    Andy

    Marcelo  Almeida wrote:
    > You can use Logial port for it in LPCONFIG ( Transaction). See this examplo Below:
    >
    > TRY.
    >
    > CREATE OBJECT my_proxy
    > EXPORTING
    > logical_port_name = 'LP01'.
    > CATCH cx_ai_system_fault.
    > ENDTRY.
    >
    > TRY.
    > input-airline_id = p_carrid.
    > input-connection_id = p_connid.
    > input-flight_date = p_fldate.
    >
    > CALL METHOD my_proxy->flight_get_detail
    > EXPORTING
    > input = input
    > IMPORTING
    > output = output.
    > CATCH cx_ai_system_fault.
    > CATCH cx_ai_application_fault.
    > ENTRY.
    >
    > Its necessary create a connection in SM59 (type H) and setting in the call parameters logical port (LPCONFIG).
    Hi,
    thanks for your answer. It´s working!
    Cheers,
    Andy

  • While creating web service proxy for a basic authentication WSDL getting  WsCompile.AbortException

    Hi,
    I am usingJdeveloper 11.1.2.4
    I have to use a basic authetication WSDL in my appllication to call a web service, when I create a webservice cleint and proxy and follwed the wizard after clking finish it throws following error.
    The WSDL is created by an exteanl SAP application
    com.sun.tools.ws.wscompile.AbortException
    at com.sun.tools.ws.wscompile.WsimportTool.generateCode(WsimportTool.java:280)
    at oracle.jdevimpl.webservices.tools.weblogic.JDevWsimportTool.generateCode(JDevWsimportTool.java:602)
    at oracle.jdevimpl.webservices.tools.weblogic.JDevWsimportTool.generateCode(JDevWsimportTool.java:443)
    at oracle.jdevimpl.webservices.tools.weblogic.WebLogicAdaptor.wsimportGenerateCode(WebLogicAdaptor.java:1020)
    at oracle.jdevimpl.webservices.tools.weblogic.WebLogicAdaptor.createProxy(WebLogicAdaptor.java:284)
    at oracle.jdeveloper.webservices.tools.WebServiceTools.createProxy(WebServiceTools.java:271)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at oracle.jdeveloper.webservices.tools.WebServiceTools$1.invoke(WebServiceTools.java:132)
    at $Proxy38.createProxy(Unknown Source)
    at oracle.jdeveloper.webservices.model.proxy.generator.CreateProxy.createJaxWsProxy(CreateProxy.java:1194)
    at oracle.jdeveloper.webservices.model.proxy.generator.CreateProxy.doGeneration(CreateProxy.java:382)
    at oracle.jdeveloper.webservices.model.proxy.generator.CreateProxy.action(CreateProxy.java:174)
    at oracle.jdeveloper.webservices.model.generator.GeneratorAction.run(GeneratorAction.java:142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Any thing I missed?
    Thanks
    R. Ramesh

    Two comments:
    1) The generated proxy looks correct.  If you explore the generated code for the InputParams object and the Rowset object, they should represent the incoming and outgoing data structures for your transaction.  If not, and if you are returning an XML property type from the transaction, be sure that you have used the "Assign Reference Document" technique to tell MII what the structure of your outgoing document is (there are a few other discussion threads on that topic).
    2) Personally, I find it much easier to consume MII services from .NET code using a URL-based technique instead of a SOAP based technique.  Invoke the "Runner" servlet (see the documentation) and you'll get an XML document back, that will always be in the MII Rowsets/Rowset/Row format.  Also, it is "self describing" because it includes Column metadata information.  It is very trivial to load this into a .NET XmlDocument object and parse/process it.  In fact, doing a similar approach, I've been able to make MII services appear as ADO.NET tables/stored procedures to .NET code.
    Rick

  • Problem consuming web service with basic authentication

    Hello,
    I've set up a web service with basic authentication. Although I have to log in before being able to open the overview page of the web service in the Web Service Navigator, the response I get after sending a request is:
    Authority check failed
    I get this response in the Web Service Navigator as well as when consuming the web service via standalone proxy classes.
    The following is strange, too: It is not possible to change  authentication in the generated logical port. It is set to "none". I changed it via the XML file where I added the properties "AuthenticationMethod" (value "BasicAuth") and "AuthenticationMechanism" (value "HTTP"). But I got the above response anyway.
    Thanks for your help!
    Regards

    I used basic authentication for my web service.
    I was able to obtain a hardcopy of the logfiles in the meantime. The invocation of the web service is stored there with the following error messages:
    <i>SOAP Runtime: Exception message: Schwerer Prozessierungsfehler macht eine SOAP-Fault-Behandlung erforderlich
    SOAP Runtime: SOAP Fault exception occurred in program CL_SOAP_RUNTIME_SERVER========CP in include CL_SOAP_RU NTIME_SERVER... [the picture is cut here]</i>
    In addition to that I found a thread in SDN that dealt with exactly the same problem:
    Web Service Homepage: Authority check failed
    But I have the same problem like Kimberly Carmack (the last post on the second page). We do not have that role in our system.

  • 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

  • Wrong data when consuming web service via ABAP

    Dear all,
    we tried to consume a web service via ABAP and used one of the various existing how-to papers from the internet in order to develop everything.
    The development was not that difficult, but when we now execute our ABAP, we noticed that
    - the first 100 returned rows from the webservice are completely correct
    - then we receive 10-15 completely incorrect rows (empty fields, redundant lines, etc.)
    - the rest of the data (60 records) is correct again
    As we nearly all objects have been generated automatically via SE80, I do not really know where this problem might come from. We double checked the original data and there everything is correct.
    Any ideas?
    Thanks for your feedback,
    Andreas

    Marcelo  Almeida wrote:
    > You can use Logial port for it in LPCONFIG ( Transaction). See this examplo Below:
    >
    > TRY.
    >
    > CREATE OBJECT my_proxy
    > EXPORTING
    > logical_port_name = 'LP01'.
    > CATCH cx_ai_system_fault.
    > ENDTRY.
    >
    > TRY.
    > input-airline_id = p_carrid.
    > input-connection_id = p_connid.
    > input-flight_date = p_fldate.
    >
    > CALL METHOD my_proxy->flight_get_detail
    > EXPORTING
    > input = input
    > IMPORTING
    > output = output.
    > CATCH cx_ai_system_fault.
    > CATCH cx_ai_application_fault.
    > ENTRY.
    >
    > Its necessary create a connection in SM59 (type H) and setting in the call parameters logical port (LPCONFIG).
    Hi,
    thanks for your answer. It´s working!
    Cheers,
    Andy

  • Invoking Siebel CRM OnDemand Web Service via BPEL

    I'm trying to invoke a Siebel CRM OnDemand Web Service via BPEL. Basically, the Siebel guide says to post to a url with user/pwd to get a session ID returned from a cookie. I did that using embedded java and have the session ID as a variable in my BPEL process. My problem is with now calling the Web Service to perform the action. I have a WSDL from Siebel, but the guide says to use an HTTP post with the session ID in the url and the XML in the body. How do I do that? Shouldn't the WSDL handle that when I create the Partner Link? Do I need to use more embedded Java for this or can I set up a Partner Link? I created a Partner Link and it shows the methods I want to use, but I get the following error when I try to call it because I don't know where to add the session ID:
    <ErrorCode xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">SBL-ODU-01006</ErrorCode>
    <ErrorMessage xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">Internal Error: Session is not available. Aborting.</ErrorMessage>
    Any help would be GREATLY appreciated. Please let me know if you need more information.
    THANKS!

    The Siebel OnDemand web services can accept the siebel session token in the URL. Append ';jessionid={%sessionIdFromCookie%}' to the end point. Obviously this has to be done dynamically. Refer to the article called 'Making BPEL Processes Dynamic' (http://www.oracle.com/technology/pub/articles/bpel_cookbook/carey.html) pay particular attention to the 'Eliminating address dependency at run time' section.
    Peter

  • Calling a web service through SSL via a stand alone java class

    HI,
    I am trying to call a web service through SSL via a simple stand alone java client.
    I have imported the SSL certificate in my keystore by using the keytool -import command.
    Basically I want to add a user to a group on the server. Say I add a user user 1 to group group 1 using an admin userid and password. All these values are set in an xml file which I send to the server while calling the server. I pass the web service URL, the soap action name and the xml to post as the command line arguments to the java client.
    My xml file(Add.xml) that is posted looks like :
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope
    xmlns:xsi = "http://www.w3.org/1999/XMLSchema-instance"
    xmlns:SOAP-ENC = "http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd = "http://www.w3.org/1999/XMLSchema"
    SOAP-ENV:encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body>
    <namesp1:modifyGroupOperation xmlns:namesp1 = "/services/modifyGroup/modifyGroupOp">
    <auth>
    <user>adminUser</user>
    <password>adminPassword</password>
    </auth>
    <operationType>ADD</operationType>
    <groupName>group1</groupName>
    <users>
    <userName>user1</userName>
    </users>
    </namesp1:modifyGroupOperation>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    I call the client as:
    java PostXML https://com.webservice.com/services/modifyGroup "/services/modifyGroup/modifyGroupOp" Add.xml
    I my client, I have set the following:
    System.setProperty("javax.net.ssl.keyStore", "C:\\Program Files\\Java\\jre1.5.0_12\\lib\\security\\cacerts");
    System.setProperty("javax.net.ssl.keyStorePassword", "password");
    System.setProperty("javax.net.ssl.trustStore", "C:\\Program Files\\Java\\jre1.5.0_12\\lib\\security\\cacerts");
    System.setProperty("javax.net.ssl.trustStorePassword", "password");
    But when I try to execute the java client, I get the following error:
    setting up default SSLSocketFactory
    use default SunJSSE impl class: com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl
    class com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl is loaded
    keyStore is : C:\Program Files\Java\jre1.5.0_12\lib\security\cacerts
    keyStore type is : jks
    keyStore provider is :
    init keystore
    init keymanager of type SunX509
    trustStore is: C:\Program Files\Java\jre1.5.0_12\lib\security\cacerts
    trustStore type is : jks
    trustStore provider is :
    init truststore
    adding as trusted cert:
    init context
    trigger seeding of SecureRandom
    done seeding SecureRandom
    instantiated an instance of class com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl
    main, setSoTimeout(0) called
    main, setSoTimeout(0) called
    %% No cached client session
    *** ClientHello, TLSv1
    RandomCookie: GMT: .....
    Compression Methods: { 0 }
    [write] MD5 and SHA1 hashes: len = 73
    main, WRITE: TLSv1 Handshake, length = 73
    [write] MD5 and SHA1 hashes: len = 98
    main, WRITE: SSLv2 client hello message, length = 98
    [Raw write]: length = 100
    [Raw read]: length = 5
    [Raw read]: length = 58
    main, READ: TLSv1 Handshake, length = 58
    *** ServerHello, TLSv1
    %% Created: [Session-1, SSL_RSA_WITH_RC4_128_MD5]
    ** SSL_RSA_WITH_RC4_128_MD5
    [read] MD5 and SHA1 hashes: len = 58
    [Raw read]: length = 5
    [Raw read]: length = 5530
    main, READ: TLSv1 Handshake, length = 5530
    *** Certificate chain
    chain [0] = ...
    chain [1] = ...
    chain [2] = ...
    chain [3] = ...
    main, SEND TLSv1 ALERT: fatal, description = certificate_unknown
    main, WRITE: TLSv1 Alert, length = 2
    [Raw write]: length = 7
    0000: 15 03 01 00 02 02 2E .......
    main, called closeSocket()
    main, handling exception: 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
    main, called close()
    main, called closeInternal(true)
    main, called close()
    main, called closeInternal(true)
    main, called close()
    main, called closeInternal(true)
    Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.c
    ertpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
    at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
    at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
    at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
    at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source)
    at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
    at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
    at java.io.BufferedOutputStream.flush(Unknown Source)
    at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:506)
    at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2110)
    at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1088)
    at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
    at PostXML.main(PostXML.java:111)
    Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find v
    alid certification path to requested target
    at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
    at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
    at sun.security.validator.Validator.validate(Unknown Source)
    at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
    at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Unknown Source)
    ... 18 more
    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
    at java.security.cert.CertPathBuilder.build(Unknown Source)
    ... 23 more
    I do not know where I have gone wrong. Could someone point out my mistake.
    Thanks In advance!

    Hi jazz123,
    There's an example in the [*Java Web Services Tutorial*|http://java.sun.com/webservices/docs/2.0/tutorial/doc/] : see Chapter 1: Building Web Services with JAX-WS - A Simple JAX-WS Client.

Maybe you are looking for