Calling a WSSE Enabled Web Service Through a Java Proxy Class

I am trying to create a client that can access a WSSE enabled web service through
the generated java proxy. For now all I am asking for in the .wsse file is the
username and password with the line <token tokenType="username"/>. In the client
I am setting the username and password token exactly as the BEA documentation
describes:
UserInfo ui = new UserInfo("myuser", "mypassword");
session.setAttribute(WSSEClientHandler.REQUEST_USERINFO, ui);
Yet I am getting the following error message when I try to run the client:
java.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException:
EJB Exception: ; nested exception is:
com.bea.wlw.runtime.jws.wssecurity.exception.WLWWSSEException: Policy
requires Message to contain UsernameToken, UsernameToken not found in the Message.
Can anyone tell me what I am missing?
Thanks,
John

Hi John,
In your standalone client, use the following two properties to send a
user name and password to the service so that the client can
authenticate itself: javax.xml.rpc.security.auth.username
javax.xml.rpc.security.auth.password
See the docs [1]
Hope this helps,
Bruce
[1]
http://edocs.bea.com/wls/docs81/webserv/security.html#1073863
John H wrote:
>
I am trying to create a client that can access a WSSE enabled web service through
the generated java proxy. For now all I am asking for in the .wsse file is the
username and password with the line <token tokenType="username"/>. In the client
I am setting the username and password token exactly as the BEA documentation
describes:
UserInfo ui = new UserInfo("myuser", "mypassword");
session.setAttribute(WSSEClientHandler.REQUEST_USERINFO, ui);
Yet I am getting the following error message when I try to run the client:
java.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException:
EJB Exception: ; nested exception is:
com.bea.wlw.runtime.jws.wssecurity.exception.WLWWSSEException: Policy
requires Message to contain UsernameToken, UsernameToken not found in the Message.
Can anyone tell me what I am missing?
Thanks,
John

Similar Messages

  • OWSM 11g: Invoking a secured web service through a java proxy service

    Hi All,
    I am trying to call a secured bpel service which is expecting a username token password. I have created a java proxy service for the same. I now need to add the username token to the same. Can anyone please guide me in this regard.
    Thanks in advance.

    Just to add some pointers,
    I added the following code to the proxy still the soap headers is not getting propagated.
    OrderBookingAndShipment orderBookingAndShipment = orderbookingandshipment_client_ep.getOrderBookingAndShipment_pt();
    String username = "OWSM_11g";
    String password = "password";
    List credProviders = new ArrayList();
    //client side UsernameToken credential provider
    CredentialProvider cp = new ClientUNTCredentialProvider(username.getBytes(),password.getBytes());
    credProviders.add(cp);
    Map<String,Object> context = ((BindingProvider) orderBookingAndShipment).getRequestContext();
    context.put(WSSecurityContext.CREDENTIAL_PROVIDER_LIST,credProviders);

  • Error While Consuming Public Web Service through Stand Alone Proxy

    Hi,
    I am getting the below error when I am consuming a public web service through Stand Alone Proxy.
    java.rmi.RemoteException: Service call exception; nested exception is:
         com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (407) Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  ).
         at com.mindtree.examples.GlobalWeatherSoapStub.getCitiesByCountry(GlobalWeatherSoapStub.java:159)
         at com.mindtree.examples.GlobalWeatherSoapStub.getCitiesByCountry(GlobalWeatherSoapStub.java:168)
         at com.mindtree.examples.WebServiceClient.main(WebServiceClient.java:18)
    Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (407) Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  ).
         at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.handleResponseMessage(MimeHttpBinding.java:903)
         at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1346)
         at com.mindtree.examples.GlobalWeatherSoapStub.getCitiesByCountry(GlobalWeatherSoapStub.java:152)
         ... 2 more
    Regards,
    Venkatesh

    Hi,
    I am still facing the same issue.
    Regards,
    Venkatesh

  • Unable to invoke WebLogic 8.1 sp2 web service from a java proxy client...

    I am not able to invoke a web service deployed on WebLogic 8.1 SP2 via a client using the proxy jar provided by WebLogic's JWS > Overview > Generate Java Proxy tool.
    I am getting a java.net.ConnectException.
    Both the client and the WebService are on the same server.
    Thanks!!
    Inder./

    Please see the instructions below. If this does not help, please open a case with customer support and tell them it may be related to CR235479
    DESCRIPTION:
    When a platform domain is created, the admin server can be started without
    any issues and a managed server can also be started without any errors if
    using startManagedWebLogic.sh. But when a managed server is started using the
    nodemanager, the managed server fails to start with the following error.
    The WebLogic Server did not start up properly.
    java.lang.NoClassDefFoundError: com/bea/wsrp/util/debug/Debug
    (Complete stack trace with be added as a note)
    The reason for this is that:
    startWebLogic.sh(cmd) and startManagedWebLogic.sh(cmd) for platform domains
    call <User domain>/setDomainEnv.sh which includes all the jars necessary for
    a platform domain in the CLASSPATH.
    Whereas startNodeManager.sh calls <WL_HOME>/common/bin/commEnv.sh, which is
    the same for both platform and server installations of weblogic and has only
    weblogic.jar in the CLASSPATH.
    Looking at historical cases, the steps to start NodeManager successfully in a
    platform domain are:
    1.
    a. Copy admin server classpath (from <user Domain>/startWebLogic.sh) to
    that of all managed servers in the 'Remote Start' tab of the WLS Console
    OR
    b. Copy admin server classpath to <WL_HOME>/server/bin/startNodeManager.sh
    (If the same nodemanager is used to manage server domain servers and platform
    domain servers, will there be any issue with this approach??)
    2. Copy the wsrpKeystore.jks file from your domain directory to the
    nodemanager directory (the parent of the directory where all the server
    directories are replicated in the node manager. By default: <WL
    HOME>/common/nodemanager)
    But these steps are not publicly documented in edocs.
    CONFIGURATION:
    Weblogic Platform Domain 8.1 (all service packs)
    WORKAROUND:
    Steps 1 and 2 above.

  • Unable to call WSS (WS-Security) enabled Web Service using UTL_DBWS

    We are attempting to call a WSS (WS-Security) enabled Web Service from PL/SQL using the UTL_DBWS package (see [http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_dbws.htm#CHDIDGJH] ). We are doing this in similar fashion to [http://www.oracle-base.com/articles/10g/utl_dbws10g.php] with calls to utl_dbws.create_service, utl_dbws.create_call and utl_dbws.invoke.
    Using this method we can successfully call an unsecured Web Service, but calls to WSS-enabled Web Services fail. We are currently using Oracle Database 10.2.0.3.
    The failure we are getting is:
    ORA-29532: Java call terminated by uncaught Java exception: javax.xml.rpc.soap.SOAPFaultException:
    com.sun.xml.wss.XWSSecurityException: Message does not conform to configured
    policy ( AuthenticationTokenPolicy(S) ): No Security Header found;nested
    exception is com.sun.xml.wss.XWSSecurityException:
    com.sun.xml.wss.XWSSecurityException: Message does not conform to configured
    policy ( AuthenticationTokenPlicy(S) ): No Security Header found
    Apparently UTL_DBWS does not support calling WSS enabled services, although this doesn't appear to be an officially recognised position. Does anyone know if Oracle are planning to support this soon (if ever)? Looking at Re: Calling WS from PL/SQL using WS-security suggests that support has been considered before, but not yet realised.
    Thanks,
    Tom

    Having raised a Service Request with Oracle support on this, I got the following response from Oracle Development (On unpublished bug [8542959|https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=BUG&p_id=8542959]):
    Development has confirmed that WS-Security is not supported through UTL_DBWS. They have also acknowledged that this is not documented and they will change the official Oracle documentation will reflect this fact. From what is being stated, it would appear that there is no plan to support the use of WS-Security through UTL_DBWS in any release in the near future.
    So, in short, without developing your own home-grown SOAP request, there is no way to call a WSS enabled web service from within PL/SQL.
    -Tom

  • 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.

  • Error in Calling Oracle Web Service through Eclipse-indigo

    Hi All,
    I'm getting an below error when trying to call my oracle web service through Eclipse-indigo.
    Error:-
    IWAB0135E An unexpected error has occurred.
    502
    Bad Gateway
    Steps followed to create oracle web service and invoke WS :-
    Followed link
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb_web_services.htm
    which explans how to create oracle web service.
    1. Configure HTTP Access
    2. Configure the ORAWSV Servlet
    3. created user 'test' and wrote simple procedure getdescription which will return name for request id.
    4. granted all privilages to user.
    5. The orawsv servlet automatically generates a WSDL file.
    6. trying to call WS through Eclipse-indigo, but i get error.

    Trying to test via PL/SQL first via (see the following url for more info: Re: Using utl_dbws to call web service ) for example something like the following:
    SQL> set serveroutput on
    SQL> --
    SQL> def USERNAME=DBNWS
    SQL> --
    SQL> DECLARE
      2    V_SOAP_REQUEST      XMLTYPE := XMLTYPE(
      3  '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/
    encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      4          <SOAP-ENV:Body>
      5                  <m:SNUMBER-GET_SQRTInput xmlns:m="http://xmlns.oracle.com/orawsv/&USERNAME/GET_SQRT">
      6                          <m:INPUT_VALUE-NUMBER-IN>2</m:INPUT_VALUE-NUMBER-IN>
      7                  </m:SNUMBER-GET_SQRTInput>
      8          </SOAP-ENV:Body>
      9  </SOAP-ENV:Envelope>');
    10    V_SOAP_REQUEST_TEXT CLOB := V_SOAP_REQUEST.getClobVal();
    11    V_REQUEST           UTL_HTTP.REQ;
    12    V_RESPONSE          UTL_HTTP.RESP;
    13    V_BUFFER            VARCHAR2(1024);
    14  BEGIN
    15
    16    V_REQUEST := UTL_HTTP.BEGIN_REQUEST(URL => :URL, METHOD => 'POST');
    17    UTL_HTTP.SET_HEADER(V_REQUEST, 'User-Agent', 'Mozilla/4.0');
    18    V_REQUEST.METHOD := 'POST';
    19    UTL_HTTP.SET_HEADER (R => V_REQUEST, NAME => 'Content-Length', VALUE => DBMS_LOB.GETLENGTH(V_SOAP_REQUEST_TEXT));
    20    UTL_HTTP.WRITE_TEXT (R => V_REQUEST, DATA => V_SOAP_REQUEST_TEXT);
    21
    22    V_RESPONSE := UTL_HTTP.GET_RESPONSE(V_REQUEST);
    23    LOOP
    24      UTL_HTTP.READ_LINE(V_RESPONSE, V_BUFFER, TRUE);
    25      DBMS_OUTPUT.PUT_LINE(V_BUFFER);
    26    END LOOP;
    27    UTL_HTTP.END_RESPONSE(V_RESPONSE);
    28  EXCEPTION
    29    WHEN UTL_HTTP.END_OF_BODY THEN
    30      UTL_HTTP.END_RESPONSE(V_RESPONSE);
    31  END;
    32  /
    old   5:                <m:SNUMBER-GET_SQRTInput xmlns:m="http://xmlns.oracle.com/orawsv/&USERNAME/GET_SQRT">
    new   5:                <m:SNUMBER-GET_SQRTInput xmlns:m="http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT">
    <?xml version="1.0" ?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <GET_SQRTOutput xmlns="http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT">
    <RETURN>1.41421356237309504880168872420969807857</RETURN>
    </GET_SQRTOutput>
    </soap:Body>
    </soap:Envelope>
    PL/SQL procedure successfully completed.
    SQL> set serveroutput on
    SQL> --In the example give above the WSDL info should be seen via http://xmlns.oracle.com/orawsv/DBNWS/GET_SQRT?wsdl

  • How to call an ODI web service through PL/SQL

    Hi All,
    Can we call an ODI web service through PL/SQL. If we can, can you please provide me info/examples/links on how to accomplish this task ?
    Any information will help me and my team.
    Am I required to use UTL_HTTP ?
    Thanks,
    Amer
    Edited by: Rooney on Nov 6, 2012 9:58 AM

    Hi,
    Take a look at this :
    http://www.business-intelligence-quotient.com/?p=1466

  • Problem to call web service through WSDL2Java

    Hi All,
    I am gettig the error message while trying to run the below code to call web service:
    Code:
            org.apache.axis.client.Call _call = createCall();
            _call.setOperation(_operations[0]);
            _call.setUseSOAPAction(true);
           _call.setSOAPActionURI("");
            _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
            _call.setOperationName(new javax.xml.namespace.QName("http://10.171.44.97/service", "testWS"));
            setRequestHeaders(_call);
            setAttachments(_call);
            System.out.println("before invoke");
         java.lang.Object _resp = _call.invoke(new java.lang.Object[] {input});--------------------------------------------------------------------------
    Error-
    org.xml.sax.SAXException: Error: URI=null Line=3: Illegal
    xml:lang value "".----------------------------------
    I would appreciate if anyone can help me out.
    Thanks in advance.
    Regards
    Sachin

    Hi,
    Jason Straub's excellent [Flexible Web Service API|http://jastraub.blogspot.com/2008/06/flexible-web-service-api.html] could be just what you need.
    The blog posting also describes how to integrate the code into your page.
    Regards,
    Georger
    sundhar.v wrote:
    Hi
    Can we call web service through loop, If so how we can do.
    I wanted to transfer n records ex:100. to pass one record i need to call web service, like that to pass 100 records i need to call 100 times webservices and store results of each.
    Have created web reference and form so that it can send one record on submit and return's result to text box.
    I need to call this Web Service Request     page process through another plsql process.
    How can we resolve this.
    Thanks
    Sundhar

  • Netbeans calls MS Web Service through BPEL

    I get the followng error when trying to invoke a microsoft web service through bpel:
    Pattern for exchange Id 206195522970609-30893-134221047015560007 is http://www.w3.org/2004/08/wsdl/in-out
    This is from the exception block.
    com.sun.bpel.model.meta.impl.RInvokeImpl@538425={<?xml version="1.0" encoding="utf-8" ?>
    <invoke name="Invoke2"
    partnerLink="PartnerLink9"
    portType="ns1:Service1Soap"
    operation="HelloWorld"
    inputVariable="HelloWorldIn4"
    outputVariable="HelloWorldOut4"></invoke>}
    [Fatal Error] :1:1: Content is not allowed in prolog.
    Fault Processing Error. Fault Name is {http://sun.com/wsbpel/2.0/process/executable/fault}systemFault and Fault Value is {http://sun.com/wsbpel/2.0/process/executable/fault}systemFault is not handled in the current scope. Sending faults for the pending requests in the current scope before propagating the fault to the enclosing scope.
    Setting MessageEx id 206195522970609-30893-134221047013250005 with error: Processing Error. Fault Name is {http://sun.com/wsbpel/2.0/process/executable/fault}systemFault and Fault Value is {http://sun.com/wsbpel/2.0/process/executable/fault}systemFault
    System exception occured while executing a business process instance.
    java.lang.NullPointerException
    at com.sun.jbi.engine.bpel.core.bpel.debug.BPELProcessRefImpl.removeProcessInstance(BPELProcessRefImpl.java:109)
    at com.sun.jbi.engine.bpel.core.bpel.debug.VirtualBPELEngineImpl.removeProcessInstance(VirtualBPELEngineImpl.java:134)
    at com.sun.jbi.engine.bpel.core.bpel.debug.DefaultDebugger.processInstanceDied(DefaultDebugger.java:502)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.instanceComplete(BPELProcessManagerImpl.java:852)
    at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.BPELProcessInstanceImpl.doResumeAction(BPELProcessInstanceImpl.java:704)
    at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.BPELProcessInstanceImpl.handleFault(BPELProcessInstanceImpl.java:432)
    at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.InvokeUnitImpl.handleFault(InvokeUnitImpl.java:662)
    at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.SyntheticThrowUnitImpl.doAction(SyntheticThrowUnitImpl.java:92)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.execute(BPELInterpreter.java:145)
    at com.sun.jbi.engine.bpel.core.bpel.engine.BusinessProcessInstanceThread.execute(BusinessProcessInstanceThread.java:76)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.process(BPELProcessManagerImpl.java:818)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:261)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:742)
    at com.sun.jbi.engine.bpel.BPELSEInOutThread.processStatus(BPELSEInOutThread.java:376)
    at com.sun.jbi.engine.bpel.BPELSEInOutThread.processMsgEx(BPELSEInOutThread.java:204)
    at com.sun.jbi.engine.bpel.BPELSEInOutThread.run(BPELSEInOutThread.java:158)
    Failed to process status of InOut - M Ex 206195522970609-30893-134221047015560007
    java.lang.NullPointerException
    at com.sun.jbi.engine.bpel.core.bpel.debug.BPELProcessRefImpl.removeProcessInstance(BPELProcessRefImpl.java:109)
    at com.sun.jbi.engine.bpel.core.bpel.debug.VirtualBPELEngineImpl.removeProcessInstance(VirtualBPELEngineImpl.java:134)
    at com.sun.jbi.engine.bpel.core.bpel.debug.DefaultDebugger.processInstanceDied(DefaultDebugger.java:502)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.instanceComplete(BPELProcessManagerImpl.java:852)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.terminate(BPELProcessManagerImpl.java:655)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.execute(BPELInterpreter.java:231)
    at com.sun.jbi.engine.bpel.core.bpel.engine.BusinessProcessInstanceThread.execute(BusinessProcessInstanceThread.java:76)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.process(BPELProcessManagerImpl.java:818)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:261)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:742)
    at com.sun.jbi.engine.bpel.BPELSEInOutThread.processStatus(BPELSEInOutThread.java:376)
    at com.sun.jbi.engine.bpel.BPELSEInOutThread.processMsgEx(BPELSEInOutThread.java:204)
    at com.sun.jbi.engine.bpel.BPELSEInOutThread.run(BPELSEInOutThread.java:158)
    Invoking a java web service is fine. Is there something I'm missing?

    I get the followng error when trying to invoke a microsoft web service through bpel:
    Pattern for exchange Id 206195522970609-30893-134221047015560007 is http://www.w3.org/2004/08/wsdl/in-out
    This is from the exception block.
    com.sun.bpel.model.meta.impl.RInvokeImpl@538425={<?xml version="1.0" encoding="utf-8" ?>
    <invoke name="Invoke2"
    partnerLink="PartnerLink9"
    portType="ns1:Service1Soap"
    operation="HelloWorld"
    inputVariable="HelloWorldIn4"
    outputVariable="HelloWorldOut4"></invoke>}
    [Fatal Error] :1:1: Content is not allowed in prolog.
    Fault Processing Error. Fault Name is {http://sun.com/wsbpel/2.0/process/executable/fault}systemFault and Fault Value is {http://sun.com/wsbpel/2.0/process/executable/fault}systemFault is not handled in the current scope. Sending faults for the pending requests in the current scope before propagating the fault to the enclosing scope.
    Setting MessageEx id 206195522970609-30893-134221047013250005 with error: Processing Error. Fault Name is {http://sun.com/wsbpel/2.0/process/executable/fault}systemFault and Fault Value is {http://sun.com/wsbpel/2.0/process/executable/fault}systemFault
    System exception occured while executing a business process instance.
    java.lang.NullPointerException
    at com.sun.jbi.engine.bpel.core.bpel.debug.BPELProcessRefImpl.removeProcessInstance(BPELProcessRefImpl.java:109)
    at com.sun.jbi.engine.bpel.core.bpel.debug.VirtualBPELEngineImpl.removeProcessInstance(VirtualBPELEngineImpl.java:134)
    at com.sun.jbi.engine.bpel.core.bpel.debug.DefaultDebugger.processInstanceDied(DefaultDebugger.java:502)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.instanceComplete(BPELProcessManagerImpl.java:852)
    at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.BPELProcessInstanceImpl.doResumeAction(BPELProcessInstanceImpl.java:704)
    at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.BPELProcessInstanceImpl.handleFault(BPELProcessInstanceImpl.java:432)
    at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.InvokeUnitImpl.handleFault(InvokeUnitImpl.java:662)
    at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.SyntheticThrowUnitImpl.doAction(SyntheticThrowUnitImpl.java:92)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.execute(BPELInterpreter.java:145)
    at com.sun.jbi.engine.bpel.core.bpel.engine.BusinessProcessInstanceThread.execute(BusinessProcessInstanceThread.java:76)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.process(BPELProcessManagerImpl.java:818)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:261)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:742)
    at com.sun.jbi.engine.bpel.BPELSEInOutThread.processStatus(BPELSEInOutThread.java:376)
    at com.sun.jbi.engine.bpel.BPELSEInOutThread.processMsgEx(BPELSEInOutThread.java:204)
    at com.sun.jbi.engine.bpel.BPELSEInOutThread.run(BPELSEInOutThread.java:158)
    Failed to process status of InOut - M Ex 206195522970609-30893-134221047015560007
    java.lang.NullPointerException
    at com.sun.jbi.engine.bpel.core.bpel.debug.BPELProcessRefImpl.removeProcessInstance(BPELProcessRefImpl.java:109)
    at com.sun.jbi.engine.bpel.core.bpel.debug.VirtualBPELEngineImpl.removeProcessInstance(VirtualBPELEngineImpl.java:134)
    at com.sun.jbi.engine.bpel.core.bpel.debug.DefaultDebugger.processInstanceDied(DefaultDebugger.java:502)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.instanceComplete(BPELProcessManagerImpl.java:852)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.terminate(BPELProcessManagerImpl.java:655)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.execute(BPELInterpreter.java:231)
    at com.sun.jbi.engine.bpel.core.bpel.engine.BusinessProcessInstanceThread.execute(BusinessProcessInstanceThread.java:76)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.process(BPELProcessManagerImpl.java:818)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:261)
    at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:742)
    at com.sun.jbi.engine.bpel.BPELSEInOutThread.processStatus(BPELSEInOutThread.java:376)
    at com.sun.jbi.engine.bpel.BPELSEInOutThread.processMsgEx(BPELSEInOutThread.java:204)
    at com.sun.jbi.engine.bpel.BPELSEInOutThread.run(BPELSEInOutThread.java:158)
    Invoking a java web service is fine. Is there something I'm missing?

  • How to use Axis to access a web service through Authentication  proxy

    Using axis access internat web service is success,but access a web service through Authentication proxy is failure.But other java classes connect through a proxy to the internet which works very well:
    please help me ,thank you!!!
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import javax.xml.namespace.QName;
    //this is my access webservice faliure   codes
    public class TestClient
       public static void main(String [] args) {
           try {
                System.getProperties().setProperty("http.proxySet", "true");
                System.getProperties().setProperty("http.proxyHost","proxy.com");
                System.getProperties().setProperty("http.proxyPort", "8080");
                System.getProperties().setProperty("http.proxyUser", "username");
                System.getProperties().setProperty("http.proxyPassword","password");
               String endpoint =
                        "http://nagoya.apache.org:5049/axis/services/echo";
               Service  service = new Service();
               Call     call    = (Call) service.createCall();
               call.setTargetEndpointAddress( new java.net.URL(endpoint) );
               call.setOperationName(new QName("http://soapinterop.org/", "echoString") );
               String ret = (String) call.invoke( new Object[] { "Hello!" } );
               System.out.println("Sent 'Hello!', got '" + ret + "'");
           } catch (Exception e) {
               System.err.println(e.toString());
       }I get an "(407)Proxy authorization required" error?

    I am also looking for a solution. Does any one know how to do through code instead of jvm settings?
    Thanks in advance!

  • 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

  • How to pass username and password while invoking a web service through wsdl

    Hello All,
    i am calling a web service through wsdl, but it is giving error 401. i want to know how to pass userid and password when i am invoking webservice?
    i am using NetBeans 6.1.
    i did following thing:
    First i created one web application, then i right clicked on project new->web service client, and gave the url for my wsdl.
    after that i create one main class and try to call my required operation by that wsdl.
    Thanks in advance

    Thanks dumchikov, i tried the same thing what ever you told but there is no option for security.
    when i right clicked on web service reference its open 1 window which have 2 tab one is quality of service and second is wsdl customization, then i clicked on wsdl customization. which contain Global Customization, Port Types, Port Type Operations, Port Type Faults, Binding, Binding Operations, Services, Ports and External Binding Files. it don't have security option.

  • Confirming method to secure web services through oracle web service manager

    Hi All,
    I am just wondering about the method to secure web service through oracle web service manager.
    I have a unsecure web service "helloworld" which is deployed on JWSDP1.6 toolkit.I want to secure it through oracle web service manager.
    Inorder to secure this unsecure web service,I use gateway(web service manager for securing web service using message level security through certificate).
    So when client want to access the helloworld service,it contacts the gateway securely and gateway intern connect to original web service after decrypting and verification of the signature.When gateway gets response from the web service,it signs the response message and then encrypt and passs on to the client.
    So my question is,is it the right way to secure web service?
    As I am getting the following fault exception :
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode "http://schemas.oblix.com/ws/2003/08/Faults">c</faultcode>
    <faultstring>Step execution failed with an exception
    </faultstring>
    <detail></detail>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    I checked the log at :
    C:\coresv_install_home\external\oc4j-10.1.2.0.0\j2ee\home\log\http-web-access
    but there is no helpful information available.Thanks for any help.
    Kash

    Hi Rajesh,
    Thanks for your reply.I am using the following policy steps:
    1)for Request (Decrypt and Verify signature).
    2)for Response(Sign Message and Encrypt).
    The configuration for Request is shown below:
    Pipeline "Request"
    Pipeline Steps:
    Start Pipeline
    Log
    Decrypt and Verify Signature
    Basic Properties Type Default Value
    Enabled (*) boolean true true
    XML Decryption Properties Type Default Value
    Decryptor''s keystore location (*) string C:\Sun\jwsdp-2.0\xws-security\etc\server-keystore.jks
    Decrypt Keystore Type (*) string jks jks
    Decryptor''s keystore password string *******
    Decryptor''s private-key alias (*) string s1as
    Decryptor''s private-key password string *******
    Enforce Encryption (*) boolean true true
    XML Signature Verification Properties Type Default Value
    Verifying Keystore location (*) string C:\Sun\jwsdp-2.0\xws-security\etc\server-truststore.jks
    Verifying Keystore type (*) string jks jks
    Verifying Keystore password string *******
    Signer''s public-key alias (*) string xws-security-client
    Enforce Signing (*) boolean true true
    End Pipeline
    And the configuration for Response is shown below:
    Pipeline "Response"
    Pipeline Steps:
    Start Pipeline
    Log
    Sign Message and Encrypt
    Basic Properties Type Default Value
    Enabled (*) boolean true true
    Signing Properties Type Default Value
    Signing Keystore location (*) string C:\Sun\jwsdp-2.0\xws-security\etc\server-keystore.jks
    Signing Keystore Type (*) string jks jks
    Signing Keystore password string *******
    Signer''s private-key alias (*) string s1as
    Signer''s private-key password string *******
    Signed Content (*) string BODY BODY
    Sign XPATH Expression string
    Sign XML Namespace string[]
    Encryption Properties Type Default Value
    Encryption Keystore location (*) string C:\Sun\jwsdp-2.0\xws-security\etc\server-truststore.jks
    Encrypt Keystore Type (*) string jks jks
    Encryption Keystore password string *******
    Decryptor''s public-key alias (*) string xws-security-client
    Encrypted Content (*) string BODY BODY
    Encrypt XPATH Expression string
    Encrypt XML Namespace string[]
    End Pipeline
    I checked the log again but nothing useful there,it is just giving the following values:
    2006-08-14 16:32:50,372 INFO [Thread-21] mstore.OLiteMStore - SELECT MEASUREMENT_STR FROM MEASUREMENT_PERSISTED_STORE WHERE ID=? FOR UPDATE
    2006-08-14 16:34:50,364 INFO [Thread-16] mstore.OLiteMStore - INSERT INTO MEASUREMENT_PERSISTED_STORE (ID,DEF_ID,CONTEXT_ID,PARENT_CONTEXT_ID,TIME,STORETIME,KEY0,KEY1,KEY2,KEY3,KEY4,KEY5,KEY6,KEY7,KEY8,KEY9,KEY10,KEY11,KEY12,KEY13,KEY14,KEY15,KEY16,KEY17,KEY18,KEY19,KEY20,KEY21,KEY22,KEY23,KEY24,KEY25,KEY26,KEY27,KEY28,KEY29,KEY30,KEY31,KEY32,KEY33,KEY34,KEY35,KEY36,KEY37,KEY38,KEY39,DBM0,MEASUREMENT_STR) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,'R',empty_clob())
    2006-08-14 16:34:50,364 INFO [Thread-16] mstore.OLiteMStore - SELECT MEASUREMENT_STR FROM MEASUREMENT_PERSISTED_STORE WHERE ID=? FOR UPDATE
    Any help would be appreciated.Thanks.
    Kash

  • Exception while accessing web service through code

    I have a web service developed using AXIS deployed on Weblogic 8.1
    Another web application cotaining GUI deployed on Weblogic 10 tries to access this web service through code.
    This piece of code to invoke the web service is written in Action Class present inside web application. (Struts is used in GUI based web app)
    When the code tries to invoke web service I am getting following error.
    (401)Unauthorized xxx
         at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:630)
         at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
         at org.apache.axis.client.Call.invoke(Call.java:2553)
         at org.apache.axis.client.Call.invoke(Call.java:1753)
         at com.ebv.app.web.action.UCS77_1ProcessOfficialChangeSaveDetailsAction.invokeAx(UCS77_1ProcessOfficialChangeSaveDetailsAction.java:243)
         at com.ebv.app.web.action.UCS77_1ProcessOfficialChangeSaveDetailsAction.callUCS77_1ProcessOfficialChangeWebService(UCS77_1ProcessOfficialChangeSaveDetailsAction.java:173)
         at com.ebv.app.web.action.UCS77_1ProcessOfficialChangeSaveDetailsAction.processAction(UCS77_1ProcessOfficialChangeSaveDetailsAction.java:133)
         at com.ebv.framework.web.action.EBVAction.execute(EBVAction.java:106)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    The web service URL is as follows:
    http://10.140.96.5:7808/services/ucs77_1/ProcessOfficialChangeSave77_1-v0001.soap
    However
    When I try to hit the webservice URL directly on browser login window appears where same username/password I provide which are passed in code to invoke the web service. I get the success page indicating that web service is invoked on hitting enter.
    The method used in UCS77_1ProcessOfficialChangeSaveDetailsAction.java to invoke web service is as follows:
    public String invokeAx
                   String xmlMessage,
                   String webServiceURL,
                   String webServiceOperation,
                   String username,
                   String password)
              String xmlResponse = null;
              Call webServiceCall = null;
              InputStream input = new ByteArrayInputStream(xmlMessage.getBytes());
              Service service = new Service();
              try
                   webServiceCall = (Call) service.createCall();
                   SOAPEnvelope env = new SOAPEnvelope(input);
                   SOAPEnvelope resEnv = null;
                   webServiceCall.setTargetEndpointAddress(new URL(webServiceURL));
                   webServiceCall.setOperationName(new QName(webServiceOperation));
                   webServiceCall.setUsername(username);
                   webServiceCall.setPassword(password);               
                   try
                        resEnv = webServiceCall.invoke(env);
                   catch (AxisFault e)
                        e.printStackTrace();
                        Message responseMessage = webServiceCall.getResponseMessage();
                        SOAPEnvelope soapXml = (SOAPEnvelope) responseMessage.getSOAPEnvelope();
                        xmlResponse = new String(soapXml.toString().getBytes(AppConstants.UTF8),AppConstants.UTF8);     
                   if (xmlResponse == null)
                        xmlResponse = resEnv.toString();
              catch (Exception e1)
                   e1.printStackTrace();
              return xmlResponse;
    Both the weblogic server reside on two different AIX machines.
    Can anybody tell what's the problem while invoking web service through code?

    time to look into the gateway logs as stated by the fault ..
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xmlns:p="http://schemas.oblix.com/ws/2003/08/Faults">c</faultcode><faultstring>Step execution failed with an exception</faultstring><detail></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
    looks like the cipher step might have failed

Maybe you are looking for

  • Timeout dumps

    Hi All, In our PI Production system we are getting lot of time out dumps in ST22 as below. The program u201CCL_XMS_PERSIST_ADM============CPu201D has exceeded the maximum permitted uninterrupted runtime and has therefore been terminated. I have check

  • Archive Smartform from BSP

    Hello In our scenario we are entering data into a BSP and want to call a smartform and archive the smartform output as PDF on the click of a button. The displaying of the PDF file in the browser works fine. What I cannot get working is for the smartf

  • How to Handle BatchUpdateException

    Hi, I am using JSF, Spring and Hibernate with mysql as my db. I want to save pcode and pname,etc in the db. I used getHibernateTemplate.save(obj); I am facing an issue like when i add the same pcode and pname which is existing.... It is throwing Erro

  • ISA-IPA configuration.

    Hello experts, we have installed guided selling IPA in our system. while configuring it, it is asking for an catalog file. how can we get a raw catalog file out of crm if any one have agood documentation regarding IPA configuration. pls do mail it. [

  • A woman in her 50's using her first macbook air :)

    hi i do not know if i am in the right area to ask this but i purchased my very first computer in my whole life it is the macbook air 13" the newest one. my son helped me installed the apple care cd onto my computer and ran the test. everything passed