Open client socket from within a Web Service

Hello,
I need to open a client TCP/IP socket from within a Web Service-type WebLogic
Workshop app. When I try to read from the socket, the socket read operation hangs.
When I use the same code in a J2SE Java app on the same machine using Eclipse
everything works fine. It also works fine from within WebLogic, if I use a "URL"
object instead of a "Socket" object. (However, I cannot use this type of connection.)
Can anyone tell me how to work with raw TCP/IP sockets in this situation?

Hi Udi,
I have tested my code from within a Servlet and it works fine.
The Servlet and the Web Service both call the same simple JAVA class. This class wants to access a DB, and therefor, I am using the Data Source.
When the Servlet calls the class, everything works fine. But when I use the Web Service to call this class, I get the Exception "No attributes are implemented".
I hope this information helps you understanding my problem?
Thank you very much for your help.
Kind regards,
     Nadine

Similar Messages

  • Retrieving client ip from RPC-style web service

    Hi,
    I've got an rpc-style web service and I would like to log the incoming client
    ip address (i.e. I need to get at the HTTPRequest object). Can this be done by
    passing some kind of SOAP context parameter in the argument list of my exposed
    methods? If this is not doable, is implementing SOAP message handlers the way
    to to go? I would rather not do the latter, as the web service is working well
    and don't want to play with my code too much.
    Thanks

    I tried this, following the example in http://e-docs.bea.com/wls/docs70/webapp/filters.html,
    but I still can't get it to work. The init() method gets called, but doFilter(ServletRequest
    req, ServletResponse resp, FilterChain fc) does not. The "filter" part of my
    web.xml looks like:
    <filter>
    <filter-name>serviceFilter</filter-name>
    <filter-class>webservices.ServiceFilterImpl</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>serviceFilter</filter-name>
    <url-pattern>/myPattern/myWebService</url-pattern>
    </filter-mapping>
    The only thing I could thing of is that maybe my url-pattern is wrong, although
    this seems unlikely as my web service is able to process requests sent using
    http://myWLSMachine:7001/myPattern/myWebService.
    In fact, in the the WLS access.log file, I have:
    [07/Oct/2002:11:51:01 -0400] "POST /myPattern/myWebService HTTP/1.0" 200 3011.
    Do you know if there's something in the JAX-RPC API that I could use to get at
    the client ip address? I dug through the documentation and came across something
    called "ServletEndpointContext", but I'm not sure if this will do the trick.
    Thanks for your time,
    Danielle
    "manoj cheenath" <[email protected]> wrote:
    One way to do this may be to write a servlet filter
    and map the filter to the URL of your service.
    regards,
    -manoj
    "Danielle Vella" <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    I've got an rpc-style web service and I would like to log the incomingclient
    ip address (i.e. I need to get at the HTTPRequest object). Can thisbe
    done by
    passing some kind of SOAP context parameter in the argument list ofmy
    exposed
    methods? If this is not doable, is implementing SOAP message handlersthe
    way
    to to go? I would rather not do the latter, as the web service isworking
    well
    and don't want to play with my code too much.
    Thanks

  • Calling a Portal Service from within a Web Dynpro DC

    Hello,
    I am trying to call a Portal Service from within a Web Dynpro development component without sucess.
    Can anyone give me some hints on the necessary steps in order to accomplish this task?
    Thanks
    Diz

    Hi Diz,
    I tried doing the same thing by following the steps as mentioned by you. Just to re iterate,
    1. Created a DC "Portal Application Standalone" project by the name myservice.
    2. Created a portal service inside myservice by the ame AmitsService.
    3. Exposed IAmitsService.class in the public part.
    4 Build and deployed the DC on server and tested it through an abstract portal component and it worked FINE !!
    Now..
    5. Created anoter DC of type WebDynPro
    6. Added SAP_JTECHS -> epbc.prtapi._api as a "Used DC" with dependency build time and runtime
    7. Specified the sharing reference in the properties as PORTAL:sap.com/myservice
    8. Tried to reference the service using the following code..
    IAmitsService portalservice=(IAmitsService)WDPortalUtils.getServiceReference(IAmitsService.KEY);
    9.Build and deployed the DC.
    10. When I run the application I am getting the following error
    Processing HTTP request to servlet [dispatcher] finished with error.
    The error is: com.sap.engine.frame.core.load.SAPNoClassDefFoundError: com/sapportals/portal/prt/service/IService
    Exception id: [000D6008418B005C0000002C00000D200004163CE6719E1D]
    PLEASE ADVISE

  • Error invoking a web service within another web service

    Hi all!
    I have to develop a web service which needs to invoke another web service, thus the first web service is acting as a client of the second one. To get this, the first web service uses the proxy provided by the home page of the second one. However, when the first service invokes the second service, the body within the soap message is modified in such a way that it is not valid for the second service, because some namespaces declarations are added, in spite of the fact that they already exist. Then, I find the following:
    Body of the SOAP request created by the first web service:
    <a:request attribute1="urn:attribute:one"
    xmlns:a="urn:namespace:one" xmlns:b="urn:namespace:two">
    <b:body>Hello</b:body>
    </a:request>
    Body of the SOAP request received by the second web service:
    <a:request xmlns:a="urn:namespace:one"
    attribute1="urn:attribute:one"
    xmlns:a="urn:namespace:one" xmlns:b="urn:namespace:two">
    <b:body xmlns:b="urn:namespace:two">Hello</b:body>
    </a:request>
    I have also tried to run a client using this proxy outside the web service, and everything is ok. So, from my point of view, the problem is when running the proxy inside a web service. I wonder if I have to do something special with this proxy in order to use it within a web service.
    Has anybody run into this situation?
    Could anybody be so kind as to tell me how to solve it or if, on the contrary, it is an oc4j bug, please?
    Thank you very much in advance.
    Inma.

    Hi,
    Thanx it is working now.
    BTW can you give me some urls with info of this kind of setting which i need to do for other kind of integarions in J2EE platform.Sorry if i am asking too much as i am a starter in this technology.

  • Helpme I have error when I try connect from struts  to web service

    helpme I have error when I try connect from struts to web service using basic authentication . the error message is
    [SOAP Exception: fault code= SOAP-ENV Protocol; msg=Unsupported response content type "text/html" must be "text/xml"; ] Response was <html><body> 401 Unauthorized </body></html>
    I'm not using ldap for authentication only xml (jazx-data.xml) ... I already create user with jazn.jar for that user , and I dont know why it still error like that ..
    Please helpme I don't have anytime more to find the mistake , ??
    I'm using Jdeveloper 9i , and oc4j 9.0.4 Server (Not embedded with Jdev)
    But when I use with sample java client it success .....
    then I try with Struts the response is unsupported response content type text/html must be text/xml response was 401 Unauthorized

    1.The reason why this error occurs is, we are getting non SOAP response when the program is expecting a SOAP response. Did you set the proxy server correctly? Try to handle the exception and see the content type of the response in your program.
    2. While creating the client stub u must check an option for authentication for webservice .should solve ur problem.
    thanks
    sirisha

  • Safari signs me out of a web page each time I open a new tab within a web page I am already signed in to

    How can I stop Safari from signing me out of a web page each time I open a new tab within a web page I am already signed in to?
    This is very annoying, how can I stop this??

    Extensions.
    1. Empty Caches
        Safari > Preference > Advanced
        Checkmark the box for "Show Develop menu in menu bar".
        Develop menu will appear in the Safari menu bar.
        Click Develop and select "Empty Caches" from the dropdown.
    2. Delete Cookies
        Safari > Preferences > Privacy > Cookies and other website data:
        Click “Remove All Website Data”.

  • Unable to open CS3 Files from within the application

    Good Afternoon
    I work as IT Support for company looking after 10 ADOBE Creative Suite 3 end-users.
    One of my colleagues is unable to open Illustrator or Photoshop files from within their respective applications, but she is able to open them from outside ok.
    I have reinstalled ADOBE CS3 and this appeared to resolve the issue, only for it to return again a day later.
    She has no other applications or processes running during her attempt to open a file from within CS3.
    She will click on Open and the 'Open File' window will flash up for a split second, then the whole application will be frozen. It is as if the 'Open File' window is there, but isnt there because we cant click on it, but the application thinks it is displaying and so she can not click on anything else. The only way to close the application is to end the process under Task Manager.
    While I am sitting here tearing what little amount of hair I have on my head, can anyone point me in the right direction?
    Is this a Windows problem or an ADOBE problem do you think?
    I look forward to any replies.
    Thank you

    Hi Bob
    Ok...
    Opened illustrator but was unable to open the 'Open File' window.
    Changed the screen resolution, it suddenly worked!
    Changed the screen resolution back to as it was before, it also worked.
    What could cause this do you think?
    By simply changing the screen resolution and back again, the 'Open File' window displayed itself.
    Very bizarre!

  • Opening a socket from an applet

    I tried to open a socket from an applet to a server on a remote computer and I've got a refusal message.
    When I try it on a server in the local machine, it works.
    What could be the problem ?
    P.S. : when I open the socket from an application in the Java environment, to the same remote server it works ok.

    this is part of the security system built into java and Applets
    unless you sign an Applet it cannot do many "dangerous" things, like..
    access the loacl file system
    connect to any server except the server that it came from

  • How to send a XML file from  SAP    to   WEB SERVICE

    Hi folks,
    i m creating a XML file with purchase order data, while saving the purchase order.now i need to send this XML file to some WEB SERVICE i.e to some perticular address in WEB.
    can anyone give the step by step procedure to do this web service configuration? it's really urgent.
    points must be awarded.
    Thanks & Regards
      pabitra

    Hi all,
    i need to send some purchase order data from SAP to WEB SERVICE. while saving the purchase order, i want to send some data from SAP to WEB SERVICE ( a perticular address in WEB).
    i want to see those datas in xml format in WEB.
    Now i am using SAP 4.7 version. Is this web service configuration is possible or not?
    In SE37, i can not see the CREATE WEB SERVICE option in utilitities--> More utilities menu.is it possible in 4.7???
    can anyone give any suggestion ? it's very urgent.
    Thnaks
    pabitra

  • Start a BO report from within a web-application.

    Hi,
    An enuser want to start a BO report from within a web-application.
    The BO report ideally should not prompt for a login. The fact that we are using BO for reporting purposes should be transparent to the end users. The report should produce its output directly in Excel (pdf?) format. In WebI i can do a 'Save As' to obtain this, but it should go automatically so that the end users get their response directly in Excel
    the report should be parametrized. These parameters will be added to the URL by the calling application.
    To do a basic test of the Opendocument.jsp i created a number of test reports in WEBI, and i use the following URLs to execute them directly
    http://s-olaf-vtst150:8080/OpenDocument/opendoc/openDocument.jsp?&sPath=[My reports]&sDocName=tmsd1&sType=rep&sRefresh=Y
    http://s-olaf-vtst150:8080/OpenDocument/opendoc/openDocument.jsp?&sPath=[My reports]&sDocName=Yearselection&sType=rep&sRefresh=Y&lsSYear:=2002
    So this covers points 1 & 4
    What are the options for points 2 & 3?
    Kind regards,
    Johan

    The BO XI 3.1 environment works quite well now.
    Two more questions:
    1. When a user being member of the Readers group, still sees the Edit button in Webapplication - Infoview. Is it possible to hide or disable that Edit button ?
    2. Is it possible to make a user only seeing a part of the data in the universe ? When a query is run with a parameter, the user ses the parameter in the left column ... but in that way a normal user can change the value of that parameter giving him the possibility to see things he should not see. Making a separate query per user is overkill and too much work to do. Is BO XI 3.1 able to offer this possibility and how ?
    Rgds,
    Johan

  • Can't call WCF Data Service from within a WCF Service

    I am trying to query my WCF Data Service from within a WCF Service and I receive a error 404.  However, when I query the data service from my application, it works just fine.  The WCF Service will work just fine if I comment out the Data Service
    query request. 
    How do I get a WCF Service and a WCF Data Service to play nice?

    Hi,
    For this situation, first you could try to create the wcf data service and run it then consume the data service within your application by adding service reference.
    Here is an example for creating and consuming WCF Data service in console application, and for consuming the service in wcf service, you could just follow the same steps as the console application does.
    http://www.c-sharpcorner.com/uploadfile/dhananjaycoder/introduction-to-wcf-data-service-and-odata/
    Regards

  • How to access  complex data type from a soap web services?

    hello
    can u please tell me how can i access complex data type from a soap web service from jdeveloper 10g
    Jdeveloper generates 3 classes
    serviceStub
    getproperties
    response
    i have to retreview the data which is a complex data type it gives some
    unknown type. and the return value is a key-value pair data type .
    regards
    vs

    After you create the partner link and the invoke (to create the variables), change the element type of the response message to the complex type definition of your collection that appears in the XSD. You can do the same thing if you want to change the element type of the payload of the request message as well.

  • Pulling Data from an imported web service into a data grid - Flex 3.0

    Hi all,
    I have created a web service from Oracle using JDeveloper and imported it into my Fex 3 project, and I am trying to populate a data grid with the data from the web service.  I was trying to emulate the example found in my Adobe Flex 3.0 for Dummies book (see http://dougmccune.com/flexfordummies/chapter14/srcview/index.html), and while the code from the book with that data service works fine, I can't get my application to work.  My issue is with the part of code mx:DataGrid dataProvider="(service)"  - I do not know how to specify what to use for the data source to populate the data grid from my imported web service.  Any suggestions or examples would be helpful, as I am a newcomer to Adobe Flex.  My code is as follows:
    <?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"xmlns:webservices="
    generated.webservices.*">
     <mx:Script>
    <![CDATA[
     private function getData():void {service.getPdRec(ageDt.text);
    ]]>
    </mx:Script>
     <webservices:PD_Pct_Web_Service id="service" />
     <mx:VBox>
     <mx:HBox width="100%">
     <mx:TextInput id="ageDt" width="100%" />
     <mx:Button id="submitButton" label="Search" click="getData()" />
     </mx:HBox>
     <mx:DataGrid dataProvider="(service.getPdRec_lastResult
    " rowHeight="
    58" width="100%" height="300">
     <mx:columns>
     <mx:DataGridColumn dataField="creditManager" headerText="Credit Manager" width="40" />
     <mx:DataGridColumn dataField="pdTarget" headerText="PD Target" width="40" />
     <mx:DataGridColumn dataField="totalPd" headerText="Total PD" width="40" />
     <mx:DataGridColumn dataField="pdPct" headerText="PD Percent" width="50" />
     </mx:columns>
     </mx:DataGrid>
     </mx:VBox>
     </mx:Application>
    My web service returns the following when invoked:
    <env:Envelope
      xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:ns0="http://erec_db/PD_Pct_Web_Service.wsdl/types/">
    <env:Body>
      <ns0:getPdRecResponseElement>
       <ns0:result>
        <ns0:creditManager>Cobb</ns0:creditManager>
        <ns0:pdTarget>10</ns0:pdTarget>
        <ns0:totalPd>147.65</ns0:totalPd>
        <ns0:pdPct>26.77</ns0:pdPct>
       </ns0:result>
       <ns0:result>
        <ns0:creditManager>Collova</ns0:creditManager>
        <ns0:pdTarget>10</ns0:pdTarget>
        <ns0:totalPd>27.71</ns0:totalPd>
        <ns0:pdPct>21.67</ns0:pdPct>
       </ns0:result>
       <ns0:result>
        <ns0:creditManager>Lee</ns0:creditManager>
        <ns0:pdTarget>10</ns0:pdTarget>
        <ns0:totalPd>33.61</ns0:totalPd>
        <ns0:pdPct>72.38</ns0:pdPct>
       </ns0:result>
       <ns0:result>
        <ns0:creditManager>Maynard</ns0:creditManager>
        <ns0:pdTarget>10</ns0:pdTarget>
        <ns0:totalPd>74.19</ns0:totalPd>
        <ns0:pdPct>33.69</ns0:pdPct>
       </ns0:result>
       <ns0:result>
        <ns0:creditManager>Ong</ns0:creditManager>
        <ns0:pdTarget>10</ns0:pdTarget>
        <ns0:totalPd>13.26</ns0:totalPd>
        <ns0:pdPct>46.06</ns0:pdPct>
       </ns0:result>
      </ns0:getPdRecResponseElement>
    </env:Body>
    </env:Envelope>

    Use data binding. <mx:DataGrid dataProvider="{service.getPdRec_lastResult}"
    -Radhakrishna

  • Is it possible to read/write data from Salesforce using web service hub in Informatica?

    Anyone from Informatica can asnwer this question please

    Is it possible to read/write data from Salesforce using web service hub in Informatica? Not asking about PowerExchange for Salesforce or Informatica Cloud. Just using web service can we load data into Salesforce? Thanks ahead.

  • Could not run the bookstore1 example from the Java Web Services Tutorial

    The bookstore1 servlets example from the Java Web Services Tutorial (issue Aug 1, 2002) was built and deployed successfully by using the deploytool (following the steps described on pages 498ff of the tutorial).
    After deploying the application the Tomcat Web Application Manager shows the entry:
    /bookstore1:stopped:0:D:\Programme\Java\tomcat\jakarta-tomcat-4.1.8\work\Standalone\localhost\manager\bookstore1.war
    when entering the command: http://localhost:8080/manager/list.
    After entering the command: http://localhost:8080/manager/start?path=/bookstore1, the (uncomplete) message appears:
    FAIL - Application at context path /bookstore1 could not
    It should be noted that I was able to build and deploy the application GSApp (chapter 3 of the tutorial) successfully.

    Did you set up the database as described in
    http://java.sun.com/webservices/docs/1.0/tutorial/doc/WebApp13.html#69868

Maybe you are looking for

  • How do a make a clickable image redirect you to a different page in iBooks?

    I know that I can make an image clickable, and insert a url where it will go once clicked. But I want to make a widget to use in iBooks Author, that can take the reader to a certain page of the books depending on what they click. Is this possible?

  • Difference between FAGLL03 and FBL3n

    Hi My user is taking report for GL line items for 5 GL Accounts for 3 company codes for the month of July (Tcode: FAGLL03 and FBL3n). But in FBL3n, there are 5 items and in FAGLL03 there are only 3 line items. When i did from my id, it properly shown

  • Can't connect to D-link Extreme 4500

    I had no problem hooking my MacBook Pro up to my old router(DLINK WIRELESS G)I just picked-up the Dlink Extreme yesterday and had no problem hooking-up 2PC's and a PS3. Everytime I try to use the Airport connection through the MacBook, I get the erro

  • Minor editor bug

    Hi, I noticed couple problems with JDev editor: 1) editor only shows "Brace Mismatch" when cursor is positioned next to it. So when code you think that there is no errors but when you compile errors are reported. 2) some times syntax error are not sh

  • Can't use serial parameters of parity ,but VB can?

    Recently I use java.com package develop, meet some question, hope genuinely experts of java help me quickly,my question: Now using java can open serial port,but when set parameters for serial port,arise exception of UnsupportedCommOperationException