I got a problem with DataPower. I'm trying to set ws proxy up, but it keeps throwing http 500. I will provide wsdl, java code below.
I've set Remote Endpoint Host as my ip (not localhost):8080 - i host this ws on Eclipse + Tomcat, and Local Endpoint Host to ip of VM - instance of DataPower Gateway Trial with unused port (i use 2911). I uploaded wsdl file and set it up ofc.
I'm trying to test it with SOAP UI, by sending POST request with getUserName method invocation to http://VMip/WebServiceProject/services/UsersCatalog but i get error 500. I think i tried everything but still cant get it working. Please help!
UsersCatalog.wsdl
<wsdl:message name="setUserDataResponse">
<wsdl:part element="impl:setUserDataResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getUserDataRequest">
<wsdl:part element="impl:getUserData" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="setUserDataRequest">
<wsdl:part element="impl:setUserData" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getUserNameResponse">
<wsdl:part element="impl:getUserNameResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getUserDataResponse">
<wsdl:part element="impl:getUserDataResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getUserNameRequest">
<wsdl:part element="impl:getUserName" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="UsersCatalog">
<wsdl:operation name="getUserData">
<wsdl:input message="impl:getUserDataRequest" name="getUserDataRequest">
</wsdl:input>
<wsdl:output message="impl:getUserDataResponse" name="getUserDataResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="setUserData">
<wsdl:input message="impl:setUserDataRequest" name="setUserDataRequest">
</wsdl:input>
<wsdl:output message="impl:setUserDataResponse" name="setUserDataResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getUserName">
<wsdl:input message="impl:getUserNameRequest" name="getUserNameRequest">
</wsdl:input>
<wsdl:output message="impl:getUserNameResponse" name="getUserNameResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="UsersCatalogSoapBinding" type="impl:UsersCatalog">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getUserData">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getUserDataRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getUserDataResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="setUserData">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="setUserDataRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="setUserDataResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getUserName">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getUserNameRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getUserNameResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="UsersCatalogService">
<wsdl:port binding="impl:UsersCatalogSoapBinding" name="UsersCatalog">
<wsdlsoap:address location="http://10.57.129.63:8080/WebServiceProject/services/UsersCatalog"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
UsersCatalog (userImpl is just class with 2 fields - userName and userAddress + getters and setter)
package wtp;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService
public class UsersCatalog implements User{
public static final User userImpl = new UserImpl();
@WebMethod
public String getUserName() {
return userImpl.getUserName();
}
@WebMethod
public String getUserData() {
return userImpl.getUserData();
}
@WebMethod
public void setUserData(String userName, String userAddress) {
userImpl.setUserData(userName, userAddress);
}
}
Logs as Anders requested:
11:54:45 network debug 16945 response 10.57.129.63 0x80e0039e xmlfirewall (web-mgmt): url-open: response code 200
11:54:45 multistep debug 3044 request 0x80c00004 xmlfirewall (map): Protocol layer did not supply content-type
11:54:45 multistep debug 3044 request 0x80c00004 xmlfirewall (map): Protocol layer did not supply content-type
11:54:41 memory-report debug 33491 10.57.129.63 0x80e00690 wsgw (User.wsp): Response Finished: memory used 0
11:54:41 ws-proxy information 33491 error 10.57.129.63 0x80e000b6 wsgw (User.wsp): No match from processing policy 'User.wsp' for code '0x01130006'
11:54:41 ws-proxy warning 33491 10.57.129.63 0x80c0007b wsm-stylepolicy (User.wsp): No error rule is matched.
11:54:41 ws-proxy debug 33491 10.57.129.63 0x810000d6 wsgw (User.wsp): Match: Received value [http://www.datapower.com/fragment-id#dp.all()] matches WSDL component type 'fragmentid' 'getUserData'.
11:54:41 ws-proxy debug 33491 10.57.129.63 0x810000d6 wsgw (User.wsp): Match: Received value [http://www.datapower.com/fragment-id#dp.all()] matches WSDL component type 'fragmentid' 'getUserData'.
11:54:41 ws-proxy error 33491 error 10.57.129.63 0x01130006 wsgw (User.wsp): Failed to establish a backside connection
11:54:41 ws-proxy error 33491 10.57.129.63 0x80e00126 wsgw (User.wsp): Valid backside connection could not be established: Failed to establish a backside connection, url: http://10.57.129.63:2911/WebServiceProject/services/UsersCatalog
11:54:41 ws-proxy error 33491 10.57.129.63 0x80e00627 wsgw (User.wsp): Error occurred (port error) when connecting to URL 'http://10.57.129.63:2911/WebServiceProject/services/UsersCatalog'
11:54:41 network error 33491 0x80e00049 xmlmgr (default): Host connection failed to establish: 10.57.129.63 : tcp port 2911
11:54:41 network error 33491 0x00b30009 xmlmgr (default): Host connection could not be established
11:54:41 network debug 3471 0x80e006bd A hangup error occurred on socket (119). Error details (111: Connection refused). Local(10.57.129.109:25227) - Remote(n/a)
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80e00536 wsgw (User.wsp): HTTP Header-Retention:Compression Policy: Off, URL: /WebServiceProject/services/UsersCatalog
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80e00536 wsgw (User.wsp): HTTP Header-Retention:Header-Retention Policy:MQMD = OFF. MQMD Header = (NULL), URL: http://10.57.129.63:2911/WebServiceProject/services/UsersCatalog
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80e00536 wsgw (User.wsp): HTTP Header-Retention:Header-Retention Policy: Range = OFF. Range Header = (NULL), URL: http://10.57.129.63:2911/WebServiceProject/services/UsersCatalog
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80e00536 wsgw (User.wsp): HTTP Header-Retention:Header-Retention Policy: Accept-Encoding = OFF. Accept-Encoding Header = gzip,deflate, URL: http://10.57.129.63:2911/WebServiceProject/services/UsersCatalog
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80e00536 wsgw (User.wsp): HTTP Header-Retention:Header-Retention Policy: TE = OFF. TE Header = (NULL), URL: http://10.57.129.63:2911/WebServiceProject/services/UsersCatalog
11:54:41 network debug 33491 10.57.129.63 0x80e003ca xmlmgr (default): Attempting TCP connect to 10.57.129.63
11:54:41 multistep information 33491 request 10.57.129.63 0x80c00002 wsgw (User.wsp): rule (User.wsp_default_request-rule): #2 results: Generated from INPUT. Results stored in OUTPUT. completed OK.
11:54:41 memory-report debug 33491 request 10.57.129.63 0x80e0068d wsgw (User.wsp): Processing [Rule (User.wsp_default_request-rule), Action ('User.wsp_default_request-rule_defaultaction_result', results()), Input(INPUT), Output(OUTPUT)] finished: memory used 342160
11:54:41 multistep information 33491 request 10.57.129.63 0x80c00002 wsgw (User.wsp): rule (User.wsp_default_request-rule): #1 slm: 'INPUT User.wsp' completed OK.
11:54:41 memory-report debug 33491 request 10.57.129.63 0x80e0068d wsgw (User.wsp): Processing [Rule (User.wsp_default_request-rule), Action ('User.wsp_default_request-rule_defaultaction_slm', slm(User.wsp)), Input(INPUT), Output(NULL)] finished: memory used 0
11:54:41 xmlfilter information 33491 request 10.57.129.63 0x80c00036 wsgw (User.wsp): Accept set.
11:54:41 xslt debug 33491 10.57.129.63 0x80a002ac xmlmgr (default): xslt Compilation Request: Found in cache store:///dp/slmpolicy.xsl.
11:54:41 xslt debug 33491 10.57.129.63 0x80a002aa xmlmgr (default): xslt Compilation Request: Checking cache for URL 'store:///dp/slmpolicy.xsl'.
11:54:41 multistep debug 33491 request 10.57.129.63 0x80c0004e wsgw (User.wsp): Stylesheet URL to compile is 'store:///dp/slmpolicy.xsl'
11:54:41 ws-proxy information 33491 10.57.129.63 0x80a002a4 xmlmgr (default): wsdl Compilation Request: Compilation complete of URL 'local:///UsersCatalog.wsdl'. Memory used 1349568 bytes.
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80a002a3 xmlmgr (default): wsdl Compilation Request: Beginning compilation of URL 'local:///UsersCatalog.wsdl'.
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80a002af xmlmgr (default): wsdl Compilation Request: Not in cache. Compiling 'local:///UsersCatalog.wsdl'.
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80a002aa xmlmgr (default): wsdl Compilation Request: Checking cache for URL 'local:///UsersCatalog.wsdl'.
11:54:41 xmlparse debug 33491 request 10.57.129.63 0x80e003ab wsgw (User.wsp): Finished parsing: http://10.57.129.110:2912/WebServiceProject/services/UsersCatalog
11:54:41 xmlparse debug 33491 request 10.57.129.63 0x80e003a6 wsgw (User.wsp): Parsing document: 'http://10.57.129.110:2912/WebServiceProject/services/UsersCatalog'
11:54:41 multistep warning 33491 request 10.57.129.63 0x00340027 wsgw (User.wsp): Multistep Probe enabled
11:54:41 memory-report debug 33491 10.57.129.63 0x80e0068c wsgw (User.wsp): Request Started: memory used 0
11:54:41 ws-proxy information 33491 request 10.57.129.63 0x80e000b4 wsm-stylepolicy (User.wsp): rule (User.wsp_default_request-rule): selected via match 'User.wsp_match_all' from processing policy 'User.wsp'
11:54:41 http debug 33491 10.57.129.63 0x81000171 Matching (User.wsp_match_all): Match: Received URL [/WebServiceProject/services/UsersCatalog] matches rule '*'
11:54:41 ws-proxy debug 33491 10.57.129.63 0x810000d6 wsgw (User.wsp): Match: Received value [http://www.datapower.com/fragment-id#dp.all()] matches WSDL component type 'fragmentid' 'getUserData'.
11:54:41 ws-proxy information 33491 10.57.129.63 0x80e00383 source-http (handler): WS-Proxy selected: 'User.wsp'. Operation 'getUserData' matches all criteria.
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80e00384 source-http (handler): WS-Proxy User.wsp operation getUserName does not match SOAP operation as required by WS-I BP1.0/1.1 R2744 or R2745: received (getUserData) required (getUserName). Received protocol 'http://schemas.xmlsoap.org/wsdl/soap/', required protocol 'http://schemas.xmlsoap.org/wsdl/soap12/'. Received SOAPAction ((null)) required SOAPAction (). SOAPAction policy is lax.
11:54:41 ws-proxy warning 33491 10.57.129.63 0x80e004b8 source-http (handler): Unrecognized content type so SOAP Action header '' will be ignored
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80e00384 source-http (handler): WS-Proxy User.wsp operation setUserData does not match SOAP operation as required by WS-I BP1.0/1.1 R2744 or R2745: received (getUserData) required (setUserData). Received protocol 'http://schemas.xmlsoap.org/wsdl/soap/', required protocol 'http://schemas.xmlsoap.org/wsdl/soap12/'. Received SOAPAction ((null)) required SOAPAction (). SOAPAction policy is lax.
11:54:41 ws-proxy warning 33491 10.57.129.63 0x80e004b8 source-http (handler): Unrecognized content type so SOAP Action header '' will be ignored
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80e00384 source-http (handler): WS-Proxy User.wsp operation getUserData does not match SOAP operation as required by WS-I BP1.0/1.1 R2744 or R2745: received (getUserData) required (getUserData). Received protocol 'http://schemas.xmlsoap.org/wsdl/soap/', required protocol 'http://schemas.xmlsoap.org/wsdl/soap12/'. Received SOAPAction ((null)) required SOAPAction (). SOAPAction policy is lax.
11:54:41 ws-proxy warning 33491 10.57.129.63 0x80e004b8 source-http (handler): Unrecognized content type so SOAP Action header '' will be ignored
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80e00384 source-http (handler): WS-Proxy User.wsp operation getUserName does not match SOAP operation as required by WS-I BP1.0/1.1 R2744 or R2745: received (getUserData) required (getUserName). Received protocol 'http://schemas.xmlsoap.org/wsdl/soap/', required protocol 'http://schemas.xmlsoap.org/wsdl/soap/'. Received SOAPAction () required SOAPAction (). SOAPAction policy is lax.
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80e00384 source-http (handler): WS-Proxy User.wsp operation setUserData does not match SOAP operation as required by WS-I BP1.0/1.1 R2744 or R2745: received (getUserData) required (setUserData). Received protocol 'http://schemas.xmlsoap.org/wsdl/soap/', required protocol 'http://schemas.xmlsoap.org/wsdl/soap/'. Received SOAPAction () required SOAPAction (). SOAPAction policy is lax.
11:54:41 xmlparse debug 33491 request 10.57.129.63 0x80e003a9 xmlmgr (default): Parsing http://10.57.129.110:2912/WebServiceProject/services/UsersCatalog stopped on XPath match
11:54:41 xmlparse debug 33491 request 10.57.129.63 0x80e003a6 xmlmgr (default): Parsing document: 'http://10.57.129.110:2912/WebServiceProject/services/UsersCatalog'
11:54:41 xslt debug 33491 10.57.129.63 0x80a002ac xmlmgr (default): patterns Compilation Request: Found in cache expr:////*[local-name()='Envelope']/*[local-name()='Body']/*.
11:54:41 xslt debug 33491 10.57.129.63 0x80a002aa xmlmgr (default): patterns Compilation Request: Checking cache for URL 'expr:////*[local-name()='Envelope']/*[local-name()='Body']/*'.
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80e0037d source-http (handler): WS-Proxy User.wsp operation setUserData matches address (10.57.129.110:2912) url (/WebServiceProject/services/UsersCatalog). SOAP operation and Action will be evaluated.
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80e0037d source-http (handler): WS-Proxy User.wsp operation getUserName matches address (10.57.129.110:2912) url (/WebServiceProject/services/UsersCatalog). SOAP operation and Action will be evaluated.
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80e0037d source-http (handler): WS-Proxy User.wsp operation getUserData matches address (10.57.129.110:2912) url (/WebServiceProject/services/UsersCatalog). SOAP operation and Action will be evaluated.
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80e0037d source-http (handler): WS-Proxy User.wsp operation setUserData matches address (10.57.129.110:2912) url (/WebServiceProject/services/UsersCatalog). SOAP operation and Action will be evaluated.
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80e0037d source-http (handler): WS-Proxy User.wsp operation getUserName matches address (10.57.129.110:2912) url (/WebServiceProject/services/UsersCatalog). SOAP operation and Action will be evaluated.
11:54:41 ws-proxy debug 33491 10.57.129.63 0x80e0037d source-http (handler): WS-Proxy User.wsp operation getUserData matches address (10.57.129.110:2912) url (/WebServiceProject/services/UsersCatalog). SOAP operation and Action will be evaluated.
11:54:41 mpgw debug 33491 10.57.129.63 0x80e00140 source-http (handler): Generating chunked response stream to front
11:54:41 mpgw debug 33491 10.57.129.63 0x80e0013f source-http (handler): Found content length 207 HTTP input
11:54:41 mpgw debug 33491 10.57.129.63 0x80e0013b source-http (handler): HTTP Transaction # 1 on this TCP connection
11:54:41 mpgw information 33491 10.57.129.63 0x80e0013a source-http (handler): Received HTTP/1.1 POST for /WebServiceProject/services/UsersCatalog from 10.57.129.63
11:54:34 network debug 16865 response 10.57.129.63 0x80e0039f xmlfirewall (web-mgmt): url-open: Finished parsing response from: http://127.0.0.1:63503/
11:54:34 network debug 16865 response 10.57.129.63 0x80e0039e xmlfirewall (web-mgmt): url-open: response code 200
11:54:34 multistep debug 2996 request 0x80c00004 xmlfirewall (map): Protocol layer did not supply content-type
11:54:34 multistep debug 2996 request 0x80c00004 xmlfirewall (map): Protocol layer did not supply content-type
11:54:34 network debug 3968 response 10.57.129.63 0x80e0039f xmlfirewall (web-mgmt): url-open: Finished parsing response from: http://127.0.0.1:63503/
11:54:34 network debug 3968 response 10.57.129.63 0x80e0039e xmlfirewall (web-mgmt): url-open: response code 200
11:54:34 multistep debug 20309 request 0x80c00004 xmlfirewall (map): Protocol layer did not supply content-type
11:54:34 multistep debug 20309 request 0x80c00004 xmlfirewall (map): Protocol layer did not supply content-type
11:54:34 network debug 3968 response 10.57.129.63 0x80e0039f xmlfirewall (web-mgmt): url-open: Finished parsing response from: http://127.0.0.1:63503/
11:54:34 network debug 3968 response 10.57.129.63 0x80e0039e xmlfirewall (web-mgmt): url-open: response code 200
11:54:34 multistep debug 20293 request 0x80c00004 xmlfirewall (map): Protocol layer did not supply content-type
11:54:34 multistep debug 20293 request 0x80c00004 xmlfirewall (map): Protocol layer did not supply content-type
11:54:34 network debug 3968 response 10.57.129.63 0x80e0039f xmlfirewall (web-mgmt): url-open: Finished parsing response from: http://127.0.0.1:63503/
11:54:34 network debug 3968 response 10.57.129.63 0x80e0039e xmlfirewall (web-mgmt): url-open: response code 200
11:54:34 multistep debug 20277 request 0x80c00004 xmlfirewall (map): Protocol layer did not supply content-type
11:54:34 multistep debug 20277 request 0x80c00004 xmlfirewall (map): Protocol layer did not supply content-type
11:54:34 network debug 3952 response 10.57.129.63 0x80e0039f xmlfirewall (web-mgmt): url-open: Finished parsing response from: http://127.0.0.1:63503/
11:54:34 network debug 3952 response 10.57.129.63 0x80e0039e xmlfirewall (web-mgmt): url-open: response code 200
11:54:34 multistep debug 2964 request 0x80c00004 xmlfirewall (map): Protocol layer did not supply content-type
11:54:34 multistep debug 2964 request 0x80c00004 xmlfirewall (map): Protocol layer did not supply content-type
11:54:33 network debug 16817 response 10.57.129.63 0x80e0039f xmlfirewall (web-mgmt): url-open: Finished parsing response from: http://127.0.0.1:63503/
11:54:33 network debug 16817 response 10.57.129.63 0x80e0039e xmlfirewall (web-mgmt): url-open: response code 200
11:54:33 multistep debug 20245 request 0x80c00004 xmlfirewall (map): Protocol layer did not supply content-type
11:54:33 multistep debug 20245 request 0x80c00004 xmlfirewall (map): Protocol layer did not supply content-type
11:54:33 network debug 16817 response 10.57.129.63 0x80e0039f xmlfirewall (web-mgmt): url-open: Finished parsing response from: http://127.0.0.1:63503/
This part is most important i think:
11:54:41 ws-proxy error 33491 error 10.57.129.63 0x01130006 wsgw (User.wsp): Failed to establish a backside connection
11:54:41 ws-proxy error 33491 10.57.129.63 0x80e00126 wsgw (User.wsp): Valid backside connection could not be established: Failed to establish a backside connection, url: http://10.57.129.63:2911/WebServiceProject/services/UsersCatalog
11:54:41 ws-proxy error 33491 10.57.129.63 0x80e00627 wsgw (User.wsp): Error occurred (port error) when connecting to URL 'http://10.57.129.63:2911/WebServiceProject/services/UsersCatalog'
11:54:41 network error 33491 0x80e00049 xmlmgr (default): Host connection failed to establish: 10.57.129.63 : tcp port 2911
11:54:41 network error 33491 0x00b30009 xmlmgr (default): Host connection could not be established
I asked my admin if our firewall isn't blocking incoming traffic, but it's allowed.
I discovered that DataPower accepts request, but it fails to make it's way to host (Tomcat).
I was thinking that it might be a problem with VM network setting, but it throws same error both on bridged and host-only.
You got a connection refused which most likely means you've hit a firewall. Use the troubleshooting tool in DataPower to do a connection test on the port and IP you need to connect to and check that you get a connection. If you do, then you have some issue with the Java service. If not then check any firewall and route between DataPower and the target server.
Make sure you have the NIC's properly set in DataPower if you are using more than one IP/NIC. Only one NIC should have a default gateway, the rest static routes.