IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

JavaioIOException javaioIOException 403 Forbidden

  • 1.  JavaioIOException javaioIOException 403 Forbidden

    Posted Wed February 05, 2003 01:47 PM

    Hello together

    In our developement System we have set up 2 Trading Network Systems (Buyer Seller) with Rosettanet. When I send an Message from the sellersystem to the buyersystem via http it work without problems. When I send the message via https then I’ve go the following ERROR java.io.IOException: java.io.IOException: 403 Forbidden.
    On both Integration Servers are https - ports defined. Each server has his own certificate and is installed on both servers. The settings for sign, encryption, decryption and verify are made. The profiles are set up with http and https. the prefered is https. The certificate of the servers are defined in the security tab of the Integration Servers.
    Does somebody know what I mad wrong?


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Wed February 05, 2003 02:07 PM

    Hi, Pascal.

    403 is a protocol error for HTTP. Your problem may be related to the Inetgration Server, but I think the issue is more closely tied to permissions or target service.

    What is the URL that you are trying to post to? Is it a service or a directory? For example, the URL should resemble the following:

    http://[I]serverhost:serverport[/i]/invoke/folder:service

    If you receive a 403 error, the target server received the request but ignored it for some reason.

    Check your permissions and URLs and let us know what you find.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 3.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Wed February 05, 2003 02:24 PM


  • 4.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Wed February 05, 2003 10:58 PM

    Is the https port on the receiveing end set to request or require certificates?

    Require means you must import the sender’s certificate and associate with a user account.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 5.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Wed February 05, 2003 11:14 PM

    it isn’t specified in the server, cause it is optional (webMethods IS Guide), do I have to define?


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 6.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Wed February 05, 2003 11:30 PM

    For each company profile you need a user in webMethods (typically a DUNS number) and make sure this user is in the TNPartners group. Each server needs to have the SSL ports set to ‘require certs’ then you map the cert on each side to the user associated with each profile.

    Make sure the wm.ip.rn:receive method is added to the ports as an allowed service (or set the ports Access Mode to Global - allow by default). Check connectivity between servers in each direction using a remote server alias for example (without the rosettanet complexity for starters).

    Will Kriski


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Wed February 05, 2003 11:34 PM

    When you create a https port, you have to specify client authentication type. The 3 options are None, Request Certificates, Require Certificates.

    None means user name/password. So the sending profile would specify user/password only (no cert).

    Request will ask for a cert, and if none is given fall back to user/pass. So the sending profile would specify either user/pass OR cert info.

    Require will ask for a cert, and if none is given deny access. Sender profile would only specify the cert info.

    Hope this helps.
    Theo


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 8.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Thu February 06, 2003 06:46 AM

    Hi Will

    Am I right? With user you mean the DUNS - Number.

    Pascal


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 9.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Thu February 06, 2003 07:24 AM

    Hi all

    does somebody know if only Port 443 is alowed to be used as https - Port. When I use this Port in one way i can start a connection and it works. Why not at other ports?


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 10.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Thu February 06, 2003 07:44 AM

    Can’t answer all the question because I’m not sure of your environment. But Definately you can use other ports than 443 for https. One project we do use port 4443 for https due to fact in unix systems you need to have root access in order to manage port 443.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 11.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Thu February 06, 2003 09:40 AM

    HI Kim

    we use W2K Servers and IS4.6
    Are there any spetial settings I have to da when I want to use other https ports?


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 12.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Thu February 06, 2003 01:37 PM

    Hi we use W2K Server, TN und IS 4.6

    regards

    pascal


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 13.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Thu February 06, 2003 04:02 PM

    Yes I mean the DUNS number.

    You can use any port for HTTPS but sometimes network people like to use 443 for the outside world - so they have to translate incoming requests from 443 to your webMethods port (5556 for example). webMethods suggests using ports above 1024 so that you don’t have to run the server as the ‘root’ user.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 14.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Thu February 06, 2003 04:31 PM

    hi will

    i have done that but it dosen’t work


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 15.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Thu February 06, 2003 05:18 PM

    Pascal - if you use 443, then you don’t have to specify the port in the URL. If you use a different port, then you do.
    e.g [url]https://secure.url:5556/invoke/blah/blah[/url]

    That’s the only difference (other than the root issue which is OS specific).

    403 is always a permissions issue. If you send me screen shots of the port config screen on the receiving end and the TN profile protocol and security tabs on the sending end, I’ll try to help you get this thing debugged.

    theo.ezell at webmethods.com


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 16.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Thu February 06, 2003 07:48 PM

    I thought a 403 was returned on any error. If the invoked service pukes (exit and signal failure, or uncaught Java exception, etc.) then the http return code is 403. Am I incorrect?


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 17.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Thu February 06, 2003 08:16 PM

    Rob - you are correct. I was thinking of standard http return codes. Sorry.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 18.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Wed February 26, 2003 01:23 PM

    Hi,

    I have two questions regarding http response:

    1. from a flow or java service on IS - is it possible to control the value of the http return code (statusCode) and message (statusMessage) - or is it beyond user’s control as suggested by Rob Eamon (always 403 when service fails) ?

    2. from a flow or java service on IS - is there any way to pass information back to a calling http client - at http level ( not as an XML document using output template ) ?

    Regards,

    Mikael


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 19.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Wed February 26, 2003 04:08 PM
    1. It has been my experience that the only http error codes returned are 200 (success) and 403 (error).

    2. You can use pub.flow:setResponse to return any type of data to the client, regardless of success/failure.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 20.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Wed February 26, 2003 04:15 PM
    1. I think by using java service you can control/set a different code for your HTTP Status code other than 403.

    2. In a flow service you can call pub.flow:setResponse service which sets the HTTP response with any message (xml/non-xml) you want to send. Also don’t forget to set the content-Type.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 21.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Wed February 26, 2003 04:44 PM

    for setting custom HTTP response code use the following java service. This service has two inputs “statusCode” and “statusMessage”.

    IDataCursor pipelineCursor = pipeline.getCursor();
    String statusCode = IDataUtil.getString( pipelineCursor, “statusCode” );
    String statusMessage = IDataUtil.getString( pipelineCursor, “statusMessage” );

    Service.getHttpResponseHeader((Values)pipeline)
    .setResponse(Integer.parseInt(statusCode), statusMessage);

    pipelineCursor.destroy();


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 22.  RE: JavaioIOException javaioIOException 403 Forbidden

    Posted Wed March 12, 2003 07:33 PM

    Thanks Rob and PU!

    After I posted my question here I decided to open a new
    discussion thread instead

    Integration Server & Trading Networks: Development: Http
    response - can status code and message be controlled ?

    where I posted the same question. Please use this thread if
    you want to add to the http response discussion, thanks.
    Sorry for the confusion.

    /Mikael.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services