Web Service transaction handling

Hello,
Is it possible in SAP NW to execute several calls to Web Services in one LUW (logical unit of work)? And be able to commit or rollback?
Where can i find information about Web Service transaction handling in SAP?
Best regards
Ute

I haven't found any official info on it, but my simple testing (mainly via ST05) indicates that you should be able to call multiple web services within a single LUW -  there seems to be no implicit "commit work" issued by the framework (unlike remote RFC calls).
Jonathan

Similar Messages

  • Does BPEL Server have support "Web Services Transactions specifications"?

    The Web Services Transactions specifications define mechanisms for transactional interoperability between Web services domains and provide a means to compose transactional qualities of service into Web services applications.
    Have anyone can explain oracle process manager have any support about "Web Services Transactions specifications" ?
    or oracle BPEL process manager how to coordinate the actions of distributed applications. Such coordination protocols are used to support a number of applications, including those that need to reach consistent agreement on the outcome of distributed activities.
    appreciate any idea for this issue, thanks a lot.

    You have a number of options.  You can use the built in Screen Sharing application, you can purchase Apple Remote Desktop for each user, you could look at 3rd party tools like GoToMyPC or if you are looking to replace Terminal Services look at AquaConnect. 
    The tool you use will be determined by what the users have at home.  If they are also using Macs, they can use all the native tools.  If they are on PC, they can use either a VNC client or many of the 3rd paty tools.

  • Web Services Transactions

    Invoking a web service or exposing an object as web service is fine.
    I would like to know, at this stage can we use web services that collaborate and constitute a transaction? Are there any technologies available from SUN or other vendors to accomplish web service transactions? I know one vendor http://www.collaxa.com which has BPEL engine but don't know whether it supports transactions reliably.
    Also I'd like to know, is Web Service technology moving towards BPEL (or where?) in order to use it in practical world?

    Did you find an answer to your question? I�m interested more or less on the same. I�d like to know if everything is going towards BPEL and if thats the way to implement choreograophies in fact?
    thanks very much
    gobellot

  • Web Service Error handling in JDev 11g

    Hi,
    I followed the steps on this tutorial: "Use JDeveloper 11g to Create a Data Control From a Web Service"
    http://www.oracle.com/technology/obe/obe11jdev/11/wsdc/wsdc.htm
    In this tutorial, under the section "Running the Page", you will see the image where an error message is displayed - "SoapException - Server was unable to process your request...."
    I also get this error when I follow the tutorial's steps. If I repeatedly press the GetWeatherByZipCode commandButton, the message goes away and I get the data in the table as expected.
    What I'd like to do is not show the end user this error, but instead eat the error and retry the request a few times. If after a few tries, I still get the error, then I can show the end user a nicer message.
    How do I do this? Any documentation you can point me too would be appreciated. I'm new to the 'bindings' layer. I usually use JavaBeans/managed beans.
    I'm using JDeveloper 11g (Main build from Oct 15th)
    Thanks,
    Jeanne

    I've read about binding to #{adfFacesContext.initialRender} to not call the web service on initial render which is what you are probably talking about.
    However, I get this error even after the first time I've displayed the page. I've heard that you cannot rely on web services always coming back to you with data ((e.g., like Twitter's data - that was the example I was given at a recent Google Tech Talk) . I need to handle the case where I get an error from the web service and I retry calling the web service behind the scenes so the end user is unaware. This is what I want to do. I can retry a few times, then give up, then pop up a nice error.
    Thanks,
    Jeanne

  • Web service error handling (SOAP 1023 SRT: ICM_HTTP_CONNECTION_FAILED)

    Hi there,
    When consuimng our web service, sometimes we get the error "SOAP 1023 SRT: Processing error when receiving the response: ICM_HTTP_CONNECTION_FAILED" and this happens when we can't connect to the other system. The requirement is to automatically resend the transaction after +/- 10 seconds. Is there somewhere on the web service settings that will enable us to achieve this without having a background job running every minute?
    Thanks.

    <p>Hello,</p>
    <p> </p>
    <p>The first thing you should do is to check that your application server can reach the service your are trying to call. I suggest to try a:</p>
    <p> </p>
    <p>telnet &lt;remote_service_url&gt; &lt;remote_service_port&gt;</p>
    <p> </p>
    <p>from the command line of your server.</p>
    <p> </p>
    <p>You should get a blank screen if your server reaches the remote server and something like connecting to &lt;remote_service_url&gt; if you don't.</p>
    <p> </p>
    <p>Yours,</p>
    <p> </p>
    <p>Joseba M. Iturbe</p>

  • Creating a Web Service to handle flow between BPEL process and XML Gateway

    I am new to Web Services. I have never created one, yet I have the task of designing the following for a project.
    Any help as to what steps I need to take would be very very helpful. There is a lot of information on XML, SOA and WSDL out there that it can get very confusing, and sometimes you just need someone to point the way
    What I need to do is create a Custom Send and a Custom Receive Program (both web services) handle the message flow between an Enterprise BPEL processes and a Deployed XML Gateway.
    BPEL compresses this XML business object document (for faster transmission), and sends remotely to this Custom Receive web service, which in turn calls a decompress java program and then send the document to the XML gateway inbound web service.
    The Custom Send web service does just the opposite. It needs to take the business object document from XML gateway, call the compress java program and then send to the Enterprise BPEL.
    In a nutshell...these Custom Send/Receive Web services handle the message flow between the Enterprise BPEL process and the Deployed XML Gateway.
    What I need help on...
    -Creating this in JDeveloper- where do I get started?
    -How does a web service receive a compressed file sent to me via BPEL? Does it just sit there waiting for it?
    -Is this a synchronous or asynchronous design?
    -Will this be 2 web services (Send and Receive) or do I make 1 with 2 functionalities
    -How do I call the java compress/decompress program within the web service? (this java function is already created and ready to be called)
    -Is this decompressed business object file an XML schema and an XML message? Or just a message?
    -I need to send this to the XML Gateway Web Service to load. How does that work?
    -I have a Generic XML Gateway WSDL file...I assume I need to take all the info I get and map it to this template? Is this true? How do I do that?
    Like I said, any help would be appreciated. Links answers to my many questions would be fabulous.
    -Jason

    If you are talking about simple XML transformation of the SOAP payload between the client calling your service and the final destination of the message you are routing, the ESB approach may be a better fit.
    If you have more complex transformation in mind, with major processing and rework of the message in the intermediary, you may be better of with using the POJO approach. Write your service and embed a callout to the other service in your implementation. If the two services share the same Java Model, you may even be able to re-use the same Java Bean.
    To get SOAP Element instead of Java bean, you just need to use the noDataBinding option with either genProxy and topDownAssemble (or assemble). See the WS-Guide [1] for details. Chapter 18 will give you all the details about the different WSA command line parameters.
    Hope this helps,
    -Eric
    [1] http://download-west.oracle.com/docs/cd/B31017_01/web.1013/b28974/toc.htm

  • About web service transaction

    Hello everyone:
    I am a newcomer to web service, but now I have to simulate ws-businessactivity protocol. I don't have any idea about it and where to begin with. I made an survey about JTA and JTS, but it seems this api only supports ws-atomic transaction. And in WSIT tutorial, there is only one example. Besides, someone suggests to use web service callback (asynchronous) technology. I so hope somebody could give me advices about the way how to do this. Thank you very much.

    I haven't found any official info on it, but my simple testing (mainly via ST05) indicates that you should be able to call multiple web services within a single LUW -  there seems to be no implicit "commit work" issued by the framework (unlike remote RFC calls).
    Jonathan

  • How to Web Service Transaction in MII

    Can someone recommend a link or reference to describe how to set up the Transaction Object and Links to call a web service from SAP Manufacuring Exection?
    Thanks,
    Steve

    WSDLGen URL:  http://wbhelp.sap.com/manufacturing/xmii_120/en/44/847b251e4355cee10000000a1553f6/frameset.htm
    URL Help:  http://help.sap.com/saphelp_mii121/helpdata/en/4a/287c3dd30242ade10000000a421138/frameset.htm

  • Web-services.xml  handler chain

    Hi All,
    My question is this. I use servicegen ant task to generate the web-services.xml
    file,
    then I open the .ear file using winzip and edit the web-services.xml file to include
    the handler-chain information. I have included the following information :
    <handler-chains>
    <handler-chain name="myChain">
    <handler class-name="com.whatever.core.sec.iec.ejb.IECSOAPHandler">
    <init-params>
    <init-param name="logDirectory" value="C:/temp" />
    <init-param name="severityLevel" value="verbose" />
    </init-params>
    </handler>
    </handler-chain>
    </handler-chains>
    and then I include the following in the operation tag:
    <operation method="batchResponseToPSS([B)" component="ejbcomp0" name="batchResponseToPSS"
    handler-chain="myChain">
    and the also following
          <operation method="onlineResponseToPSS([B)" component="ejbcomp0" name="onlineResponseToPSS"
    handler-chain="myChain">
    Without the handler-chains element my app works fine.
    My whole web-sercvices.xml is located at following location:
    http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.webservices&item=3921&utag=
    Any insight will be appreciated.
    Thanks
    ---Radhe
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    I am still not clear what error you are getting.
    1. Are you saying that the handler is not getting
    called?
    2. or you are not able to invoke the web service
    at all?
    If it is 1 check the web-service.xml file of the ear
    deployed. Make sure that your change is not overwritten
    by servicegen.
    If it is 2 then check the URL of the web service in
    web-service.xml file and use a browser to get to
    that URL.
    Regards,
    -manoj
    http://manojc.com
    "Radhe" <[email protected]> wrote in message
    news:[email protected]...
    >
    Manoj,
    Thanks for your reply. When I bring up the WLS, from the messages on theconsole,
    it comes-up pretty cleanly. Theare are no error messages.
    I looked into log files and their is nothing. This has surprised me.
    I worked with some of my friends and they are clueless. I never thoughtto just
    read SOAP Headers, that I have to go through so much pain.
    Also part of my web-services.xml file is generated through servicegen,then I
    crack open the .ear file strip the web-services.xml file, edit it and putit back.
    >
    IF there is some error I would have fixed it.
    Does handler-chains in web-services.xml work, or it is some fiction, BEAmade
    up. I am clueless where I am screwing it up.
    Thanks
    ---Radhe
    "manoj cheenath" <[email protected]> wrote:
    Can you please post the error message?
    This example may also help you:
    http://www.manojc.com/?sample4
    Regards,
    -manoj
    http://manojc.com
    "Radhe" <[email protected]> wrote in message
    news:[email protected]...
    Hi All,
    My question is this. I use servicegen ant task to generate theweb-services.xml
    file,
    then I open the .ear file using winzip and edit the web-services.xmlfile
    to include
    the handler-chain information. I have included the following
    information
    <handler-chains>
    <handler-chain name="myChain">
    <handler
    class-name="com.whatever.core.sec.iec.ejb.IECSOAPHandler">
    <init-params>
    <init-param name="logDirectory" value="C:/temp" />
    <init-param name="severityLevel" value="verbose" />
    </init-params>
    </handler>
    </handler-chain>
    </handler-chains>
    and then I include the following in the operation tag:
    <operation method="batchResponseToPSS([B)" component="ejbcomp0"
    name="batchResponseToPSS"> >> handler-chain="myChain">> >>> >> and the also following> >>> >>       <operation method="onlineResponseToPSS([B)" component="ejbcomp0"> >name="onlineResponseToPSS"> >> handler-chain="myChain">> >>> >> Without the handler-chains element my app works fine.> >>> >> My whole web-sercvices.xml is located at following location:> >>> >>>>http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.webservices&item=3921&utag=> >>> >>> >> Any insight will be appreciated.> >>> >> Thanks> >> ---Radhe> >> >>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • ADOBE Connect Web Service Transaction ID

    Hi All,
    Hope I can make my question clear, but here goes.
    We are integrating an LMS into ADOBE Connect , so far so good. Managed to write all our intergration classes and all is working great. My question is as follows, If we launch a URL (SCO Content) the content launches and we can see the "attempt" via the report-user-training-transcripts webservice. This works well if we assume that all attempts are going to be logged and the users internet is working correctly etc.
    Is there a way when we launch to uniquely identify what the "transaction-id" will be. This means on our LMS side we know we launched with this transaction-id and when we read the transcript we can just filter for that specifictransaction-id. If there is no transaction-id this could be that the user closed before the content launched or there was a network issue.
    In short I want to know what SCO I am launching from the LMS to match the attempt with the transaction-id. I have tried to send through a custom field, but it does not pull through on the report..
    Any suggestions would help?
    Regards,
    Gavin

    Hi All,
    Hope I can make my question clear, but here goes.
    We are integrating an LMS into ADOBE Connect , so far so good. Managed to write all our intergration classes and all is working great. My question is as follows, If we launch a URL (SCO Content) the content launches and we can see the "attempt" via the report-user-training-transcripts webservice. This works well if we assume that all attempts are going to be logged and the users internet is working correctly etc.
    Is there a way when we launch to uniquely identify what the "transaction-id" will be. This means on our LMS side we know we launched with this transaction-id and when we read the transcript we can just filter for that specifictransaction-id. If there is no transaction-id this could be that the user closed before the content launched or there was a network issue.
    In short I want to know what SCO I am launching from the LMS to match the attempt with the transaction-id. I have tried to send through a custom field, but it does not pull through on the report..
    Any suggestions would help?
    Regards,
    Gavin

  • Unable to get requestor IP in weblogic 9.0 web service custom handler

    We used to get HttpServletRequest Object from which we get requestor IP previously, This is code for that
    if (context.containsProperty("HTTPRequest")) {
    req = (HttpServletRequest) context.getProperty("HTTPRequest");
    }else if( context.containsProperty("__BEA_PRIVATE_BINDING_PROP") ){
    Object bindingObj = context.getProperty("__BEA_PRIVATE_BINDING_PROP");
    if( bindingObj instanceof HttpServerBinding ){
    HttpServerBinding binding = (HttpServerBinding) bindingObj;
    req = binding.getRequest();
    But now this has changed and we are unable to get "__BEA_PRIVATE_BINDING_PROP" either from mime headers OR from MessageContext
    This is what we have used
    MimeHeaders mimeheaders = soapMessage.getMimeHeaders();
    MimeHeader mimeheader = null;
    Iterator iter = mimeheaders.getAllHeaders();
    while(iter.hasNext()) {
         mimeheader = (MimeHeader) iter.next();
         // loop through all the context properties
         Iterator props = context.getPropertyNames();
         while (props.hasNext()){
              String propName = (String) props.next();
    Requiremnt is to identify the requestor IP. Any help in this would be greatly appreciated.
    Thanks in Advance
    Raghu.

    hi:
    I followed the instructions of the <b>weblogic test client</b>(http://dev2dev.bea.com/wlserver/wstestclient.html). put the wlstestclient.ear in /bea90/weblogic90/server/lib.
    but http://host:port/wls_utc web page does not work.
    the messages it shows is "The WebLogic Test Client is not currently installed on this server. For download and installation instructions please see Dev2Dev."
    my OS is Redhat Enterprise 3.
    please, appreciate to suggestion and documents, thanks.
    Rick

  • Transactional Web Services?

    Is there any way to ensure that web services are transactional?
    We have a rich client passing soap calls through to an OC4J container. We are certain that session beans are transctional, since if an error occurs in the database, the entire transction is rolled back.
    However, if we pass the soap call through, and somehow a network connection is lost before the client receives the response from the server, we think because the transaction may be updating to the server, and since the client doesn't receive notification, it ends up thinking the transaction failed, and tries to send it again later. (thus failing later with a duplicate key) We're still trying to research this but so far this is what we suspect is happening.
    So my question is, are OC4J web services transactional? Or is a limitation due to the stateless nature of http?

    Jason,
    Currently oc4j web services are not transactional in a sense, that they don't provide any transaction context propagation mechanism between the client and the server, etc. There are different evolving standards in the web service space regarding support for distributed 2pc and long-running transactions, such as WS-Coordination/Transaction. As the standards/protocols mature, oc4j will provide corresponding support for them.
    Cheers,
    -lars

  • SOAP, Web Service Interaction using Flex 2

    A Web Service exists on the local computer. It is a .NET
    Framework web service (SOAP) running under IIS. It commences with a
    demand for three parameters. One fills in the form and presses a
    button on the form and is returned an XML file with vital data
    necessary for future web service transactions that will involve
    SQL-form queries and XML responses. Actions that Flex 2 is required
    to perform: 1) submit a URI and receive a form, 2) POST a response
    to the form and receive an XML file, 3) submit a query, 4) reformat
    an XML file to remove irrelevant data and to make a Flex 2 data
    provider happy so that a chart can be displayed. I assume Flex 2
    can do all these things and it is just a matter of knowing how.

    Your description is a bit confusing. The webservice in
    question has a single method that takes three parameters, and
    returns a FORM? What are the three parameters, and what, exactly,
    do you mean by "form".
    When I hear "form", I usually think of an HTML form with text
    input fields, comboboxes, radio buttons, etc. But, in general,
    properly developed webservices do not return UI elements (such as
    text input fields, comboboxes, and radio buttons). They are
    typically only used as a communication method in the model layer,
    where they return datasets or process responses. And the view layer
    (in this case, Flex) is responsible for building any UI elements
    that collect data for the interaction with the webservice.
    But, okay, let's say, for some odd reason, this webservice
    returns a form (as I am thinking of the term). What format is this
    form in? I personally can't think of a readily available method
    that could display this form with a Flex app, but maybe I'm missing
    something. Or is it that, by "form", you mean something completely
    different, like a second method in the webservice that receives
    posted data? What is actually returned in your step #1?
    Step #2 is a cinch. Simply create an HTTPService tag (or in
    script, create URLLoader and URLRequest objects) in your app that
    posts the appropriate data to the appropriate webservice URL with
    the appropriate method. In the callback handler function for that
    webservice call, a (properly formatted) XML response will be
    converted automatically to a "Flex-friendly" data object, which you
    can easily parse apart to build your SQL as necessary.
    Step #3, again, where do you submit the query to? A third
    method in the webservice? If so, it would be just like #2 above.
    And the response data would, again, be automatically converted into
    a Flex data object.
    Step #4 would probably be accomplished more by manipulating
    the Flex data object rather than any reformatting of the XML.
    Simply loop through the object and remove irrelevant children/data.
    Then set a bindable variable to the cleaned data object, and have
    your chart bound to that variable.
    There are many many examples on the web. Just search for
    'flex "mx:HTTPService"' or similar. And take a look through
    LiveDocs for [Bindable] for step #4.

  • 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

  • RPC Style Web Service and SSL

    Hi,
    Has anyone tried (and maybe succeeded) in accessing an
    RPC-style Web Service deployed on WebLogic Server 6.1 using
    SSL? I have a Web Service deployed and am able to access it using JNDI and the
    weblogic.soap.http.SoapInitialContextFactory
    INITIAL_CONTEXT_FACTORY. However, when I try to set the
    Context.SECURITY_PROTOCOL to "ssl" and access the secure port,
    I get a "java.net.SocketException: Unexpected end of file from
    the server" error message.
    Does the weblogic.soap.http.SoapInitialContextFactory not
    support SSL? Do I need to do the SOAP/XML messaging myself,
    without being able to make use of the WebLogic convenience
    classes? Thanks! Rob

    Alright!
    Glad you got it working ;-)
    Actually, the problem with the protocol being hardcoded to http in the wsdl.jsp,
    is a bit strange. It's unusual that the BEA engineers that coded the wsgen component
    and support classes, didn't use something like the following:
    <soap:address location="<%= request.getScheme() + "://" + request.getServerName()
    + ":" + request.getServerPort() %>/security/examples/webservices/security/PhoneBookService"/>
    I don't use wsgen too much, because I need to have more control over the J2EE
    packaging. It (wsgen) is great for spitting out stuff, but not really setup for
    doing Web service packaging that use classes (i.e. helper files, frameworks, etc.)
    that it doesn't generate. I think they (BEA) might be looking into integrating
    the Web Services assembly process with other tools like WebGain, Forte, etc. to
    alleviate these types of issues.
    Anyway, glad you got it working, so now you can help somebody else (time permitting,
    of course) with this topic in the future!
    Regards,
    Mike Wooten
    "Rob Nelson" <[email protected]> wrote:
    >
    Mike,
    Thank you very much for your response! The next to
    last sentence did it for me (when you mentioned checking
    that the location attribute of the soap:address element
    was set properly)! I noticed that when I viewed the WSDL
    file via the browser (by clicking on the link in the
    index.html page), I saw http://host:<unsecure_port> when
    I requested it over the unsecure port, but I saw
    http://host:<secure_port> when I requested the WSDL over
    the secure port. Notice it did not say https!
    So, I unjarred the EAR file that was generated by my
    wsgen task, and then unjarred the generated WAR file
    contained therein. When I looked at wsdl.jsp, I noticed
    that "http" was hard-coded in the location attribute, but
    that the host name and port number were dynamically
    generated. So I added a scriplet to dynamically place an
    "s" after "http" (if request.isSecure()) and rejarred up
    the WAR and EAR files.
    Now when I deployed the EAR file, I see "https" when
    I request the WSDL over the secure port, and my client
    (actually your client;) works! Awesome! I really appreciate
    your help! Now my only issue is why did the wsdl.jsp have
    "http" hard-coded, not accounting for secure requests.
    These files were generated by the WSGEN task in ANT.
    I figure it's either: I have a configuration problem,
    I have a problem with my ANT build script, my version of
    WebLogic Server (6.1 w/SP1 built 9/18/2001) has a bug, or
    maybe you just have to manually go in and modify the wsdl.jsp
    file if you want to use https :(. Please let me know if
    you have any insight on this, and I will also follow up
    with WebLogic support. Thanks again! Rob
    "Michael Wooten" <[email protected]> wrote:
    Hi Rob,
    I am absolutely sure the code I posted works, so we need to approach
    this from
    a different angle ;-)
    First, I know why the Context.SECURITY_PROTOCOL approach doesn't works.
    It's because
    the namespace in the Web Services code examples is not the same oneas
    the one
    used for RMI objects, EJBs, JDBC Data Sources, etc. For those objects,
    the Context.PROVIDER_URL
    is something like "t3://localhost:7001", and the INITIAL_CONTEXT_FACTORY
    is "weblogic.jndi.WLInitialContextFactory".
    The one being used with WebLogic Web Services, is mainly just functioning
    as a
    mechanism for manufacturing WebServiceProxy objects, because it is a
    non-instanciable!
    It does this by using a subclass of javax.naming.Context called SOAPContext,
    which
    is completely hidden from you, but also doesn't do much except implement
    the lookup()
    method. The implementation of this method ignores the Context.SECURITY_URL
    property,
    but it does pay attention to the "java.naming.security.principal" and
    "java.naming.security.credentials"
    properties. You don't need these properties for SSL, just Basic Authentication.
    Enough about that, though. The service end-point is a servlet right?
    So this means
    it has a URL that begins with http or https, which in turn means the
    WebLogic
    servlet engine gets the SOAP request and sends it to the StatelessSessionAdapter
    servlet. To WLS, this is just like any other HTTP/HTTPS request sent
    to it ;-)
    There is no special "SOAP-related" HTTP/HTTPS handler in WLS, but the
    SSL challenge
    dance still happens. So my first question is, are you sure you havethe
    HTTPS
    attributes set properly in the WebLogic console. SSL/HTTPS should be
    enabled and
    the "Hostname Verification Ignored" checkbox should be checked. Next,
    are you
    sure the URL assigned to the location attribute of the <service> element
    in the
    WSDL is correct (i.e. https://localhost:7002)? Are you using the "dynamic
    client"
    approach?
    Regards,
    Mike Wooten
    "Rob Nelson" <[email protected]> wrote:
    Mike,
    Thanks for your response. I downloaded the code example that
    you
    posted
    last week, as well as the code example that you posted in October for
    a similar
    request (BEA Support pointed me towards that). Unfortunately, I still
    can't get
    the Web Service to respond to the client request when the client uses
    the HTTPS
    port for the WebLogic Server.
    I tried two different client approaches. The first uses the client
    code
    that you posted in October, the WebServiceProxy approach. The second
    approach
    is based on the example in the WebLogic documentation, which uses the
    weblogic.soap.SoapInitialContextFactory
    class with the javax.naming.Context object to perform a lookup on the
    service
    (which closely resembles rmi without the narrowing).
    Both client classes fail to invoke the the service itself viaHTTPS
    (although
    they both work when making HTTP requests to the unsecure port). However,
    when
    I run the client based on the client class that you posted in October
    and make
    an HTTPS request, I can see in the output where it is able to download
    the WSDL
    file and use it (via the WebServiceProxy) to describe the availablemethods
    for
    the associated Web Service. It is only when the actual invoke() method
    is called
    on the SoapMethod object (which in turn sends the XML request to the
    Web Service
    Servlet), that the server doesn't respond, and the client fails with
    an UnexpectedEndOfFileException
    (i.e. no response).
    So, do you know why the servlet that the RPC-style Web Serviceuses
    to handle
    requests would not respond to HTTPS requests, when it processes HTTP
    requests
    without a problem (using the same client code that fails with the HTTPS
    request)?
    I am using WebLogic Server 6.1 w/SP1 on a Solaris 8 platform. Thanks
    for any
    advice you can give me! Rob
    "Michael Wooten" <[email protected]> wrote:
    Hi Rob,
    Check out the attached zip for "insights" into how to do this. It
    contains
    the
    code for two Web service "consumers" (that the new fangled word fora
    "client")
    and the web.xml and weblogic.xml for the RPC-style Web Service, that
    they consume.
    Hope this helps,
    Mike Wooten
    "Rob Nelson" <[email protected]> wrote:
    Hi,
    Has anyone tried (and maybe succeeded) in accessing an
    RPC-style Web Service deployed on WebLogic Server 6.1 using
    SSL? I have a Web Service deployed and am able to access it using
    JNDI
    and the
    weblogic.soap.http.SoapInitialContextFactory
    INITIAL_CONTEXT_FACTORY. However, when I try to set the
    Context.SECURITY_PROTOCOL to "ssl" and access the secure port,
    I get a "java.net.SocketException: Unexpected end of file from
    the server" error message.
    Does the weblogic.soap.http.SoapInitialContextFactory not
    support SSL? Do I need to do the SOAP/XML messaging myself,
    without being able to make use of the WebLogic convenience
    classes? Thanks! Rob

Maybe you are looking for