I'm trying to connect to Sonic MQ hosted behind a firewall from IBM Web Sphere Message broker message flow . WMB is old v6.01. and it does not have an option to set proxy details.
I'm getting
' There is a configuration problem with the JNDI Administered objects where: Initial Context Factory = 'com.sonicsw.jndi.mfcontext.MFContextFactory'. Location of the bindings = '100.XX.X.XX:2508'. ConnectionFactory Name = 'QCF'. JMS destination = 'XXXXXXXX'.
Are you sure you have the right configuration for your JNDI store.
If it is using the Sonic JNDI store you need to have the domain connection.
Domain Name
Url
login
Both the Jndi store port and broker(s) port must be open on the firewall.
Also the url is usually: tcp://100.XX.X.XX:2508
BR
Related
What I have:
WAS traditional 9.0 with EJB web service;
webservice client - java application;
SSL configured for only 9449 port as described here (one way http://www.ibm.com/developerworks/webservices/tutorials/ws-radsecurity3/ws-radsecurity3.html)
I need SSL mutual authentication, so I go to Quality of protection (QoP) settings, and set Client authentication = Required.
Up to this point all works fine.
Problem is that my EJB application needs client certificate's common name to obtain a user ID, which it will use in business logic. And here I failed.
Code snippet (web service side):
MessageContext context = wsContext.getMessageContext();
HttpServletRequest req = (HttpServletRequest)context.get(MessageContext.SERVLET_REQUEST) ;
System.out.println("!! isSecure " + req.isSecure());
X509Certificate[] certificates = (X509Certificate[]) req.getAttribute("java.servlet.request.X509Certificate");
if (null != certificates && certificates.length > 0) {
...
} else {
System.out.println("!! Empty certificates");
}
isSecure returnd true, but I get "Empty certificates" message.
My guess is maybe the reason is in following. When I output the SSL configuration used on 9449 port, the first line is "com.ibm.ssl.clientAuthenticationSupported = false" while through Admin Console it is set as Required.
com.ibm.websphere.ssl.JSSEHelper jsseHelper = com.ibm.websphere.ssl.JSSEHelper.getInstance();
java.util.Properties props = jsseHelper.getProperties("WebServiceConfigure");
System.out.println("!!! WebServiceConfigure = " + props.toString());
You might want to try the "direct connect" certificate properties. This was created to address intermediate (SSL-terminating) proxies (like a web server with plug-in) that issued a certificate different than the ultimate client. This property is
com.ibm.websphere.ssl.direct_connection_peer_certificates
You can determine whether you're getting the certificate from direct connect peer or proxied peer via com.ibm.websphere.webcontainer.is_direct_connection.
See also: WAS 9 doc page.
I have the same mule webservice application with 2 different versions deployed on the same mule server. Let's call it MuleApp.1.0 and MuleApp.1.1. The flow is as simple as the example of webservice flow on mulesoft website. Their wsdl urls are different as:
http://www.myhost.com:25101/MuleApp.1.0/Service?wsdl
http://www.myhost.com:25101/MuleApp.1.1/Service?wsdl
Both of them are working as expected when the other is not deploying on the mule server. The issue happens when I having both of them deployed on the same mule server like what I used to do in WebLogic. Now I am able to access MuleApp.1.1, but when I tried to access MuleApp.1.0, I got the error as below
07-Mar-2013:14:52:57.142 VWILVM3667 [MuleApp.1.1].connector.http.mule.default.receiver.03
WARN org.mule.transport.http.HttpMessageReceiver NA
No receiver found with secondary lookup on connector: connector.http.mule.default with URI key: http://www.myhost.com:25101/MuleApp.1.0/Service
This is supposed to be a very common versionning case. What did I miss in my config?
You can't have two different applications sharing the same HTTP port in the same Mule instance.
So what probably happens is that MuleApp.1.0 doesn't deploy properly (check the logs), which is why there is no endpoint listening on /MuleApp.1.0.
Either:
Use a different port in the two apps,
Put both flows in a single app.
Create a frontal app that listens on port 25101 and both /MuleApp.1.0 and /MuleApp.1.1 paths and that dispatches requests to MuleApp.1.0 and MuleApp.1.1 on private ports (say 25102 and 25103).
I finally deployed my application on tomcat, and replaced http inbound endpoint with servlet inbound endpoint. I configure the web.xml with servlet class org.mule.transport.servlet.MuleReceiverServlet. Now I am able to deploy multiple applications on the same port.
The application application I'm currently working on is required to interface with a web service using SOAP. The service providers want to restrict access to the service via a firewall using BOTH an IP address and a Port. I'm using VS 2010 and the service has been added as a .NET 2.0 Web Service.
Right now the firewall rule for my connection's port is set to 'ANY' and the service team wants to tighten it down to a specific port. I can't seem to find any way to set a specific outgoing port (port used when exiting my web server) in my service.
Is it even possible to do this?
It is possible to do this, but it's a non-trivial customization.
See Ways to Customize your ASMX Client Proxy for the general techniques. Near the bottom, you'll find "Heavy-Duty Customization".
By overriding the GetWebRequest method, you can gain access to the HttpWebRequest instance being used by the request.
HttpWebRequest has a ServicePoint property.
ServicePoint has a BindIPEndPointDelegate property.
Set this property to point to a method that will decide which IP address and port to use.
I've a simple jax-ws web service that on localhost works fine with the clients, but now I want to publish the web service on a public ip, so the clients can interact with it through wan network instead lan network.
I signed to no-ip dns service provider and defined my host like "myname.no-ip.info".
In my code i start the service in this way:
Endpoint.publish("http://localhost:8080/baseStationProvider", new BaseStationProvider());
and the browser at http://myname.no-ip.info:8080/baseStationProvider#wsdl doesn't show the wsdl.
If i start the service in this way:
Endpoint.publish("http://myname.no-ip.info/baseStationProvider", new BaseStationProvider());
compiling the code, it raise this exception:
Server Runtime Error: java.net.SocketException: Unresolved address
Any idea to problem and/or how to do what i need?
thanks in advance
This seems likely to do with routing and firewalls as opposed to web service publication etc. Ignoring the web-service aspect, can you even reach your server when you use this in your browser:
http://myname.no-ip.info:8080/
?
Which should look the same as
http://localhost:8080/
If not, then it is probably DNS/Routing/Firewalls that you need to check. Diagnostics that will help there are:
1) can the machine you are testing on resolve the DNS name mynam.no-ip.info? nslookup, ping, traceroute/tracert
2) is there a firewall blocking port 8080 from reaching local host? If the route from the internet to your host hits a firewall (which it will) that firewall will have to forward the request.
Good luck.
I have common web service interface on each endpoint applications (server and client).
How can I create port on client side without connecting to server for "the same" wsdl?
I search something what present this pseudocode:
MagicProxyFactory proxy = MagicProxyFactory.newInstance(MyServiceInterface.class);
/* then bind service address like that
((BindingProvider)proxy).getRequestContext()
.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http address");
*/
MyServiceInterface port = (MyServiceInterface) proxy.getPort();
Steps include:
Create the Service instance using the Service.create method
for which you need to know wsdl location, service name, and name space URL of the service.
e.g.
URL wsdlLocation = new URL("http://example.org/my.wsdl");
QName serviceName = new QName("http://example.org/sample", "MyService");
Service s = Service.create(wsdlLocation, serviceName);
Get the service proxy (service port for connecting) using Service.getPort() method.
For this you need to know endpoint implemenattion class name.
e.g. MyService port = s.getPort(MyService.class);
you can now call methods through proxy.
Using Metro? You can't. You need the WSDL to create the proxy. Either bundle the WSDL with your client (preferred) or use a URL from where the WSDL can be downloaded during proxy creation.