Access Java SOAP based web service using WS Security

Hi,
I need to call a Java based SOAP webservice which has message level security enabled with Binary Token.
I have connected to the service using SOAPUI and below is the sample header for the same. I need to achieve the same in my Windows form application from where I am calling the SOAP service over https.
I am not an expert in WS Security. Need some tips or sample code to achieve this.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://www.bombardier.com/aerospace/notification/V1.0"
xmlns:v11="http://www.bombardier.com/aerospace/effectivity/V1.0">
   <soapenv:Header>
      <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
         <wsse:BinarySecurityToken EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="X509-76146B887E7568491C142289201149318">MIIKZTCCCE2gAwIBAgIKXdo6EQACAAXqazANBgkqhkiG9w0BAQUFADB3MRMwEQYKCZImiZPyLGQBGRYDbmV0MRowGAYKCZImiZPyLGQBGRYKYm9tYmFyZGllcjEUMBIGCgmSJomT8ixkARkWBGFlcm8xFDASBgoJkiaJk/IsZAEZFgRhZXJvMRgwFgYDVQQDEw9BZXJvLUlzc3VpbmctQ0EwHhcNMTUwMTIzMTkzMzIyWhcNMTcwMTIyMTkzMzIyWjCBvzELMAkGA1UEBhMCQ0ExDzANBgNVBAgTBlF1ZWJlYzERMA8GA1UEBxMITW9udHJlYWwxGDAWBgNVBAoTD0JvbWJhcmRpZXIgSW5jLjESMBAGA1UECxMJQWVyb3NwYWNlMScwJQYDVQQDEx5jb2xsYWItZGV2LmFlcm8uYm9tYmFyZGllci5uZXQxNTAzBgkqhkiG9w0BCQEWJm10bF9pdF9vcHNfd2luZG93c0BhZXJvLmJvbWJhcmRpZXIuY29tM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NydDA9BgkrBgEEAYI3FQcEMDAuBiYrBgEEAYI3FQiFoPNlhYL3Xob1lTKCsPMIguTeGxOD/oINhsufMAIBZAIBDTATBgNVHSUEDDAKBggrBgEFBQcDATAbBgkrBgEEAYI3FQoEDjAMMAoGCCsGAQUFBwMBMA0GCSqGSIb3DQEBBQUAA4ICAQCtFw4FKpzNr8gpnpHHJvgjUfe7FbXvzuf8qENJQA+5KJjD6rqeSGpDJcvSwiFblZobFswFb7OABrxfpvDnmDbBfvozHPhAWBnmISz0t2ydb7R/SY1cl8NihamCPrtVN/azVDVqvj1kHkrVRM18BGSFowqGixMFQr4rDgB75214FN69a85AnxV5O5ip+U9g/JdW2qRSGcfUd1np2QActllDimc+33rp/nXIaoXjRlXhkm+WxCt3Ca5OgwnVm3a4Ceiljj+1i5+8XV2zngv6eq4HlrBg0sFPaHWdjrIGcNyaWW0h0dPQUuv4Gm3zKDkQ3AQSC3cV5qCqmh6fCaCsI3us2kSJjHMZa+OSDLI7K01pDP85TieHeoONBo8mRKsOQ0e1FGXH2BkbXSN1DgfJ1IzddaBbSsnjR5gNrRMmZJnCXnluT8Gmwyv9EKjMit6yt0sWwrADd5ZIjYUnxnrkgfXpPY2kqK2gOl12IHjFK6d5vUsGTlIv9H3OmtCWVBHpR125C0CZvU987z3u9Gv4Jiuv/LpDuv1bNuqNHsQfSqSYsjEreGIP+DapzhMOefiv+kN4nLj3Owk4VdQm9+dxekwaS7HFwAQGOVik877mXxmjRhwxtZPW0ZrWs3fZ2z90Ppki4cGN/rtaLGz+WwicrPt1B34296kQkkIolWtiGjkpnQ==</wsse:BinarySecurityToken>
         <ds:Signature Id="SIG-76146B887E7568491C142289201149421" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
            <ds:SignedInfo>
               <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                  <ec:InclusiveNamespaces PrefixList="soapenv v1 v11" xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
               </ds:CanonicalizationMethod>
               <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
               <ds:Reference URI="#id-76146B887E7568491C14228915193694">
                  <ds:Transforms>
                     <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                        <ec:InclusiveNamespaces PrefixList="v1 v11" xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                     </ds:Transform>
                  </ds:Transforms>
                  <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                  <ds:DigestValue>3OlmMDNX7kDCNz4cRIZD+O/2xdA=</ds:DigestValue>
               </ds:Reference>
            </ds:SignedInfo>
            <ds:SignatureValue>mfeQ+wTS5eMpaU7tmrAZeG9GBLegQFe35fuHRsDXBJfq1Kcd1jRwgpIR+iSIymXGzF3ToJZzCOnE
MdW+UWdi8WAQOqw6YopJg82Tb2RJpQJADAzxbbLD2hOn1GLdXuLxtV040UsiumGi9kaKk4BaD2gSdW9Q
EHwbrbQReo1bN8kNEJhFSWalhquPqD3WVK5+6A==</ds:SignatureValue>
            <ds:KeyInfo Id="KI-76146B887E7568491C142289201149319">
<wsse:SecurityTokenReference wsu:Id="STR-76146B887E7568491C142289201149320">
                  <wsse:Reference URI="#X509-76146B887E7568491C142289201149318" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
               </wsse:SecurityTokenReference>
            </ds:KeyInfo>
         </ds:Signature>
      </wsse:Security>
   </soapenv:Header>

Hi,
The following articles would be helpful:
.net call WS-Security enabled web service (created in java)
http://stackoverflow.com/questions/2138129/net-call-ws-security-enabled-web-service-created-in-java
WS-Security Protocol with .NET – A Overview
http://www.c-sharpcorner.com/UploadFile/mahesha/WSSecurityProtocol11232005052243AM/WSSecurityProtocol.aspx
An introduction to Web Service Security using WSE - Part I
http://www.codeproject.com/Articles/7062/An-introduction-to-Web-Service-Security-using-WSE
As this question is not relate to SharePoint, I suggest you post it to a suitable Forum, you will get more help and confirmed answers from there.
Best Regards
Dennis Guo
TechNet Community Support

Similar Messages

  • URGENT: Error while invoking soap-based web service from BPEL process

    I am trying to invoke a soap-based web service deployed in a different OC4J container but on the same iAS middle tier install as the BPEL server. The deployment is successful. I am running 10.1.2 BPEL server.
    But invoking a process throws the following error.
    <remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
    <part name="summary">
    <summary>when invoking locally the endpoint 'http://stadd53.us.oracle.com:7779/idm/ProvService/cps', ; nested exception is: ORABPEL-02052 Cannot lookup BPEL domain. The BPEL domain "ProvService" cannot be found; the domain may not have initialized properly. Please verify that the BPEL domain loader has a valid set of initialization properties in the application properties file.</summary>
    </part>
    <part name="detail">
    <detail>ORABPEL-02052 Cannot lookup BPEL domain. The BPEL domain "ProvService" cannot be found; the domain may not have initialized properly. Please verify that the BPEL domain loader has a valid set of initialization properties in the application properties file.</detail>
    </part>
    </remoteFault>
    Any ideas on what the problem might be ?

    Sandor,
    Thanks. Your suggestion of turning off optSoapShortcut worked. So does that mean that by default remote web services cannot be invoked from BPEL process by SOAP - unless this configuration change is done ?

  • Flex/ActionScript3 support for web services using WS-Security

    Does Flex/ActionScript3 have support for connecting to a web
    service using WS-Security (Policy Creation). I've tried using the
    Flex Data Service "Import WSDL" method and it does not allow me to
    connect. Is there Flex/AS3 package that can handle creating the
    Policy information for a web service that utilizies WS-Security?
    Thanks,
    Tom

    quote:
    Does Flex/ActionScript3 have support for connecting to a web
    service using WS-Security (Policy Creation).
    Yes and no. The "Import WSDL" doesn't create AS3 classes that
    allow header injection of the appropriate WS-Security elements.
    I've managed to work around this using straight mx:webservice tags
    and AS3. There is an open bug at
    https://bugs.adobe.com/jira/browse/SDK-15398
    that I voted on, the more the merrier.
    http://www.jroller.com/wookets/entry/ws_security_in_flex
    Has a useful class for creating the soap header elements for a
    username token,
    In general though, it's been a challenge to get the simplest
    of WS-Security pieces working.
    -Brett

  • ERROR OWS-04045 during accessing multiple ports based web service

    I use WSA to publish a web service which have multiple ports.
    The ant build script :
    <oracle:assemble appName="${app.name}" ear="${app.name}.ear"
    targetNamespace="http://www.xxx.com" classpath="${domestic.class.path}"
    input="${web.home.path}/WEB-INF/classes" output="${archive.output.path}"
    style="rpc" mappingFileName="type-mapping.xml" appendToExistingDDs="true"
    serviceName="${app.name}">
    <oracle:porttype interfaceName="com.xxx.service.ICompanyDefinerWebService"
    className="com.xxx.CompanyWebServiceImpl">
    <oracle:port name="company" uri="company" />
    </oracle:porttype>
    <oracle:porttype interfaceName="com.xxx.IUserDefinerWebService"
    className="com.xxx.UserProfileWebServiceImpl">
    <oracle:port name="userprofile" uri="userprofile" />
    </oracle:porttype>
    </oracle:assemble>
    There is a class name UserDTO which extends another class AbstractDTO, which locates in another package. I used a type-mapping file for giving them different namespaces.
    After deployment, I can use the url http://localhost:8888/xxx/userprofile to access the web service. OC4J provided a javascript based stub for testing.
    But I met some problems. When I use the web stub to access it , error occurs.
    ERROR OWS-04045 Malformed Request Message:Caught exception while handling request: unexpected element name: expected={http://www.xxx.com/framework/bean}operationRecord, actual={http://www.xxx.com/user/dto}operationRecord
    I switched the form to display in xml before invoke, I found there are different and correct namespaces on these 2 elements (UserDTO and OperationLog) .So, I'm very strange why the server will response such a fault information.
    In addition, if I use default style (just document-wrapped) to publish web service, almost all methods can not be accessed on web stub which is provided by oracle.
    Surely, the problem is caused by multiple port. The soap specification is 1.2 and JDK is SUN 1.5.0-b6, OC4J is 10.1.3.3
    I just want to konw whether oracle have some better practices or suggestion for publishing a web service which will have multiple ports.
    The other problem is we can not use abstract class(only support interface) when we want to use WSA to assemble a web service based EAR.

    Is it possible to use several "class L4VIPCLASS" inside the "policy-map multi-match VIPs" in order to have several VIPs to load-balance services for several serverfarms?
    Something like this:
    class-map match-all L4VIPCLASS-1
    2 match virtual-address 172.16.1.1 tcp eq www
    class-map match-all L4VIPCLASS-2
    2 match virtual-address 172.16.1.2 tcp eq www
    class-map match-all L4VIPCLASS-3
    2 match virtual-address 172.16.1.3 tcp eq 8081
    policy-map type loadbalance http first-match WEB_POLICY-1
    class class-default
    serverfarm-1
    policy-map type loadbalance http first-match WEB_POLICY-2
    class class-default
    serverfarm-2
    policy-map type loadbalance http first-match WEB_POLICY-3
    class class-default
    serverfarm-3
    policy-map multi-match VIPs
    class L4VIPCLASS-1
    loadbalance vip inservice
    loadbalance policy WEB_POLICY-1
    loadbalance vip icmp-reply active
    loadbalance vip advertise active
    nat dynamic 1 vlan 11
    class L4VIPCLASS-2
    loadbalance vip inservice
    loadbalance policy WEB_POLICY-2
    loadbalance vip icmp-reply active
    loadbalance vip advertise active
    nat dynamic 2 vlan 22
    class L4VIPCLASS-3
    loadbalance vip inservice
    loadbalance policy WEB_POLICY-3
    loadbalance vip icmp-reply active
    loadbalance vip advertise active
    nat dynamic 3 vlan 33
    interface vlan XX
    service-policy input VIPs
    Many thanks for your support.

  • How to access (any) soap / rest web services from widget

    Hi all,
    Is there an API, javascript library etc, which allows accessing (any) soap / rest webservices from widgets?
    I know I can access web services from sap j2ee with widget foundation, but I'm still not sure how to access "outside"
    web services.
    A blog entry about this topic would be greatly appreciated I think, not only by me.
    Regards,
    Ladislav

    As promised, below is the js lib source code. I did not see the attachement option, so you can just create a text file and save it with .js extension.
              function getHdrData( FuncName ) {
                return '<?xml version="1.0" encoding="UTF-8" ?>' +
                          '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" ' +
                                             'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' +
                                             'xmlns:xs="http://www.w3.org/2001/XMLSchema">' +
                          '<SOAP-ENV:Header><sapsess:Session ' +
                                    'xmlns:sapsess="http://www.sap.com/webas/630/soap/features/session/">' +
                                    '<enableSession>true</enableSession></sapsess:Session>'+
                          '</SOAP-ENV:Header><SOAP-ENV:Body><ns1:' +
                          FuncName +
                          ' xmlns:ns1=\'urn:sap-com:document:sap:soap:functions:mc-style\'>';
              function addVar ( VarName, VarValue ) {
                return '<' + VarName + '>' + VarValue  + '</' + VarName + '>';
              function getFtrData( FuncName ) {
              return '</ns1:' + FuncName + '></SOAP-ENV:Body></SOAP-ENV:Envelope>';
              function setTable ( TblName, TblType) {
                   return '<' + TblName + ' xsi:type=\'ns1:' + TblType + '\'>';
              function closeTable ( TblName) {
                   return '</' + TblName + '>';
              function startEntry( ) {
                   return '<item>';
              function endEntry( ) {
                   return '</item>';
    So the following is the basic on how to use this library:
    * Set up SOAP envelope
    * Get the header data
    getHdrData( SOAP operation name )
    * If the web service set up the table and record start tags
    setTable( variable name, table type ) - Optional
    Set new record tag: startEntry() ? Optional
    * Set up the fieldname or variable name
    addVar( variable name, variable value )
    * Set up the table and record end tags
    endEntry() ? Optional
    closeTable( variable name ) ? Optional
    * Set up the footer SOAP envelope
    Set footer data: getFtrData(SOAP operation name )
    So hopefully that will help you consume SAP Published web services.

  • Calling Non SOAP based Web Service

    Can I call a web service that is not SOAP based through Data Services natively? I have an API I need to hit that's XML based, but it's not SOAP.
    Edited by: jmbsquared on Sep 20, 2011 7:25 PM

    I adjusted the JVM memory options to what you suggested, but it looks like the files are just to big. I've decided to just take the pieces out of the request and reply schemas that I need for each method I'll be using and have an operation instance for each. Maybe this is supposed to be how it works anyways.
    But, I'm running into an issue where some XML is getting inserted into my request by Data Services after I launch a test job. I show this in the trace file:
    11/21/11 9:22:59 AM Thread[Thread-15,5,main]      Handle request data:
    <methodName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xsi:noNamespaceSchemaLocation="adapter_schema_in.xsd"
    attribute1 = "test"  attribute2 = "test" >
    </methodName >
    When that happens, I get this accompanying error:
    8012     8956     XML-240304     11/21/2011 9:22:59 AM     XML parser failed: Error <Invalid document structure> at line <1>, char <1> in <XML PARSING ERROR: unknow atrribute 'xmlns:xsi'
    8012     8956     XML-240304     11/21/2011 9:22:59 AM     in element 'methodName'>, file <>.
    (I've replaced the actual method with methodName in addition to attribute1 and attribute2 replacing actual attributes)

  • Is it possible to access a html based web service from a pdf form?

    I was wondering if it is possible to send a query from livecycle to web service and parse the return data.
    An quick example of what I am thinking is querying a database like wolfram alpha using their html query.
    It is in the format http://api.wolframalpha.com/v2/query?input=pi&appid=XXXX. where "pi" is the query and XXXX is the specific user id
    The website then returns a xml file.
    Is there anyway to send out that html with any query from a text field and process the response?
    Thanks!

    Hi,
    Naseko is right in using the formcalc get function, and I use this for accessing information from google calendar, you can also call the formcalc get function from JavaScript as described here http://blogs.adobe.com/formfeed/2009/02/calling_formcalc_functions_fro.html.
    The main problem I have is with the yellow message bar message and popup saying do you want to allow access to api.wolframalpha.com (or whatever).  I think you can get around this by certifing the form, but I don't have access to the servre products to do that.
    Anyway, if it helps have a look at https://workspaces.acrobat.com/?d=vFcW-9OVSm*BdV6GyFfUIg you will need to modify the button click code to specify your own appid but the code is simple enough;
    var response = FormCalc.Function.Get("http://api.wolframalpha.com/v2/query?appid=<<appid>>&input=capital%20of%20australia");
    response = response.replace(/^<\?xml\s+version\s*=\s*(["'])[^\1]+\1[^?]*\?>/, "");
    var responseNode = xfa.datasets.createNode("dataGroup", "response");
    responseNode.loadXML(response, false, false);
    var answer = responseNode.resolveNode("queryresult.pod.(title.value=='Result')").subpod.plaintext.value;
    console.println(answer);
    So this code sends a query "capital of australia" and gets a response "Canberra, Australian Capital Territory, Australia"
    Replace <<appid>> with your appid and look at the linked sample to see how FormCalc.Function.Get works.
    Also, expect Designer to crash a few times while getting it to work.
    Hope this helps,
    Bruce

  • Consuming Web Service using WS-Security: USERNAME Token

    Hi ABAP Experts,
    we like to consume a self defined web service between to SAP systems (ECC6 701/006). Without any security settings the connection is successfully.  But we like to setup a message security like USERNAME Token.
    The wss profiles are already created by using TX: WSSPROFILE. Therefore we used the templates "SET_USERNAME" and "CHECK_USERNAME". The service user "DELAY_L<sid>" has been generated as well. The problem is in SOAMANAGER we can't find the related configuration (For Provider and Consumer) to set the parameters "PROFILE In" and "Profile Out" like it was in the obsolete TX "LPCONFIG".
    Can anybody help me to find out how to configure USERNAME Token using SOAMANAGER.
    Thank you very much in advance.
    Kind regards
    Axel

    Hi,
    The following articles would be helpful:
    .net call WS-Security enabled web service (created in java)
    http://stackoverflow.com/questions/2138129/net-call-ws-security-enabled-web-service-created-in-java
    WS-Security Protocol with .NET – A Overview
    http://www.c-sharpcorner.com/UploadFile/mahesha/WSSecurityProtocol11232005052243AM/WSSecurityProtocol.aspx
    An introduction to Web Service Security using WSE - Part I
    http://www.codeproject.com/Articles/7062/An-introduction-to-Web-Service-Security-using-WSE
    As this question is not relate to SharePoint, I suggest you post it to a suitable Forum, you will get more help and confirmed answers from there.
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Securing a 1.5 web service using J2EE security and JDev 11g

    Hello,
    I'm looking for a tutorial or similar that will help me create a secure (1.5 EE with annotations) web service. I'm interested in just the development view at this point - xml file mods, etc.
    I did find a good resource on how to do this in 10.1:
    http://www.oracle.com/technology/products/jdev/101/howtos/securews/index.html
    and am wondering if it has been updated (even beta!) or in another form.
    Thanks

    Steve,
    The WSDLBaseURL property just prepends a string to the WSDL URL property so that you can abstract out the protocol, server and port values separately depending on the target system you wish to hit for the service call.
    Regards,
    Sam

  • DII client for accessing a document style web service

    Hi All,
    I try to access a document style web service using DII JAX-RPC client and used the wscompile tool to produce wrapper classes .
    The following code I used for my work:
    import java.rmi.RemoteException;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.Call;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.encoding.XMLType;
    import javax.xml.rpc.ParameterMode;
    import java.net.URL;
    import nutrient.*;
    public class NuDII{
    private static String endpoint =
    "http://www.strikeiron.com/webservices/usdadata.asmx?wsdl";
    private static String qnameService = "USDAData";
    private static String qnamePort = "USDADataSoap";
    private static String BODY_NAMESPACE_VALUE =
    "http://www.strikeiron.com/";
    private static String ENCODING_STYLE_PROPERTY =
    "javax.xml.rpc.encodingstyle.namespace.uri";
    private static String NS_XSD =
    "http://www.w3.org/2001/XMLSchema";
    private static String URI_ENCODING =
    "http://schemas.xmlsoap.org/soap/encoding/";
    private static String TYPE_NAMESPACE_VALUE =
    "http://www.strikeiron.com/";
    private static QName returnType = new QName(NS_XSD, "string");
    public static void main(String[] args) {
    try {
    ServiceFactory factory = ServiceFactory.newInstance();
    Service service = factory.createService(new QName(BODY_NAMESPACE_VALUE,qnameService));
    QName port = new QName(BODY_NAMESPACE_VALUE,qnamePort);
    QName operation = new QName(BODY_NAMESPACE_VALUE,"SearchFoodByDescription");
    Call call = service.createCall(port,operation);
    call.setTargetEndpointAddress(endpoint);
    call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
    call.setProperty(Call.SOAPACTION_URI_PROPERTY,"http://www.strikeiron.com/SearchFoodByDescription");
    call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY,"");
    call.setProperty(Call.OPERATION_STYLE_PROPERTY, "document");
    QName QNAME_TYPE_STRING = new QName(NS_XSD, "string");
    QName REQUEST_QNAME = new QName(TYPE_NAMESPACE_VALUE,"SearchFoodByDescription");
    QName RESPONSE_QNAME = new QName(TYPE_NAMESPACE_VALUE, "SearchFoodByDescriptionResponse");
    call.setReturnType(RESPONSE_QNAME, nutrient.SearchFoodByDescriptionResponse.class);
    //call.setReturnType(stringArray);
    call.setOperationName(new QName(BODY_NAMESPACE_VALUE,"SearchFoodByDescription"));
    call.addParameter("FoodKeywords", REQUEST_QNAME,nutrient.SearchFoodByDescription.class,ParameterMode.IN);
    call.addParameter("FoodGroupCode", REQUEST_QNAME, nutrient.SearchFoodByDescription.class,ParameterMode.IN);
    SearchFoodByDescription sfd = new SearchFoodByDescription("BabyFoods","1900");
    //Object[] params = new Object[2];
    //params[0]= new String("BabyFoods");
    //params[1]= new String("1900");try
    Object[] params = {sfd};
    Object result = call.invoke(params);
    System.out.println(result);
    } catch (Exception ex) {
    ex.printStackTrace();
    when I start to execute the client I got the following error:
    java.rmi.RemoteException: Server was unable to process request. --> Object refer
    ence not set to an instance of an object.
    at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:462)
    at NuDII.main(NuDII.java:68)
    Shall any body assist me to solve problem.

    you may have a little better luck in the JNI forum.

  • How to invoke a web service using https

    Hi,
    I have a few security related questions surrounding BPEL process manager.
    1. Does the BPEL engine have the capability to invoke a web service using https (HTTP over SSL)? Does it automatically do that if partner link URI starts with https:// ?
    2. If not, what needs to be done to enable accessing a https based web service?
    3. I need to write a web service that accepts a message and updates certain information in the database. The web service will be deployed in an OC4J instance in Oracle App Server. We want to allow the web service to be accessed from BPEL only by users registered in the database. What is the recommended way to pass username and password to a webservice if service is invoked from BPEL process manager? Note that specifying username/password in bpel.xml is not an option.
    Thanks,
    Pranav

    1. Does the BPEL engine have the capability to invoke a web service using https (HTTP over SSL)? Does it automatically do that if partner link URI starts with https:// ?
    We currently don't have support for HTTP over SSl. We are working on it to include this functionality in near future.
    2. If not, what needs to be done to enable accessing a https based web service?
    I am not sure it is possible with current product offering. I will confirm it after discussing with our concerned development group. There is some work going to integrate with Oblix security mechanism [recently acquired by Oracle].
    3. I need to write a web service that accepts a message and updates certain information in the database. The web service will be deployed in an OC4J instance in Oracle App Server. We want to allow the web service to be accessed from BPEL only by users registered in the database. What is the recommended way to pass username and password to a webservice if service is invoked from BPEL process manager? Note that specifying username/password in bpel.xml is not an option.
    This will be easier to do if we can use Oblix along with BPEL PM. Could you please let us know more about your application so that we can provide you the customized solution till it's part of the product. You can send this query to [email protected] so that our product management team can give you more detailed roadmap regarding this.
    HTH.
    Thanks,
    Rakesh

  • How to access .asmx Web Service using JAVA? Newbie

    Hello Experts,
    Currently, I have a project where in I have to access a ,NET web service. It is made of C#. I just want to ask how will I start the accessing process? I made this simple equation on how my project is.
    Java Project + C#.Net Web Service = Integration
    1. Do i need to create a Web Service too for the Java Project? If yes, What are the necessary tools needed for the creation of this Java Web Service?
    2. The .NET Web Service is available online. (It is made by other people).
    3. Based on the equation, what is the equivalent technology for the + sign?
    4. Can you site a concrete example for accessing a web service?
    5. I'm new here. Totally I have no idea where to start.
    6. Thank you experts.
    Edited by: Benedict.Aluan on 05 30, 08 1:38 PM
    Edited by: Benedict.Aluan on 05 30, 08 1:39 PM

    Hello
    Thanks a lot for your help ...
    I am developing simple J2EE based web service client using IBM WSAD 5.1. I have used the following code to call .asmx web service in Java
    String url = "http://www.w3schools.com/webservices/tempconvert.asmx?wsdl";
         String namespace = "http://tempuri.org/";
         name = request.getParameter("txtName");
         try
              System.out.println("In Internet Service");
              ServiceFactory factory = ServiceFactory.newInstance();
              Service serv = factory.createService(new URL(url),new QName(namespace,"TempConvert"));
              System.out.println("Got Service......");
              Call obj = (Call)serv.createCall();
              System.out.println("Got Call......");
              obj.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY,"");
              obj.setProperty(Call.OPERATION_STYLE_PROPERTY,"wrapped");
              obj.setTargetEndpointAddress(url);
              obj.setPortTypeName(new QName(namespace,"TempConvertSoap"));
              obj.setOperationName(new QName(namespace,"FahrenheitToCelsius"));
              obj.addParameter("param1",XMLType.XSD_STRING,String.class,ParameterMode.IN);
              obj.setReturnType(XMLType.XSD_STRING);
              System.out.println("Parameters Set.....");
              Object[] params = new Object[]{name};
              k = (String)obj.invoke(params);
              System.out.println("Result: "+k);
         catch(Exception e)
            System.out.println("Exception is : "+e);
        }But this code is throwing exception that
    Invalid Address "http://www.w3schools.com/webservices/tempconvert.asmx?wsdl"I have also tried this URL with Java Proxy. But it showing the same error.
    Plz can u tell me how to access .asmx web service ?
    Waiting 4 reply.

  • How to access PL/SQL Web Services using java

    New to Webservices. Created PL/SQL Web Service using JDeveloper. Vendor is not sure how to access it using java. Can anyone please help to point in the right direction or provide some sample ?

    So if I'm correct you have already exposed a PL/SQL procedure or function as web service?
    In that case you can generate a proxy (client) for the generated web service using JDeveloper. It will generate Java code which invokes the web service.
    See the wizard in JDeveloper, it should be in the same category as the create PL/SQL web service wizard.
    Regards, Ronald

  • Using CE 7.1 ESR with ABAP based web services requires java development?

    Hi All,
    When developing a web service in ABAP, what java development must I do to make the web services available in an ESR that is located on CE 7.1?
    Thanks,
    Regards,
    Mel Calucin
    Bentley Systems, Inc.

    Hi Stefan,
    Someone told me that the difference between CE 7.1 ESR and PI 7.1 ESR is that to register the ABAP web service into CE 7.1 ESR you need to create EJBs and that you don't need to do this for PI 7.1 ESR (since ithe PI 7.1 ESR is ABAP based).  I didn't think that this was the case so I put this question in this forum to confirm this.   I am arguing to put in CE 7.1 because we don't need the PI 7.1 functionality.  This someone told me that we are more of an ABAP shop than a Java shop and that we don't want to develop EJBs whenever we develop ABAP based web services. 
    Thanks.
    Regards,
    Mel Calucin

  • [Integrated SOA Gateway] Publish Java based web service

    Welcome!
    Lately I have been trying to publish Java based web service through Integrated SOA Gateway. The documentation states that:
    +"Custom interface definitions can be created for various interface types including custom interface definitions for XML Gateway Map, Business Event, PL/SQL, Concurrent Program, Business Service Object, Java (except for Java APIs for Forms subtype) and Composite Service for BPEL type."+ (Integrated SOA Gateway Developer's Guide Release 12.1, "Creating and Using Custom Integration Interfaces")
    After familiarizing myself with $FND_TOP/bin/irep_parser.pl and $FND_TOP/bin/FNDLOAD tools, I have started coding my POJOs. Initially I have come up with three classes - request/response objects and service implementation. Service implementation has been annotated with "@rep:X" descriptors according to "Java Annotations" section of the documentation. While invoking $FND_TOP/bin/irep_parser.pl I have received errors about class resolution. My solution was to transform request and response types to static inner classes. This way I ended up with one *.java source file (see below).
    * Sample ISG Service.
    * @rep:scope public
    * @rep:product AP
    * @rep:displayname My Custom ISG Service.
    public class MyService {
    public static class Request {
    private String id;
    public void setId(String id) {
    this.id = id;
    public String getId() {
    return id;
    public static class Response {
    private String data;
    public void setData(String data) {
    this.data = data;
    public String getData() {
    return data;
    * Sample operation.
    * @param request Request Object.
    * @return Return Object.
    * @rep:displayname Test operation.
    * @rep:category BUSINESS_ENTITY SAMPLE_SERVICE
    public MyService.Response testOperation(MyService.Request request) {
    MyService.Response response = new MyService.Response();
    response.setData("Some Data");
    return response;
    ILDT file has been successfully created and uploaded. However, I could not see the "Generate WSDL" button on Integrated Repository website. Is there any particular interface or superclass that my service implementation should extend? I have reviewed "PurchaseOrderSDO" example posted in the developer's guide (page 407), but I couldn't come up with a working solution. Could you provide me with more detailed tutorial/example? Which documentation sections should I read again?
    After searching through forum, I have spotted $FND_TOP/bin/soagenerate.sh script, and thought that lack of "Generate WSDL" button was an EBS defect. After running the script, I have received an error:
    Error in Service Generation.
    ServiceGenerationError: Interface Type (JAVA) Interface SubType (null) is not supported.
    oracle.apps.fnd.soa.util.SOAException: ServiceGenerationError: Interface Type (JAVA) Interface SubType (null) is not supported.
         at oracle.apps.fnd.soa.provider.wsdl.ArtifactsFactory.getArtifactsGenerator(ArtifactsFactory.java:55)
         at oracle.apps.fnd.soa.provider.wsdl.WSDLGenerator.generateServiceWSDL(WSDLGenerator.java:128)
         at oracle.apps.fnd.soa.provider.wsdl.ServiceGenerator.generateSOAService(ServiceGenerator.java:75)
         at oracle.apps.fnd.soa.provider.wsdl.ServiceGenerator.generateSingleService(ServiceGenerator.java:88)
         at oracle.apps.fnd.soa.provider.wsdl.ServiceGenerator.main(ServiceGenerator.java:419)
    I would be grateful for any suggestions. Has anyone published Java based web service through ISG?
    Best regards,
    Lukasz

    I tried the following as per Oracle support and able to generate the wsdl though, but not invoke the webservices.
    1. Applied the patch 8607523
    2. Took the translator.jar file from the patch 8857799 and replaced the current translator.jar file
    3. Deploy the adapters.
    $FND_TOP/bin/txkrun.pl -script=CfgOC4JApp -applicationname=pcapps
    -oc4jpass=welcome -runautoconfig=No

Maybe you are looking for