Ask a Question

proxy server question

alibaba82
Super Contributor

proxy server question

Hello,
I have a machine (A) with visual studio which has my webservice solution. when you build the solution in VS it launches a development web server such that only request originating from that server can be processed by the webserver. So if I have soapui on that server and call the hosted webservice it works fine.

However I want to be able to call this webservice via other client. If I try to call the web service some other client, the request is rejected since it is originating from somewhere other than localhost. To get around this issue I installed CCProxy on the server hosting the webservice and specified the proxy IP address and port in soapui proxy settings in the client. I noticed that the request actually went through (looking at the http log) but I am getting no response back from the webservice in soapUI. I get the following error:
Error getting response; java.net.socketException: connection reset.

I am able to get a response back if i run soapui on localhost (development machine).

I am a little new to the concept of proxy stuff so not really sure where I am going wrong. Please help


Ali
9 REPLIES 9
omatzura
Super Contributor

Hi Ali,

hmm.. hard to say what could be causing the error. Have you enabled authentication in the proxy?

Maybe you could try using the soapUI SOAP Monitor functionality as proxy instead? ie setup a SOAP Monitor in soapUI on your local machine and configure it as a proxy, then point your client (soapUI on another machine) to use this as a proxy as you have done.. You should be able to see requests going to your local service throught the soapUI monitor, and hopefully get more error information if it still doesn't work..

keep me posted!

regards,

/Ole
eviware.com
alibaba82
Super Contributor

I don't have authentication setup up on CC Proxy.

I tried using soap monitor in soapUI but it is causing null pointer exception.
I right clicked on the project and choose 'launch soap monitor', choose http proxy

Thu Feb 07 03:44:23 PST 2008:ERROR:java.lang.NullPointerException
  java.lang.NullPointerException
  at com.eviware.soapui.impl.coverage.CoverageConfig.(SourceFile:50)
  at com.eviware.soapui.impl.coverage.inspector.CoverageInspector.(SourceFile:59)
  at com.eviware.soapui.impl.coverage.inspector.MessageExchangeRequestCoverageInspector.(SourceFile:28)
  at com.eviware.soapui.impl.coverage.inspector.CoverageInspectorFactory.createRequestInspector(SourceFile:46)
  at com.eviware.soapui.impl.wsdl.panels.request.components.RequestMessageXmlEditor.(RequestMessageXmlEditor.java:55)
  at com.eviware.soapui.impl.wsdl.support.MessageExchangeRequestMessageEditor.(MessageExchangeRequestMessageEditor.java:33)
  at com.eviware.soapui.impl.wsdl.monitor.SoapMonitor.buildViewer(SoapMonitor.java:393)
  at com.eviware.soapui.impl.wsdl.monitor.SoapMonitor.buildContent(SoapMonitor.java:181)
  at com.eviware.soapui.impl.wsdl.monitor.SoapMonitor.(SoapMonitor.java:172)
  at com.eviware.soapui.impl.wsdl.panels.monitor.ProSoapMonitorDesktopPanel.(SourceFile:52)
  at com.eviware.soapui.impl.wsdl.panels.monitor.ProSoapMonitorAction.openSoapMonitor(SourceFile:22)
  at com.eviware.soapui.impl.wsdl.actions.monitor.SoapMonitorAction.perform(SoapMonitorAction.java:97)
  at com.eviware.soapui.impl.wsdl.actions.monitor.SoapMonitorAction.perform(SoapMonitorAction.java:31)
  at com.eviware.soapui.support.action.swing.SwingActionDelegate.actionPerformed(SwingActionDelegate.java:92)
  at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
  at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
  at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
  at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
  at javax.swing.AbstractButton.doClick(Unknown Source)
  at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
  at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
  at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
  at java.awt.Component.processMouseEvent(Unknown Source)
  at javax.swing.JComponent.processMouseEvent(Unknown Source)
  at java.awt.Component.processEvent(Unknown Source)
  at java.awt.Container.processEvent(Unknown Source)
  at java.awt.Component.dispatchEventImpl(Unknown Source)
  at java.awt.Container.dispatchEventImpl(Unknown Source)
  at java.awt.Component.dispatchEvent(Unknown Source)
  at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
  at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
  at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
  at java.awt.Container.dispatchEventImpl(Unknown Source)
  at java.awt.Window.dispatchEventImpl(Unknown Source)
  at java.awt.Component.dispatchEvent(Unknown Source)
  at java.awt.EventQueue.dispatchEvent(Unknown Source)
  at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
  at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
  at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
  at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
  at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
  at java.awt.EventDispatchThread.run(Unknown Source)
omatzura
Super Contributor

Hi!

duh.. that won't help, will it.. hm.. this will be fixed in 2.0.3.. what endpoint are you specifying in the soapUI client when using the proxy?

regards,

/Ole
eviware.com
alibaba82
Super Contributor

not sure if i understood your question. I didn't really get to specifying the endpoint on the client since i could not start the proxy via soapui on the server due to the exception
omatzura
Super Contributor

Hi,

sorry, I meant when you were running with the previous proxy..

regards!

/Ole
eviware.com
alibaba82
Super Contributor

so here is what i have for the proxy server / development server.

Visual studio's developments server's shows
http://localhost:3372
so the soapui on this development server has the endpoint
http://localhost:3372/TVGuide.Core.WebServices/v4/..... and it works fine.
the actual server hostname is 'automation'

After the proxy server has been setup and it using port 808 for any http traffic, i configure the soapui on the client side with the following setting
host: automation
port: 808
username/password/exlcues:

I notice that when I issue the request from soapui on the client side, I see activity on CCProxy montior indicating that the request went through the proxy.

do i need to configure username/password on proxy ?


Ali
alibaba82
Super Contributor

I did some debugging and look with the the request is not going to the webserver. I placed a breakpoint in the code and noticed the the request never breaks into the code. This probably indicates that the proxy server is not forwarding the request to the visual studio web server.  Any suggestions ?

Ali
omatzura
Super Contributor

Hi Ali,

maybe the webserver is "smart" enough to not accept proxied requests from other hosts.. isn't it just possible to disable the localhost-client requirement somewhere in the management console (IIS/security/something..)

regards,

/Ole
eviware.com
alibaba82
Super Contributor

so figured this one out after nearly pulling out all my hair and getting some IT help. So since the webserver was only accepting local request http://localhost/..., even using http:///.. in the same webserver would not work.

So had to modify the hostfile so that points to 127.0.0.1. Now with the proxy running, any request from client soapui http:///.. that hits the proxy will go through the localhost.

I am trying your other solution about endpoints. Will update soon.

Ali
cancel
Showing results for 
Search instead for 
Did you mean: